[redland-dev] redland/php questions

Morten Frederiksen mof-rdf at mfd-consult.dk
Fri May 6 17:13:48 BST 2005


On Tuesday 08 March 2005 16:48, Dave Beckett wrote:
> No, that sounds about right.  But I need to consider whether to do this
> for all pointer (object, char*) returns or just those that may return a
> C NULL in non-error situations.
> Maybe patching SWIG_SetPointerZval to do the ZVAL_NULL work would be
> another choice?
I have created a patch (and attached it to this issue [1] in the issue 
tracker), that does a combination of the above:

* The SWIG_ZTS_SetPointerZval is changed to handle NULL results by calling 
ZVAL_NULL, thus always returning a PHP NULL value instead of a C NULL value 
wrapped in an object.
 * All functions previously covered individually by code to the same effect 
have been restored.
 * All functions returning a string value have had the following statement 
added (where not already present): 'if (!result) result="";'.

[1] http://bugs.librdf.org/mantis/view.php?id=15


More information about the redland-dev mailing list