Only in amatch-0.2.3.patched/ext: Makefile Only in amatch-0.2.3.patched/ext: amatch.bundle diff -ubr amatch-0.2.3/ext/amatch.c amatch-0.2.3.patched/ext/amatch.c --- amatch-0.2.3/ext/amatch.c 2009-02-22 22:00:20.000000000 -0800 +++ amatch-0.2.3.patched/ext/amatch.c 2009-02-22 21:51:48.000000000 -0800 @@ -62,10 +62,10 @@ { \ Check_Type(pattern, T_STRING); \ free(amatch->pattern); \ - amatch->pattern_len = RSTRING(pattern)->len; \ + amatch->pattern_len = RSTRING_LEN(pattern); \ amatch->pattern = ALLOC_N(char, amatch->pattern_len); \ - MEMCPY(amatch->pattern, RSTRING(pattern)->ptr, char, \ - RSTRING(pattern)->len); \ + MEMCPY(amatch->pattern, RSTRING_PTR(pattern), char, \ + RSTRING_LEN(pattern)); \ } \ static VALUE rb_##type##_pattern(VALUE self) \ { \ @@ -88,8 +88,8 @@ } else { \ Check_Type(strings, T_ARRAY); \ int i; \ - VALUE result = rb_ary_new2(RARRAY(strings)->len); \ - for (i = 0; i < RARRAY(strings)->len; i++) { \ + VALUE result = rb_ary_new2(RARRAY_LEN(strings)); \ + for (i = 0; i < RARRAY_LEN(strings); i++) { \ VALUE string = rb_ary_entry(strings, i); \ if (TYPE(string) != T_STRING) { \ rb_raise(rb_eTypeError, \ @@ -130,17 +130,17 @@ obj = rb_funcall(obj, id_to_f, 0, 0); \ else \ Check_Type(obj, T_FLOAT) -#define FLOAT2C(obj) RFLOAT(obj)->value +#define FLOAT2C(obj) RFLOAT_VALUE(obj) #define OPTIMIZE_TIME \ - if (amatch->pattern_len < RSTRING(string)->len) { \ + if (amatch->pattern_len < RSTRING_LEN(string)) { \ a_ptr = amatch->pattern; \ a_len = amatch->pattern_len; \ - b_ptr = RSTRING(string)->ptr; \ - b_len = RSTRING(string)->len; \ + b_ptr = RSTRING_PTR(string); \ + b_len = RSTRING_LEN(string); \ } else { \ - a_ptr = RSTRING(string)->ptr; \ - a_len = RSTRING(string)->len; \ + a_ptr = RSTRING_PTR(string); \ + a_len = RSTRING_LEN(string); \ b_ptr = amatch->pattern; \ b_len = amatch->pattern_len; \ } @@ -148,8 +148,8 @@ #define DONT_OPTIMIZE \ a_ptr = amatch->pattern; \ a_len = amatch->pattern_len; \ - b_ptr = RSTRING(string)->ptr; \ - b_len = RSTRING(string)->len; \ + b_ptr = RSTRING_PTR(string); \ + b_len = RSTRING_LEN(string); \ /* * C structures of the Amatch classes @@ -951,8 +951,8 @@ } else { Check_Type(strings, T_ARRAY); int i; - result = rb_ary_new2(RARRAY(strings)->len); - for (i = 0; i < RARRAY(strings)->len; i++) { + result = rb_ary_new2(RARRAY_LEN(strings)); + for (i = 0; i < RARRAY_LEN(strings); i++) { VALUE string = rb_ary_entry(strings, i); if (TYPE(string) != T_STRING) { rb_raise(rb_eTypeError, Only in amatch-0.2.3.patched/ext: amatch.o Only in amatch-0.2.3.patched/ext: gem_make.out diff -ubr amatch-0.2.3/ext/pair.c amatch-0.2.3.patched/ext/pair.c --- amatch-0.2.3/ext/pair.c 2009-02-22 22:00:20.000000000 -0800 +++ amatch-0.2.3.patched/ext/pair.c 2009-02-22 21:53:16.000000000 -0800 @@ -5,9 +5,9 @@ static int predict_length(VALUE tokens) { int i, l, result; - for (i = 0, result = 0; i < RARRAY(tokens)->len; i++) { + for (i = 0, result = 0; i < RARRAY_LEN(tokens); i++) { VALUE t = rb_ary_entry(tokens, i); - l = RSTRING(t)->len - 1; + l = RSTRING_LEN(t) - 1; if (l > 0) result += l; } return result; @@ -21,10 +21,10 @@ MEMZERO(pairs, Pair, len); pair_array->pairs = pairs; pair_array->len = len; - for (i = 0, k = 0; i < RARRAY(tokens)->len; i++) { + for (i = 0, k = 0; i < RARRAY_LEN(tokens); i++) { VALUE t = rb_ary_entry(tokens, i); - char *string = RSTRING(t)->ptr; - for (j = 0; j < RSTRING(t)->len - 1; j++) { + char *string = RSTRING_PTR(t); + for (j = 0; j < RSTRING_LEN(t) - 1; j++) { pairs[k].fst = string[j]; pairs[k].snd = string[j + 1]; pairs[k].status = PAIR_ACTIVE; Only in amatch-0.2.3.patched/ext: pair.o diff -ubr amatch-0.2.3/ext/tags amatch-0.2.3.patched/ext/tags --- amatch-0.2.3/ext/tags 2009-02-22 22:00:20.000000000 -0800 +++ amatch-0.2.3.patched/ext/tags 2009-02-22 21:51:48.000000000 -0800 @@ -6,7 +6,7 @@ DEF_RB_FREE amatch.c /^#define DEF_RB_FREE(klass, type) / DEF_RB_READER amatch.c /^#define DEF_RB_READER(type, function, name, conver/ DEF_RB_WRITER amatch.c /^#define DEF_RB_WRITER(type, function, name, vtype,/ -FLOAT2C amatch.c /^#define FLOAT2C(obj) RFLOAT(obj)->value$/ +FLOAT2C amatch.c /^#define FLOAT2C(obj) RFLOAT_VALUE(obj)$/ GET_STRUCT amatch.c /^#define GET_STRUCT(klass) \\$/ Init_amatch amatch.c /^void Init_amatch()$/ Levenshtein_search amatch.c /^static VALUE Levenshtein_search(Levenshtein *amatc/ Only in amatch-0.2.3.patched: pkg