From: Raphaƫl Gertz Date: Tue, 26 Jun 2018 08:50:23 +0000 (+0200) Subject: Add debug X-Git-Url: https://git.rapsys.eu/bbcode/commitdiff_plain/a839ba5c656f9f48513336ad63a269acde468786?hp=c6546ba7c986db18ac9e22d17b1d7075b8f3416c Add debug --- diff --git a/bbcode.c b/bbcode.c index 8c15a10..863d84f 100644 --- a/bbcode.c +++ b/bbcode.c @@ -110,6 +110,8 @@ static zend_object *bbcode_clone(zval *obj TSRMLS_DC) { bbcode_object *oldobj = (bbcode_object *)((char *)obj - XtOffsetOf(bbcode_object, std)); + printf("bbcode_clone=%d\n", sizeof(bbcode_object) + zend_object_properties_size(Z_OBJCE_P(obj))); + bbcode_object *newobj = ecalloc(1, sizeof(bbcode_object) + zend_object_properties_size(Z_OBJCE_P(obj))); zend_object_std_init(&newobj->std, Z_OBJCE_P(obj) TSRMLS_CC); @@ -165,6 +167,8 @@ static zend_object_value bbcode_clone(zval *obj TSRMLS_DC) #endif static zend_object *bbcode_create(zend_class_entry *ce TSRMLS_DC) { + printf("bbcode_clone=%d\n", sizeof(bbcode_object) + zend_object_properties_size(ce)); + bbcode_object *obj = ecalloc(1, sizeof(bbcode_object) + zend_object_properties_size(ce));//emalloc(sizeof(bbcode_object)); obj->flag = 0; //memset(obj, 0, sizeof(bbcode_object));