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:
parent
237d452aba
commit
ce0ec6ba6c
1 changed files with 1 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue