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@8417 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Charlie Savage 2006-01-13 22:27:44 +00:00
commit ce0ec6ba6c

View file

@ -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) {