diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-06-17 18:10:44 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-06-17 18:10:44 -0700 |
commit | 72ab71667b2a9c27d1eda73aacb8b86187f317d0 (patch) | |
tree | d1092f9dbd75ddbc94db2d546a76725cb80f8b38 | |
parent | 079f9227dce2e69bd3460c783e12fa05c687b7d3 (diff) | |
download | kgio-72ab71667b2a9c27d1eda73aacb8b86187f317d0.tar.gz |
In case the toolchain can't test the feature properly or Ruby is upgraded and the symbol is added.
-rw-r--r-- | ext/kgio/ancient_ruby.h | 3 |
1 files changed, 2 insertions, 1 deletions
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 |