PHP: Add more comments in SWIG_ZTS_SetPointerZval()
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
741b90763b
commit
ac8f104d7b
1 changed files with 6 additions and 0 deletions
|
|
@ -113,8 +113,14 @@ SWIG_ZTS_SetPointerZval(zval *z, void *ptr, swig_type_info *type, int newobject
|
|||
value->ptr=ptr;
|
||||
value->newobject=newobject;
|
||||
if (newobject <= 1) {
|
||||
/* Just register the pointer as a resource. */
|
||||
ZEND_REGISTER_RESOURCE(z, value, *(int *)(type->clientdata));
|
||||
} else {
|
||||
/*
|
||||
* Wrap the resource in an object, the resource will be accessible
|
||||
* via the "_cPtr" member. This is currently only used by
|
||||
* directorin typemaps.
|
||||
*/
|
||||
value->newobject = 0;
|
||||
zval *resource;
|
||||
MAKE_STD_ZVAL(resource);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue