rbtree 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. data/ChangeLog +119 -61
  2. data/LICENSE +1 -1
  3. data/README +54 -26
  4. data/extconf.rb +4 -27
  5. data/rbtree.c +117 -138
  6. data/test.rb +110 -66
  7. metadata +45 -35
data/ChangeLog CHANGED
@@ -1,12 +1,70 @@
1
- 2007-09-21 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
1
+ 2009-01-27 OZAWA Takuma
2
+
3
+ * version 0.2.1 released.
4
+
5
+ * README: fixed documents.
6
+
7
+ * rbtree.c: ditto.
8
+
9
+ 2009-01-23 OZAWA Takuma
10
+
11
+ * rbtree.c (RETURN_ENUMERATOR): do nothing if rb_enumeratorize not
12
+ defined.
13
+
14
+ * rbtree.c (RBTREE_IN_ITERATION): removed. it has been not used.
15
+
16
+ * rbtree.c (HAVE_RB_MARSHAL_LOAD, HAVE_RB_OBJ_INIT_COPY,
17
+ HAVE_OBJECT_ALLOCATE, HAVE_RB_BLOCK_PROC, HAVE_RB_YIELD_VALUES):
18
+ removed macros for Ruby 1.6.x.
19
+
20
+ * extconf.rb (HAVE_RB_MARSHAL_LOAD, HAVE_RB_OBJ_INIT_COPY,
21
+ HAVE_OBJECT_ALLOCATE, HAVE_RB_BLOCK_PROC, HAVE_RB_YIELD_VALUES):
22
+ ditto.
23
+
24
+ * rbtree.c (cmpint): removed a few codes for Ruby 1.6.x.
25
+
26
+ * test.rb: ditto.
27
+
28
+ * test.rb: (assert_raise): removed an alias for RubyUnit. use
29
+ assert_raises.
30
+
31
+ * extconf.rb: removed checking for inline keyword.
32
+
33
+ 2009-01-21 OZAWA Takuma
34
+
35
+ * extconf.rb: removed gcc options for portability. Thanks to
36
+ Masatoshi SEKI.
37
+
38
+ 2008-12-26 OZAWA Takuma
39
+
40
+ * rbtree.c (rbtree_each, rbtree_each_pair, rbtree_each_key,
41
+ rbtree_each_value, rbtree_reverse_each, rbtree_delete_if,
42
+ rbtree_reject_bang, rbtree_select): Return an enumerator if no
43
+ block is given.
44
+
45
+ 2008-12-24 OZAWA Takuma
46
+
47
+ * rbtree.c (rbtree_s_create): check and convert argument inner arrays (assocs) using #to_ary.
48
+
49
+ * rbtree.c (rbtree_s_create): check and convert argument hash using #to_hash.
50
+
51
+ * rbtree.c (rbtree_s_create): RBTree#[] now takes assocs as source of rbtree conversion.
52
+
53
+ * rbtree.c (rbtree_to_hash): can't convert MultiRBTree to Hash.
54
+
55
+ * rbtree.c (rbtree_s_create): can't convert MultiRBTree to RBTree.
56
+
57
+ * rbtree.c (rbtree_s_create, rbtree_values_at): use long for loop counter instead of int.
58
+
59
+ 2007-09-21 OZAWA Takuma
2
60
 
3
61
  * extconf.rb: no gcc options for mswin32.
4
62
 
5
- 2007-02-01 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
63
+ 2007-02-01 OZAWA Takuma
6
64
 
7
65
  * version 0.2.0 released.
8
66
 
9
- 2007-01-25 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
67
+ 2007-01-25 OZAWA Takuma
10
68
 
11
69
  * rbtree.c (rbtree_readjust): remove a warning.
12
70
 
@@ -16,15 +74,15 @@
16
74
  * rbtree.c (rbtree_equal): returns true if two rbtrees have same
17
75
  set of key-value set.
18
76
 
19
- 2004-10-27 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
77
+ 2004-10-27 OZAWA Takuma
20
78
 
21
79
  * version 0.1.3 released.
22
80
 
23
- 2004-07-29 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
81
+ 2004-07-29 OZAWA Takuma
24
82
 
25
83
  * rbtree.c (rbtree_bound): RBTree#bound(lower, upper = lower).
26
84
 
27
- 2004-07-11 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
85
+ 2004-07-11 OZAWA Takuma
28
86
 
29
87
  * rbtree.c (MultiRBTree): new class. MultiRBTree allows duplicates
30
88
  of keys.
@@ -38,7 +96,7 @@
38
96
  * rbtree.c (iter_lev): added to count iterator level for nesting
39
97
  and thread-safety.
40
98
 
41
- 2004-06-29 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
99
+ 2004-06-29 OZAWA Takuma
42
100
 
43
101
  * dict.c: remove codes Ruby/RBTree doesn't need. now not supposed
44
102
  to use dict.c with other program.
@@ -48,7 +106,7 @@
48
106
  * dict.c (dict_equal): remove key_eql argument. use
49
107
  dict->dict_compare to compare keys.
50
108
 
51
- 2004-06-20 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
109
+ 2004-06-20 OZAWA Takuma
52
110
 
53
111
  * rbtree.c (rbtree_cmp): use rb_str_cmp if the type of keys is
54
112
  string.
@@ -57,11 +115,11 @@
57
115
 
58
116
  * rbtree.c (rbtree_user_cmp): ditto.
59
117
 
60
- 2004-06-12 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
118
+ 2004-06-12 OZAWA Takuma
61
119
 
62
120
  * version 0.1.2 release.
63
121
 
64
- 2004-05-31 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
122
+ 2004-05-31 OZAWA Takuma
65
123
 
66
124
  * rbtree.c (rbtree_initialize_copy): if an exception is raised in
67
125
  the method rbtree is not modified.
@@ -71,7 +129,7 @@
71
129
 
72
130
  * rbtree.c (rbtree_readjust): use rb_gc_force_recycle.
73
131
 
74
- 2004-05-24 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
132
+ 2004-05-24 OZAWA Takuma
75
133
 
76
134
  * rbtree.c (rbtree_initialize_copy): use aset_i. duplicating a key
77
135
  of string is fast because of copy-on-write.
@@ -84,7 +142,7 @@
84
142
 
85
143
  * rbtree.c (rbtree_update): was same whether a block is given or not.
86
144
 
87
- 2004-05-23 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
145
+ 2004-05-23 OZAWA Takuma
88
146
 
89
147
  * rbtree.c (inspect_rbtree): add OBJ_INFECTs.
90
148
 
@@ -92,52 +150,52 @@
92
150
 
93
151
  * rbtree.c (pp_block): ditto.
94
152
 
95
- 2004-04-26 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
153
+ 2004-04-26 OZAWA Takuma
96
154
 
97
155
  * rbtree.c (rbtree_s_create): accept Hash argument.
98
156
 
99
157
  * rbtree.c (rbtree_s_create): should just copy keys and values.
100
158
 
101
- 2004-02-19 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
159
+ 2004-02-19 OZAWA Takuma
102
160
 
103
161
  * rbtree.c (pp_object_group): use id_object_group.
104
162
 
105
- 2004-02-16 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
163
+ 2004-02-16 OZAWA Takuma
106
164
 
107
165
  * version 0.1.1 release.
108
166
 
109
- 2004-02-13 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
167
+ 2004-02-13 OZAWA Takuma
110
168
 
111
169
  * README: rewritten.
112
170
 
113
171
  * rbtree.c (document): incomplete document for rdoc.
114
172
 
115
- 2004-02-08 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
173
+ 2004-02-08 OZAWA Takuma
116
174
 
117
175
  * test.rb (test_pp): add pretty printing test.
118
176
 
119
- 2004-02-07 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
177
+ 2004-02-07 OZAWA Takuma
120
178
 
121
179
  * rbtree.c (rbtree_mark): should check rbtree and dict is
122
180
  initialized. Thanks to Neil Spring.
123
181
 
124
- 2004-02-05 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
182
+ 2004-02-05 OZAWA Takuma
125
183
 
126
184
  * rbtree.c (prettyprint): polish code.
127
185
 
128
186
  * test.rb (assert_raise): alias of assert_raises for Ruby 1.6.x.
129
187
 
130
- 2004-02-02 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
188
+ 2004-02-02 OZAWA Takuma
131
189
 
132
190
  * test.rb: clean code. no more RUnit support. use Test::Unit.
133
191
 
134
- 2004-01-29 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
192
+ 2004-01-29 OZAWA Takuma
135
193
 
136
194
  * rbtree.c (rbtree_dump): optimization.
137
195
 
138
196
  * rbtree.c (rbtree_s_load): ditto.
139
197
 
140
- 2004-01-27 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
198
+ 2004-01-27 OZAWA Takuma
141
199
 
142
200
  * rbtree.c (readjust): RBTree#readjust() just readjusts elements
143
201
  using current comparison block. use RBTree#readjust(nil) to set
@@ -145,7 +203,7 @@
145
203
 
146
204
  * extconf.rb (assertion): removed.
147
205
 
148
- 2004-01-14 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
206
+ 2004-01-14 OZAWA Takuma
149
207
 
150
208
  * ctest/test.c: removed.
151
209
 
@@ -155,11 +213,11 @@
155
213
 
156
214
  * ctest/Makefile: ditto.
157
215
 
158
- 2004-01-04 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
216
+ 2004-01-04 OZAWA Takuma
159
217
 
160
218
  * version 0.1.0 release.
161
219
 
162
- 2004-01-03 OZAWA Takuma <burningdowntheopera@yahoo.co.jp>
220
+ 2004-01-03 OZAWA Takuma
163
221
 
164
222
  * rbtree.c (rbtree_to_rbtree): new method.
165
223
 
@@ -173,11 +231,11 @@
173
231
  * rbtree.c (rbtree_fetch): always warn if default argument and a
174
232
  block are supplied at the same time.
175
233
 
176
- 2003-08-12 takuma ozawa <hermione@24i.net>
234
+ 2003-08-12 takuma ozawa
177
235
 
178
236
  * version 0.0.7 release.
179
237
 
180
- 2003-08-11 takuma ozawa <hermione@24i.net>
238
+ 2003-08-11 takuma ozawa
181
239
 
182
240
  * rbtree.c (rbtree_to_hash): copy default value.
183
241
 
@@ -185,7 +243,7 @@
185
243
 
186
244
  * rbtree.c (to_hash_i): optimization.
187
245
 
188
- 2003-08-09 takuma ozawa <hermione@24i.net>
246
+ 2003-08-09 takuma ozawa
189
247
 
190
248
  * rbtree.c (rbtree_merge): new method.
191
249
 
@@ -195,22 +253,22 @@
195
253
 
196
254
  * rbtree.c (rbtree_initialized_copy): rbtree_copy_object changed to.
197
255
 
198
- 2003-07-27 takuma ozawa <hermione@24i.net>
256
+ 2003-07-27 takuma ozawa
199
257
 
200
258
  * rbtree.c (rbtree_dump): new method based on Ara Howard's code.
201
259
  Thanks.
202
260
 
203
261
  * rbtree.c (rbtree_s_load): ditto.
204
262
 
205
- 2003-03-25 takuma ozawa <hermione@24i.net>
263
+ 2003-03-25 takuma ozawa
206
264
 
207
265
  * version 0.0.6 release.
208
266
 
209
- 2003-02-26 takuma ozawa <hermione@24i.net>
267
+ 2003-02-26 takuma ozawa
210
268
 
211
269
  * rbtree.c (rbtree_readjust): rbtree_modify.
212
270
 
213
- 2003-02-23 takuma ozawa <hermione@24i.net>
271
+ 2003-02-23 takuma ozawa
214
272
 
215
273
  * rbtree.c (rbtree_copy_object): use copy_i.
216
274
 
@@ -218,20 +276,20 @@
218
276
 
219
277
  * rbtree.c (rbtree_aset): not freeze a key.
220
278
 
221
- 2003-01-24 takuma ozawa <hermione@24i.net>
279
+ 2003-01-24 takuma ozawa
222
280
 
223
281
  * rbtree.c (rbtree_aset): optimization.
224
282
 
225
- 2003-01-18 takuma ozawa <hermione@24i.net>
283
+ 2003-01-18 takuma ozawa
226
284
 
227
285
  * rbtree.c (rbtree_aset): not raise an exception if a dict is
228
286
  full and the key has been contained.
229
287
 
230
- 2003-01-16 takuma ozawa <hermione@24i.net>
288
+ 2003-01-16 takuma ozawa
231
289
 
232
290
  * version 0.0.5 release.
233
291
 
234
- 2002-12-26 takuma ozawa <hermione@24i.net>
292
+ 2002-12-26 takuma ozawa
235
293
 
236
294
  * rbtree.c (rbtree_alloc): new allocation framework.
237
295
 
@@ -244,34 +302,34 @@
244
302
  * rbtree.c (rbtree_aset): fixed a memory leak occured if the
245
303
  comparison block raises an exception.
246
304
 
247
- 2002-11-24 takuma ozawa <hermione@24i.net>
305
+ 2002-11-24 takuma ozawa
248
306
 
249
307
  * rbtree.c (rbtree_pretty_print): new method.
250
308
 
251
309
  * rbtree.c (rbtree_pretty_print_cycle): new method.
252
310
 
253
- 2002-11-22 takuma ozawa <hermione@24i.net>
311
+ 2002-11-22 takuma ozawa
254
312
 
255
313
  * rbtree.c (rbtree_inspect): format changed.
256
314
 
257
315
  * rbtree.c (rbtree_user_cmp): use NUM2INT.
258
316
 
259
- 2002-10-29 takuma ozawa <hermione@24i.net>
317
+ 2002-10-29 takuma ozawa
260
318
 
261
319
  * version 0.0.4 release.
262
320
 
263
- 2002-10-18 takuma ozawa <hermione@24i.net>
321
+ 2002-10-18 takuma ozawa
264
322
 
265
323
  * extconf.rb (assertion): change name to assertion.
266
324
 
267
- 2002-10-12 takuma ozawa <hermione@24i.net>
325
+ 2002-10-12 takuma ozawa
268
326
 
269
327
  * rbtree.c (rbtree_readjust): assign Qnil to other's dict_context
270
328
  after swap.
271
329
 
272
330
  * rbtree.c (rbtree_bound): use dict_compare for range check.
273
331
 
274
- 2002-10-10 takuma ozawa <hermione@24i.net>
332
+ 2002-10-10 takuma ozawa
275
333
 
276
334
  * rbtree.c (rbtree_readjust): empty dict check.
277
335
 
@@ -294,18 +352,18 @@
294
352
  * rbtree.c (rbtree_readjust): assign Qnil to other's ifnone after
295
353
  swap.
296
354
 
297
- 2002-10-07 takuma ozawa <hermione@24i.net>
355
+ 2002-10-07 takuma ozawa
298
356
 
299
357
  * rbtree.c (rbtree_update): self assignment check.
300
358
 
301
359
  * rbtree.c (rbtree_update): replace duplicate value by return
302
360
  value of block if given.
303
361
 
304
- 2002-10-03 takuma ozawa <hermione@24i.net>
362
+ 2002-10-03 takuma ozawa
305
363
 
306
364
  * rbtree.c (rbtree_become): self assignment check.
307
365
 
308
- 2002-09-24 takuma ozawa <hermione@24i.net>
366
+ 2002-09-24 takuma ozawa
309
367
 
310
368
  * rbtree.c (rbtree_cmp_proc): new method.
311
369
 
@@ -314,11 +372,11 @@
314
372
 
315
373
  * rbtree.c (rbtree_inspect): format changed.
316
374
 
317
- 2002-09-23 takuma ozawa <hermione@24i.net>
375
+ 2002-09-23 takuma ozawa
318
376
 
319
377
  * dict.c (dict_equal): empty test must be after similar test.
320
378
 
321
- 2002-09-22 takuma ozawa <hermione@24i.net>
379
+ 2002-09-22 takuma ozawa
322
380
 
323
381
  * rbtree.c (rbtree_update): convert argument to RBTree.
324
382
 
@@ -328,13 +386,13 @@
328
386
 
329
387
  * rbtree.c (rbtree_eql): change name to rbtree_eq.
330
388
 
331
- 2002-09-20 takuma ozawa <hermione@24i.net>
389
+ 2002-09-20 takuma ozawa
332
390
 
333
391
  * rbtree.c (RBTREE_FL_COPY): removed.
334
392
 
335
393
  * ctest/test.c: rewritten in C. CppUnit is not required.
336
394
 
337
- 2002-09-18 takuma ozawa <hermione@24i.net>
395
+ 2002-09-18 takuma ozawa
338
396
 
339
397
  * depend: new file.
340
398
 
@@ -342,15 +400,15 @@
342
400
 
343
401
  * extconf.rb (inline) check for inline keyword.
344
402
 
345
- 2002-09-17 takuma ozawa <hermione@24i.net>
403
+ 2002-09-17 takuma ozawa
346
404
 
347
405
  * version 0.0.3 release.
348
406
 
349
- 2002-09-16 takuma ozawa <hermione@24i.net>
407
+ 2002-09-16 takuma ozawa
350
408
 
351
409
  * rbtree.c (rbtree_reverse_each): new method.
352
410
 
353
- 2002-09-12 takuma ozawa <hermione@24i.net>
411
+ 2002-09-12 takuma ozawa
354
412
 
355
413
  * rbtree.c (rbtree_s_create): unset RBTREE_PROC_DEFAULT if the
356
414
  argument is RBTree.
@@ -359,7 +417,7 @@
359
417
 
360
418
  * rbtree.c (version.h): not included.
361
419
 
362
- 2002-09-11 takuma ozawa <hermione@24i.net>
420
+ 2002-09-11 takuma ozawa
363
421
 
364
422
  * rbtree.c (rbtree_to_a): use OBJ_INFECT.
365
423
 
@@ -373,7 +431,7 @@
373
431
  * rbtree.c (rbtree_first_last): first or pop from empty tree
374
432
  should not return its default proc.
375
433
 
376
- 2002-09-09 takuma ozawa <hermione@24i.net>
434
+ 2002-09-09 takuma ozawa
377
435
 
378
436
  * rbtree.c (rbtree_become): new method.
379
437
 
@@ -389,30 +447,30 @@
389
447
  * rbtree.c (rbtree_equal): should check default values and
390
448
  RBTREE_PROC_DEFAULT.
391
449
 
392
- 2002-07-19 takuma ozawa <metal@mine.ne.jp>
450
+ 2002-07-19 takuma ozawa
393
451
 
394
452
  * dict.c (alloc_node): must return NULL if a memory allocation
395
453
  fails.
396
454
 
397
- 2002-07-13 takuma ozawa <metal@mine.ne.jp>
455
+ 2002-07-13 takuma ozawa
398
456
 
399
457
  * version 0.0.2 release.
400
458
 
401
- 2002-07-11 takuma ozawa <metal@mine.ne.jp>
459
+ 2002-07-11 takuma ozawa
402
460
 
403
461
  * rbtree.c (rbtree_readjust): new method.
404
462
 
405
- 2002-07-10 takuma ozawa <metal@mine.ne.jp>
463
+ 2002-07-10 takuma ozawa
406
464
 
407
465
  * dict.c (dict_clone): clone object must copy must_unfreeze
408
466
  variable.
409
467
 
410
- 2002-06-25 takuma ozawa <metal@mine.ne.jp>
468
+ 2002-06-25 takuma ozawa
411
469
 
412
470
  * dict.h (dnode_t): add must_freeze flag not to unfreeze already
413
471
  freezed object.
414
472
 
415
- 2002-06-22 takuma ozawa <metal@mine.ne.jp>
473
+ 2002-06-22 takuma ozawa
416
474
 
417
475
  * rbtree.c (rbtree_first): new method.
418
476
 
@@ -420,6 +478,6 @@
420
478
 
421
479
  * rbtree.c (rbtree_pop): new method.
422
480
 
423
- 2002-06-14 takuma ozawa <metal@mine.ne.jp>
481
+ 2002-06-14 takuma ozawa
424
482
 
425
483
  * initial release.