@@ -45,10 +45,8 @@ static zend_object_handlers v8js_v8generator_handlers;
4545#define V8JS_V8_INVOKE_FUNC_NAME " V8Js::V8::Invoke"
4646
4747/* V8 Object handlers */
48- static int v8js_v8object_has_property (SINCE80( zend_object, zval) *_object, SINCE80( zend_string, zval) *_member , int has_set_exists, void **cache_slot) /* {{{ */
48+ static int v8js_v8object_has_property (zend_object *object, zend_string *member , int has_set_exists, void **cache_slot) /* {{{ */
4949{
50- zend_object *object = SINCE80 (_object, Z_OBJ_P (_object));
51- zend_string *member = SINCE80 (_member, Z_STR_P (_member));
5250 /* param has_set_exists:
5351 * 0 (has) whether property exists and is not NULL - isset()
5452 * 1 (set) whether property exists and is true-ish - empty()
@@ -128,19 +126,16 @@ static int v8js_v8object_has_property(SINCE80(zend_object, zval) *_object, SINCE
128126}
129127/* }}} */
130128
131- static zval *v8js_v8object_read_property (SINCE80( zend_object, zval) *_object, SINCE80( zend_string, zval) *_member , int type, void **cache_slot, zval *rv) /* {{{ */
129+ static zval *v8js_v8object_read_property (zend_object *object, zend_string *member , int type, void **cache_slot, zval *rv) /* {{{ */
132130{
133- zend_object *object = SINCE80 (_object, Z_OBJ_P (_object));
134- zend_string *member = SINCE80 (_member, Z_STR_P (_member));
135-
136131 zval *retval = rv;
137132 v8js_v8object *obj = Z_V8JS_V8OBJECT_OBJ (object);
138133
139134 if (!obj->ctx )
140135 {
141136 zend_throw_exception (php_ce_v8js_exception,
142137 " Can't access V8Object after V8Js instance is destroyed!" , 0 );
143- return SINCE80 ( &EG (uninitialized_zval), retval );
138+ return &EG (uninitialized_zval);
144139 }
145140
146141 V8JS_CTX_PROLOGUE_EX (obj->ctx , retval);
@@ -152,7 +147,7 @@ static zval *v8js_v8object_read_property(SINCE80(zend_object, zval) *_object, SI
152147 {
153148 zend_throw_exception (php_ce_v8js_exception,
154149 " Member name length exceeds maximum supported length" , 0 );
155- return SINCE80 ( &EG (uninitialized_zval), retval );
150+ return &EG (uninitialized_zval);
156151 }
157152
158153 v8::Local<v8::String> jsKey = V8JS_ZSYM (member);
@@ -174,34 +169,31 @@ static zval *v8js_v8object_read_property(SINCE80(zend_object, zval) *_object, SI
174169}
175170/* }}} */
176171
177- static zval *v8js_v8object_get_property_ptr_ptr (SINCE80( zend_object, zval) *object, SINCE80( zend_string, zval) *member, int type, void **cache_slot) /* {{{ */
172+ static zval *v8js_v8object_get_property_ptr_ptr (zend_object *object, zend_string *member, int type, void **cache_slot) /* {{{ */
178173{
179174 return NULL ;
180175}
181176/* }}} */
182177
183- static SINCE74 ( zval *, void ) v8js_v8object_write_property(SINCE80( zend_object, zval) *_object, SINCE80( zend_string, zval) *_member , zval *value, void **cache_slot) /* {{{ */
178+ static zval *v8js_v8object_write_property (zend_object *object, zend_string *member , zval *value, void **cache_slot) /* {{{ */
184179{
185- zend_object *object = SINCE80 (_object, Z_OBJ_P (_object));
186- zend_string *member = SINCE80 (_member, Z_STR_P (_member));
187-
188180 v8js_v8object *obj = Z_V8JS_V8OBJECT_OBJ (object);
189181
190182 if (!obj->ctx )
191183 {
192184 zend_throw_exception (php_ce_v8js_exception,
193185 " Can't access V8Object after V8Js instance is destroyed!" , 0 );
194- return SINCE74 ( value, ) ;
186+ return value;
195187 }
196188
197- V8JS_CTX_PROLOGUE_EX (obj->ctx , SINCE74 ( value, ) );
189+ V8JS_CTX_PROLOGUE_EX (obj->ctx , value);
198190 v8::Local<v8::Value> v8objHandle = v8::Local<v8::Value>::New (isolate, obj->v8obj );
199191
200192 if (ZSTR_LEN (member) > std::numeric_limits<int >::max ())
201193 {
202194 zend_throw_exception (php_ce_v8js_exception,
203195 " Member name length exceeds maximum supported length" , 0 );
204- return SINCE74 ( value, ) ;
196+ return value;
205197 }
206198
207199 v8::Local<v8::Object> v8obj;
@@ -210,15 +202,12 @@ static SINCE74(zval *, void) v8js_v8object_write_property(SINCE80(zend_object, z
210202 v8obj->CreateDataProperty (v8_context, V8JS_ZSYM (member), zval_to_v8js (value, isolate));
211203 }
212204
213- return SINCE74 ( value, ) ;
205+ return value;
214206}
215207/* }}} */
216208
217- static void v8js_v8object_unset_property (SINCE80( zend_object, zval) *_object, SINCE80( zend_string, zval) *_member , void **cache_slot) /* {{{ */
209+ static void v8js_v8object_unset_property (zend_object *object, zend_string *member , void **cache_slot) /* {{{ */
218210{
219- zend_object *object = SINCE80 (_object, Z_OBJ_P (_object));
220- zend_string *member = SINCE80 (_member, Z_STR_P (_member));
221-
222211 v8js_v8object *obj = Z_V8JS_V8OBJECT_OBJ (object);
223212
224213 if (!obj->ctx )
@@ -246,9 +235,9 @@ static void v8js_v8object_unset_property(SINCE80(zend_object, zval) *_object, SI
246235}
247236/* }}} */
248237
249- static HashTable *v8js_v8object_get_properties (SINCE80( zend_object, zval) *object) /* {{{ */
238+ static HashTable *v8js_v8object_get_properties (zend_object *object) /* {{{ */
250239{
251- v8js_v8object *obj = SINCE80 ( Z_V8JS_V8OBJECT_OBJ, Z_V8JS_V8OBJECT_OBJ_P) (object);
240+ v8js_v8object *obj = Z_V8JS_V8OBJECT_OBJ (object);
252241
253242 if (obj->properties == NULL )
254243 {
@@ -287,7 +276,7 @@ static HashTable *v8js_v8object_get_properties(SINCE80(zend_object, zval) *objec
287276}
288277/* }}} */
289278
290- static HashTable *v8js_v8object_get_debug_info (SINCE80( zend_object, zval) *object, int *is_temp) /* {{{ */
279+ static HashTable *v8js_v8object_get_debug_info (zend_object *object, int *is_temp) /* {{{ */
291280{
292281 *is_temp = 0 ;
293282 return v8js_v8object_get_properties (object);
@@ -426,7 +415,7 @@ static ZEND_FUNCTION(zend_v8object_func)
426415static zend_function *v8js_v8object_get_method (zend_object **object_ptr, zend_string *method, const zval *key) /* {{{ */
427416{
428417 v8js_v8object *obj = v8js_v8object_fetch_object (*object_ptr);
429- SINCE80 ( zend_internal_function, zend_function) *f;
418+ zend_internal_function *f;
430419
431420 if (!obj->ctx )
432421 {
@@ -581,8 +570,8 @@ static int v8js_v8object_call_method(zend_string *method, zend_object *object, I
581570
582571static int v8js_v8object_get_closure (zend_object *object, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **zobj_ptr, bool call) /* {{{ */
583572{
584- SINCE80 ( zend_internal_function, zend_function) *invoke;
585- v8js_v8object *obj = SINCE80 ( Z_V8JS_V8OBJECT_OBJ, Z_V8JS_V8OBJECT_OBJ_P) (object);
573+ zend_internal_function *invoke;
574+ v8js_v8object *obj = Z_V8JS_V8OBJECT_OBJ (object);
586575
587576 if (!obj->ctx )
588577 {
@@ -609,7 +598,7 @@ static int v8js_v8object_get_closure(zend_object *object, zend_class_entry **ce_
609598
610599 if (zobj_ptr)
611600 {
612- *zobj_ptr = SINCE80 ( object, Z_OBJ_P (object)) ;
601+ *zobj_ptr = object;
613602 }
614603
615604 *ce_ptr = NULL ;
@@ -1034,7 +1023,6 @@ PHP_MINIT_FUNCTION(v8js_v8object_class) /* {{{ */
10341023 v8js_v8object_handlers.unset_property = v8js_v8object_unset_property;
10351024 v8js_v8object_handlers.get_properties = v8js_v8object_get_properties;
10361025 v8js_v8object_handlers.get_method = v8js_v8object_get_method;
1037- SINCE80 (, v8js_v8object_handlers.call_method = v8js_v8object_call_method);
10381026 v8js_v8object_handlers.get_debug_info = v8js_v8object_get_debug_info;
10391027 v8js_v8object_handlers.get_closure = v8js_v8object_get_closure;
10401028 v8js_v8object_handlers.offset = XtOffsetOf (struct v8js_v8object , std);
0 commit comments