@@ -45,10 +45,8 @@ static zend_object_handlers v8js_v8generator_handlers;
45
45
#define V8JS_V8_INVOKE_FUNC_NAME " V8Js::V8::Invoke"
46
46
47
47
/* 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) /* {{{ */
49
49
{
50
- zend_object *object = SINCE80 (_object, Z_OBJ_P (_object));
51
- zend_string *member = SINCE80 (_member, Z_STR_P (_member));
52
50
/* param has_set_exists:
53
51
* 0 (has) whether property exists and is not NULL - isset()
54
52
* 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
128
126
}
129
127
/* }}} */
130
128
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) /* {{{ */
132
130
{
133
- zend_object *object = SINCE80 (_object, Z_OBJ_P (_object));
134
- zend_string *member = SINCE80 (_member, Z_STR_P (_member));
135
-
136
131
zval *retval = rv;
137
132
v8js_v8object *obj = Z_V8JS_V8OBJECT_OBJ (object);
138
133
139
134
if (!obj->ctx )
140
135
{
141
136
zend_throw_exception (php_ce_v8js_exception,
142
137
" Can't access V8Object after V8Js instance is destroyed!" , 0 );
143
- return SINCE80 ( &EG (uninitialized_zval), retval );
138
+ return &EG (uninitialized_zval);
144
139
}
145
140
146
141
V8JS_CTX_PROLOGUE_EX (obj->ctx , retval);
@@ -152,7 +147,7 @@ static zval *v8js_v8object_read_property(SINCE80(zend_object, zval) *_object, SI
152
147
{
153
148
zend_throw_exception (php_ce_v8js_exception,
154
149
" Member name length exceeds maximum supported length" , 0 );
155
- return SINCE80 ( &EG (uninitialized_zval), retval );
150
+ return &EG (uninitialized_zval);
156
151
}
157
152
158
153
v8::Local<v8::String> jsKey = V8JS_ZSYM (member);
@@ -174,34 +169,31 @@ static zval *v8js_v8object_read_property(SINCE80(zend_object, zval) *_object, SI
174
169
}
175
170
/* }}} */
176
171
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) /* {{{ */
178
173
{
179
174
return NULL ;
180
175
}
181
176
/* }}} */
182
177
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) /* {{{ */
184
179
{
185
- zend_object *object = SINCE80 (_object, Z_OBJ_P (_object));
186
- zend_string *member = SINCE80 (_member, Z_STR_P (_member));
187
-
188
180
v8js_v8object *obj = Z_V8JS_V8OBJECT_OBJ (object);
189
181
190
182
if (!obj->ctx )
191
183
{
192
184
zend_throw_exception (php_ce_v8js_exception,
193
185
" Can't access V8Object after V8Js instance is destroyed!" , 0 );
194
- return SINCE74 ( value, ) ;
186
+ return value;
195
187
}
196
188
197
- V8JS_CTX_PROLOGUE_EX (obj->ctx , SINCE74 ( value, ) );
189
+ V8JS_CTX_PROLOGUE_EX (obj->ctx , value);
198
190
v8::Local<v8::Value> v8objHandle = v8::Local<v8::Value>::New (isolate, obj->v8obj );
199
191
200
192
if (ZSTR_LEN (member) > std::numeric_limits<int >::max ())
201
193
{
202
194
zend_throw_exception (php_ce_v8js_exception,
203
195
" Member name length exceeds maximum supported length" , 0 );
204
- return SINCE74 ( value, ) ;
196
+ return value;
205
197
}
206
198
207
199
v8::Local<v8::Object> v8obj;
@@ -210,15 +202,12 @@ static SINCE74(zval *, void) v8js_v8object_write_property(SINCE80(zend_object, z
210
202
v8obj->CreateDataProperty (v8_context, V8JS_ZSYM (member), zval_to_v8js (value, isolate));
211
203
}
212
204
213
- return SINCE74 ( value, ) ;
205
+ return value;
214
206
}
215
207
/* }}} */
216
208
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) /* {{{ */
218
210
{
219
- zend_object *object = SINCE80 (_object, Z_OBJ_P (_object));
220
- zend_string *member = SINCE80 (_member, Z_STR_P (_member));
221
-
222
211
v8js_v8object *obj = Z_V8JS_V8OBJECT_OBJ (object);
223
212
224
213
if (!obj->ctx )
@@ -246,9 +235,9 @@ static void v8js_v8object_unset_property(SINCE80(zend_object, zval) *_object, SI
246
235
}
247
236
/* }}} */
248
237
249
- static HashTable *v8js_v8object_get_properties (SINCE80( zend_object, zval) *object) /* {{{ */
238
+ static HashTable *v8js_v8object_get_properties (zend_object *object) /* {{{ */
250
239
{
251
- v8js_v8object *obj = SINCE80 ( Z_V8JS_V8OBJECT_OBJ, Z_V8JS_V8OBJECT_OBJ_P) (object);
240
+ v8js_v8object *obj = Z_V8JS_V8OBJECT_OBJ (object);
252
241
253
242
if (obj->properties == NULL )
254
243
{
@@ -287,7 +276,7 @@ static HashTable *v8js_v8object_get_properties(SINCE80(zend_object, zval) *objec
287
276
}
288
277
/* }}} */
289
278
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) /* {{{ */
291
280
{
292
281
*is_temp = 0 ;
293
282
return v8js_v8object_get_properties (object);
@@ -426,7 +415,7 @@ static ZEND_FUNCTION(zend_v8object_func)
426
415
static zend_function *v8js_v8object_get_method (zend_object **object_ptr, zend_string *method, const zval *key) /* {{{ */
427
416
{
428
417
v8js_v8object *obj = v8js_v8object_fetch_object (*object_ptr);
429
- SINCE80 ( zend_internal_function, zend_function) *f;
418
+ zend_internal_function *f;
430
419
431
420
if (!obj->ctx )
432
421
{
@@ -581,8 +570,8 @@ static int v8js_v8object_call_method(zend_string *method, zend_object *object, I
581
570
582
571
static int v8js_v8object_get_closure (zend_object *object, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **zobj_ptr, bool call) /* {{{ */
583
572
{
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);
586
575
587
576
if (!obj->ctx )
588
577
{
@@ -609,7 +598,7 @@ static int v8js_v8object_get_closure(zend_object *object, zend_class_entry **ce_
609
598
610
599
if (zobj_ptr)
611
600
{
612
- *zobj_ptr = SINCE80 ( object, Z_OBJ_P (object)) ;
601
+ *zobj_ptr = object;
613
602
}
614
603
615
604
*ce_ptr = NULL ;
@@ -1034,7 +1023,6 @@ PHP_MINIT_FUNCTION(v8js_v8object_class) /* {{{ */
1034
1023
v8js_v8object_handlers.unset_property = v8js_v8object_unset_property;
1035
1024
v8js_v8object_handlers.get_properties = v8js_v8object_get_properties;
1036
1025
v8js_v8object_handlers.get_method = v8js_v8object_get_method;
1037
- SINCE80 (, v8js_v8object_handlers.call_method = v8js_v8object_call_method);
1038
1026
v8js_v8object_handlers.get_debug_info = v8js_v8object_get_debug_info;
1039
1027
v8js_v8object_handlers.get_closure = v8js_v8object_get_closure;
1040
1028
v8js_v8object_handlers.offset = XtOffsetOf (struct v8js_v8object , std);
0 commit comments