Permalink
Browse files

Use RSTRING_LEN, RSTRING_PTR (Ruby 1.9)

  • Loading branch information...
1 parent e8094ec commit b6752d6bcf0d4d259d1f94698c71f5b195439e00 @toretore committed Apr 12, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 ext/semacode.h
View
6 ext/semacode.h
@@ -19,11 +19,11 @@ typedef struct semacode_t {
#endif
#ifndef StringValuePtr
-#define StringValuePtr(s) RSTRING(RB_STRING_VALUE(s))->ptr
+#define StringValuePtr(s) RSTRING_LEN(RB_STRING_VALUE(s))
#endif
#ifndef StringValueLen
-#define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len
+#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s))
#endif
-#endif
+#endif

0 comments on commit b6752d6

Please sign in to comment.