rpatricia 0.06 → 0.07

Sign up to get free protection for your applications and to get access to all the features.
data/Changes CHANGED
@@ -1,18 +1,22 @@
1
+ 0.07 2010/09/23
2
+ - fix segfault from unpredictable GC ordering
3
+ when node objects outlive the trees they come from
4
+
1
5
  0.06 2010/09/14
2
- - rely on Ruby GC for allocations/free
3
- no need to explicitly destroy objects anymore
4
- - Ruby 1.9.2 C API compatibility
5
- - allow creation of subclasses of Patricia class
6
- - non-String objects may be stored as node-data
7
- - Patricia::Node objects are returned when match succeeds
8
- It's no longer possible to call tree methods on node
9
- objects and cause segfaults.
10
- - Patricia#show_nodes may be given a custom IO-like object
11
- - sync docs with remove, match_best and match_exact behavior
12
- - ArgumentError is raised for invalid addresses
13
- no more assertion failures for bad addresses
14
- - Patricia#show_nodes and Patricia#num_nodes no longer
15
- segfaults on empty trees
6
+ - rely on Ruby GC for allocations/free
7
+ no need to explicitly destroy objects anymore
8
+ - Ruby 1.9.2 C API compatibility
9
+ - allow creation of subclasses of Patricia class
10
+ - non-String objects may be stored as node-data
11
+ - Patricia::Node objects are returned when match succeeds
12
+ It's no longer possible to call tree methods on node
13
+ objects and cause segfaults.
14
+ - Patricia#show_nodes may be given a custom IO-like object
15
+ - sync docs with remove, match_best and match_exact behavior
16
+ - ArgumentError is raised for invalid addresses
17
+ no more assertion failures for bad addresses
18
+ - Patricia#show_nodes and Patricia#num_nodes no longer
19
+ segfaults on empty trees
16
20
 
17
21
  0.05 2010/03/12
18
22
  - reorganized directory layout
@@ -33,10 +33,13 @@ p_node_mark (void *ptr)
33
33
  }
34
34
 
35
35
  static VALUE
36
- wrap_node(patricia_node_t *node)
36
+ wrap_node(patricia_node_t *orig)
37
37
  {
38
- /* node will be freed when parent is freed */
39
- return Data_Wrap_Struct(cNode, p_node_mark, 0, node);
38
+ patricia_node_t *node = ALLOC(patricia_node_t);
39
+
40
+ memcpy(node, orig, sizeof(patricia_node_t));
41
+
42
+ return Data_Wrap_Struct(cNode, p_node_mark, -1, node);
40
43
  }
41
44
 
42
45
  static prefix_t *
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = %q{rpatricia}
6
- s.version = %q{0.06} # remember to update Changes if this is changed
6
+ s.version = %q{0.07} # remember to update Changes if this is changed
7
7
 
8
8
  s.homepage = "http://www.goto.info.waseda.ac.jp/~tatsuya/rpatricia/"
9
9
 
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpatricia
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 6
9
- version: "0.06"
8
+ - 7
9
+ version: "0.07"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tatsuya Mori
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-15 00:00:00 +00:00
18
+ date: 2010-09-23 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies: []
21
21