Fix segmentation faults with directors in PHP >= 5.4

This commit is contained in:
Olly Betts 2014-09-09 13:39:30 -03:00
commit 0dd7b61c57
3 changed files with 6 additions and 3 deletions

View file

@ -153,7 +153,7 @@ SWIG_ZTS_SetPointerZval(zval *z, void *ptr, swig_type_info *type, int newobject
}
Z_SET_REFCOUNT_P(z, 1);
Z_SET_ISREF_P(z);
zend_hash_update(HASH_OF(z), (char*)"_cPtr", sizeof("_cPtr"), (void*)&resource, sizeof(zval), NULL);
zend_hash_update(HASH_OF(z), (char*)"_cPtr", sizeof("_cPtr"), (void*)&resource, sizeof(zval*), NULL);
}
return;
}