https://wiki.php.net/phpng-upgrading
zval *smiley;
zval *flag;*/
zend_long flag;
zval *smiley;
zval *flag;*/
zend_long flag;
- zend_object_handlers bbcode_handlers;
zend_object std;
} bbcode_object;
/* True global resources - no need for thread safety here */
zend_object std;
} bbcode_object;
/* True global resources - no need for thread safety here */
+zend_object_handlers bbcode_handlers;
+
/* BBCode object */
zend_class_entry *bbcode_ce;
/* BBCode object */
zend_class_entry *bbcode_ce;
zend_object_std_init(&newobj->std, Z_OBJCE_P(obj) TSRMLS_CC);
object_properties_init(&newobj->std, Z_OBJCE_P(obj) TSRMLS_CC);
zend_object_std_init(&newobj->std, Z_OBJCE_P(obj) TSRMLS_CC);
object_properties_init(&newobj->std, Z_OBJCE_P(obj) TSRMLS_CC);
- memcpy(&newobj->bbcode_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
- newobj->bbcode_handlers.offset = XtOffsetOf(bbcode_object, std);
- newobj->bbcode_handlers.dtor_obj = (zend_object_dtor_obj_t) bbcode_destroy;
- newobj->bbcode_handlers.free_obj = (zend_object_free_obj_t) bbcode_free;
- newobj->bbcode_handlers.clone_obj = (zend_object_clone_obj_t) bbcode_clone;
-
- newobj->std.handlers = &(newobj->bbcode_handlers);
+ //newobj->std.handlers = &bbcode_handlers;
zend_objects_clone_members(&newobj->std, &oldobj->std);
zend_objects_clone_members(&newobj->std, &oldobj->std);
- memcpy(&obj->bbcode_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
- obj->bbcode_handlers.offset = XtOffsetOf(bbcode_object, std);
- obj->bbcode_handlers.dtor_obj = (zend_object_dtor_obj_t) bbcode_destroy;
- obj->bbcode_handlers.free_obj = (zend_object_free_obj_t) bbcode_free;
- obj->bbcode_handlers.clone_obj = (zend_object_clone_obj_t) bbcode_clone;
+ memcpy(&bbcode_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
+ bbcode_handlers.offset = XtOffsetOf(bbcode_object, std);
+ bbcode_handlers.dtor_obj = (zend_object_dtor_obj_t) bbcode_destroy;
+ bbcode_handlers.free_obj = (zend_object_free_obj_t) bbcode_free;
+ bbcode_handlers.clone_obj = (zend_object_clone_obj_t) bbcode_clone;
//bbcode_handlers.offset = XtOffsetOf(bbcode_object, std);
//bbcode_handlers.dtor_obj = (zend_object_dtor_obj_t) bbcode_destroy;
//bbcode_handlers.free_obj = (zend_object_free_obj_t) bbcode_free;
//bbcode_handlers.offset = XtOffsetOf(bbcode_object, std);
//bbcode_handlers.dtor_obj = (zend_object_dtor_obj_t) bbcode_destroy;
//bbcode_handlers.free_obj = (zend_object_free_obj_t) bbcode_free;
- obj->std.handlers = &(obj->bbcode_handlers);
+ obj->std.handlers = &bbcode_handlers;