ewah-bitset 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.0.3. Memory leak fix.
2
+
1
3
  v0.0.2. A few additional library functions exposed.
2
4
 
3
5
  v0.0.1. First version.
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "ewah-bitset"
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Josh Ferguson"]
9
- s.date = "2012-04-23"
9
+ s.date = "2012-04-24"
10
10
  s.description = "A wrapper around Lemire's EWAHBoolArray from https://github.com/lemire/EWAHBoolArray"
11
11
  s.email = "josh@besquared.net"
12
12
  s.extensions = ["ext/extconf.rb"]
@@ -12,10 +12,15 @@ typedef struct ewah {
12
12
  EWAHBoolArray<uword64> *bits;
13
13
  } EWAH;
14
14
 
15
+ extern "C" void ewah_free(EWAH *bits) {
16
+ delete(bits->bits);
17
+ free(bits);
18
+ }
19
+
15
20
  extern "C" VALUE ewah_new(VALUE klass) {
16
21
  EWAH *b = ALLOC(EWAH);
17
22
  b->bits = new EWAHBoolArray<uword64>();
18
- VALUE bitset = Data_Wrap_Struct(klass, 0, free, b);
23
+ VALUE bitset = Data_Wrap_Struct(klass, 0, ewah_free, b);
19
24
  rb_obj_call_init(bitset, 0, 0);
20
25
  return bitset;
21
26
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ewah-bitset
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Ferguson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-23 00:00:00 Z
18
+ date: 2012-04-24 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: A wrapper around Lemire's EWAHBoolArray from https://github.com/lemire/EWAHBoolArray