diff options
author | Charlie Savage <cfis@interserv.com> | 2006-01-13 22:27:44 +0000 |
---|---|---|
committer | Charlie Savage <cfis@interserv.com> | 2006-01-13 22:27:44 +0000 |
commit | 5ff6b71990bc4ac4639c87c2aadb6de975e98b0b (patch) | |
tree | e4993bc4c8588c8e168f23754f6bac5a2d4d0f92 /Lib/ruby/rubystrings.swg | |
parent | 231d2a5f7b9284d05aa41a7c9a17406b2d0a4a7c (diff) | |
download | swig-5ff6b71990bc4ac4639c87c2aadb6de975e98b0b.tar.gz |
Undid change to check for nil object since it was not valid because it disallowed passing null pointers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8417 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/ruby/rubystrings.swg')
-rw-r--r-- | Lib/ruby/rubystrings.swg | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/ruby/rubystrings.swg b/Lib/ruby/rubystrings.swg index ad42bee60..e7b0330ba 100644 --- a/Lib/ruby/rubystrings.swg +++ b/Lib/ruby/rubystrings.swg @@ -6,10 +6,7 @@ SWIGINTERN int SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) { - /* Check for nil object first */ - if (obj == Qnil) { - return SWIG_BADOBJ; - } else if (TYPE(obj) == T_STRING) { + if (TYPE(obj) == T_STRING) { char *cstr = rb_string_value_ptr(&(obj)); size_t size = RSTRING(obj)->len + 1; if (cptr) { |