summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-20 17:17:52 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-20 17:17:52 +0000
commite4de8e756634e95ff3cdbd7563153bc8270fca2e (patch)
tree5c3201101689d42be50fa18dae58fa326cf296f3 /ruby.h
parent6a867d33b5aa4ed67800cd64fe19d2902250bd96 (diff)
* string.c: use StringValueCStr to retrieve paths to system calls.
* string.c (rb_string_value_cstr): check null byte in the string before retrieving C ptr. accessed via macro StringValueCStr. * file.c (sys_fail2): raise error for two operand system calls such as rename, link, symlink. (ruby-bugs PR#1047) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ruby.h b/ruby.h
index ee6f572..a09529b 100644
--- a/ruby.h
+++ b/ruby.h
@@ -213,9 +213,11 @@ 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*));
+char *rb_string_value_cstr _((volatile VALUE*));
#define StringValue(v) rb_string_value(&(v))
#define StringValuePtr(v) rb_string_value_ptr(&(v))
+#define StringValueCStr(v) rb_string_value_cstr(&(v))
void rb_check_safe_obj _((VALUE));
void rb_check_safe_str _((VALUE));