Created
March 23, 2009 16:08
-
-
Save toto/83624 to your computer and use it in GitHub Desktop.
Patch to make the levenshtein gem ruby 1.9 compatible
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3,9d2 | |
< /* Ruby 1.8 compatibility macros, these are defined in Ruby 1.9 | |
< so the ones below will only be used in 1.8.x */ | |
< #ifndef RSTRING_PTR | |
< # define RSTRING_PTR(s) (RSTRING(s)->ptr) | |
< # define RSTRING_LEN(s) (RSTRING(s)->len) | |
< #endif | |
< | |
22,23c15,16 | |
< s1 = RSTRING_PTR(rb_s1); | |
< l1 = RSTRING_LEN(rb_s1); | |
--- | |
> s1 = RSTRING(rb_s1)->ptr; | |
> l1 = RSTRING(rb_s1)->len; | |
28,29c21,22 | |
< s2 = RSTRING_PTR(rb_s2); | |
< l2 = RSTRING_LEN(rb_s2); | |
--- | |
> s2 = RSTRING(rb_s2)->ptr; | |
> l2 = RSTRING(rb_s2)->len; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment