Skip to content
This repository was archived by the owner on Dec 6, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion python_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,9 @@ python_get_method(zval **object_ptr, char *method, int method_len TSRMLS_DC)
f->scope = pip->ce;
f->fn_flags = 0;
f->prototype = NULL;
f->pass_rest_by_reference = 0;
#if PHP_VERSION_ID < 50400
f->pass_rest_by_reference = 0;
#endif
f->num_args = python_get_arg_info(func, &(f->arg_info) TSRMLS_CC);

Py_DECREF(func);
Expand Down
12 changes: 9 additions & 3 deletions python_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,15 @@ python_object_create(zend_class_entry *ce TSRMLS_DC)
pip->ce = ce;

zend_object_std_init(&pip->base, ce TSRMLS_CC);
zend_hash_copy(pip->base.properties, &ce->default_properties,
(copy_ctor_func_t)zval_add_ref,
(void *) &tmp, sizeof(zval *));

#if PHP_VERSION_ID < 50399
zend_hash_copy(pip->base.properties, &ce->default_properties,
(copy_ctor_func_t)zval_add_ref,
(void *) &tmp, sizeof(zval *));
#else
object_properties_init(&(pip->base), ce);
#endif


/* Add this instance to the objects store using the Zend Objects API. */
retval.handle = zend_objects_store_put(pip,
Expand Down