summaryrefslogtreecommitdiff
path: root/Lib/ruby/rubystrings.swg
diff options
context:
space:
mode:
authorCharlie Savage <cfis@interserv.com>2006-01-13 22:27:44 +0000
committerCharlie Savage <cfis@interserv.com>2006-01-13 22:27:44 +0000
commit5ff6b71990bc4ac4639c87c2aadb6de975e98b0b (patch)
treee4993bc4c8588c8e168f23754f6bac5a2d4d0f92 /Lib/ruby/rubystrings.swg
parent231d2a5f7b9284d05aa41a7c9a17406b2d0a4a7c (diff)
downloadswig-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.swg5
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) {