diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-06 16:53:56 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-06 16:53:56 -0700 |
commit | 4c76c7c4b63ca7c47e9b19253f737b3548843cae (patch) | |
tree | 29519c928662c846f7c599b04441dd656d917878 | |
parent | 7b4e67b990e0b92b0843223f3f6ab2269cca668d (diff) | |
download | rpatricia-4c76c7c4b63ca7c47e9b19253f737b3548843cae.tar.gz |
STR2CSTR with StringValuePtr for Ruby 1.9.2
STR2CSTR has been deprecated for a while now, and is completely removed in Ruby 1.9.2-preview3
-rw-r--r-- | ext/rpatricia/rpatricia.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/rpatricia/rpatricia.c b/ext/rpatricia/rpatricia.c index 0fc1002..854c5cd 100644 --- a/ext/rpatricia/rpatricia.c +++ b/ext/rpatricia/rpatricia.c @@ -42,7 +42,7 @@ p_add (int argc, VALUE *argv, VALUE self) return Qnil; Data_Get_Struct(self, patricia_tree_t, tree); - prefix = ascii2prefix(AF_INET, STR2CSTR(argv[0])); + prefix = ascii2prefix(AF_INET, StringValuePtr(argv[0])); node = patricia_lookup(tree, prefix); Deref_Prefix(prefix); @@ -70,7 +70,7 @@ p_remove (VALUE self, VALUE r_key) prefix_t *prefix; Data_Get_Struct(self, patricia_tree_t, tree); - c_key = STR2CSTR(r_key); + c_key = StringValuePtr(r_key); prefix = ascii2prefix (AF_INET, c_key); node = patricia_search_exact(tree, prefix); Deref_Prefix (prefix); @@ -91,7 +91,7 @@ p_match (VALUE self, VALUE r_key) prefix_t *prefix; Data_Get_Struct(self, patricia_tree_t, tree); - prefix = ascii2prefix (AF_INET, STR2CSTR(r_key)); + prefix = ascii2prefix (AF_INET, StringValuePtr(r_key)); node = patricia_search_best(tree, prefix); Deref_Prefix (prefix); @@ -110,7 +110,7 @@ p_match_exact (VALUE self, VALUE r_key) prefix_t *prefix; Data_Get_Struct(self, patricia_tree_t, tree); - prefix = ascii2prefix (AF_INET, STR2CSTR(r_key)); + prefix = ascii2prefix (AF_INET, StringValuePtr(r_key)); node = patricia_search_exact(tree, prefix); Deref_Prefix (prefix); |