summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-29 09:08:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-29 09:08:18 +0000
commit40bc4f5ae4ffe325c36a49e0d3280dbee2a39cee (patch)
tree834cc2146161802fb97d89f0a747ae794048169b /ruby.h
parent3bf972993f689965c857540ec1ccc729477e8e66 (diff)
* array.c (rb_ary_become): should not free ptr if it's shared.
* eval.c (rb_alias): prohibit making an alias named "allocate" if klass is a metaclass. * string.c (rb_string_value_ptr): StringValuePtr() should never return NULL pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ruby.h b/ruby.h
index 3b74185..7829b85 100644
--- a/ruby.h
+++ b/ruby.h
@@ -211,6 +211,7 @@ void rb_check_type _((VALUE,int));
VALUE rb_str_to_str _((VALUE));
VALUE rb_string_value _((volatile VALUE*));
+char *rb_string_value_ptr _((volatile VALUE*));
#define StringValue(v) if (TYPE(v) != T_STRING) rb_string_value(&(v))
void rb_check_safe_str _((VALUE));
@@ -218,7 +219,7 @@ void rb_check_safe_str _((VALUE));
StringValue(v);\
rb_check_safe_str(v);\
} while (0)
-#define StringValuePtr(v) RSTRING((TYPE(v) == T_STRING) ? (v) : rb_string_value(&(v)))->ptr
+#define StringValuePtr(v) rb_string_value_ptr(&(v))
/* obsolete macro - use SafeStringValue(v) */
#define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))