From 72ab71667b2a9c27d1eda73aacb8b86187f317d0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 17 Jun 2011 18:10:44 -0700 Subject: ancient_ruby.h: avoid symbol clobbering In case the toolchain can't test the feature properly or Ruby is upgraded and the symbol is added. --- ext/kgio/ancient_ruby.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/kgio/ancient_ruby.h b/ext/kgio/ancient_ruby.h index 014e4b8..e85ee60 100644 --- a/ext/kgio/ancient_ruby.h +++ b/ext/kgio/ancient_ruby.h @@ -2,11 +2,12 @@ #define MISSING_ANCIENT_RUBY_H #ifndef HAVE_RB_STR_SET_LEN -static void rb_str_set_len(VALUE str, long len) +static void my_str_set_len(VALUE str, long len) { RSTRING(str)->len = len; RSTRING(str)->ptr[len] = '\0'; } +#define rb_str_set_len(str,len) my_str_set_len((str),(len)) #endif /* ! HAVE_RB_STR_SET_LEN */ #ifndef RSTRING_PTR -- cgit v1.2.3-24-ge0c7