23 Jul 14:41
[ swig-Bugs-2025719 ] Inconsistent behavior of null/NULL
From: SourceForge.net <noreply <at> sourceforge.net>
Subject: [ swig-Bugs-2025719 ] Inconsistent behavior of null/NULL
Newsgroups: gmane.comp.programming.swig.devel
Date: 2008-07-23 12:44:50 GMT
Subject: [ swig-Bugs-2025719 ] Inconsistent behavior of null/NULL
Newsgroups: gmane.comp.programming.swig.devel
Date: 2008-07-23 12:44:50 GMT
Bugs item #2025719, was opened at 2008-07-23 14:44 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2025719&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: php Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Martin Mares (mares) Assigned to: kruland (kruland) Summary: Inconsistent behavior of null/NULL Initial Comment: When a C function returning a `char *' returns a NULL pointer, it is translated to the null value in PHP. However, in the opposite direction the null value gets translated to an empty string. This is both inconvenient and inconsistent with the handling of NULL in the generated wrappers for other languages (e.g., in Python). I suggest modifying the default input typemap as follows: %typemap(in) char * { if ((*$input)->type == IS_NULL) { $1 = NULL;(Continue reading)
RSS Feed