@@ -288,7 +288,7 @@ static jobject _java_makeObject(pval* arg TSRMLS_DC)
288
288
break ;
289
289
290
290
case IS_OBJECT :
291
- zend_hash_index_find (arg -> value . obj . properties , 0 , (void * )& handle );
291
+ zend_hash_index_find (Z_OBJPROP_P ( arg ) , 0 , (void * )& handle );
292
292
result = zend_list_find ((* handle )-> value .lval , & type );
293
293
break ;
294
294
@@ -455,7 +455,7 @@ void java_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_property_refe
455
455
456
456
jmethodID invoke = (* jenv )-> GetMethodID (jenv , JG (reflect_class ), "Invoke" ,
457
457
"(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;J)V" );
458
- zend_hash_index_find (object -> value . obj . properties , 0 , (void * * ) & handle );
458
+ zend_hash_index_find (Z_OBJPROP_P ( object ) , 0 , (void * * ) & handle );
459
459
obj = zend_list_find ((* handle )-> value .lval , & type );
460
460
method = (* jenv )-> NewStringUTF (jenv , function_name -> element .value .str .val );
461
461
result = (jlong )(long )return_value ;
@@ -529,7 +529,7 @@ static pval _java_getset_property
529
529
propName = (* jenv )-> NewStringUTF (jenv , property -> element .value .str .val );
530
530
531
531
/* get the object */
532
- zend_hash_index_find (property_reference -> object -> value . obj . properties ,
532
+ zend_hash_index_find (Z_OBJPROP_P ( property_reference -> object ) ,
533
533
0 , (void * * ) & pobject );
534
534
obj = zend_list_find ((* pobject )-> value .lval , & type );
535
535
result = (jlong )(long ) & presult ;
@@ -691,22 +691,18 @@ JNIEXPORT void JNICALL Java_net_php_reflect_setResultFromObject
691
691
pval * handle ;
692
692
693
693
if (presult -> type != IS_OBJECT ) {
694
- presult -> type = IS_OBJECT ;
695
- presult -> value .obj .ce = & java_class_entry ;
696
- ALLOC_HASHTABLE (presult -> value .obj .properties );
697
- presult -> is_ref = 1 ;
694
+ object_init_ex (presult , & java_class_entry );
695
+ presult -> is_ref = 1 ;
698
696
presult -> refcount = 1 ;
699
- zend_hash_init (presult -> value .obj .properties , 0 , NULL , ZVAL_PTR_DTOR , 0 );
700
- };
697
+ }
701
698
702
699
ALLOC_ZVAL (handle );
703
700
handle -> type = IS_LONG ;
704
701
handle -> value .lval =
705
702
zend_list_insert ((* jenv )-> NewGlobalRef (jenv , value ), le_jobject );
706
703
pval_copy_constructor (handle );
707
704
INIT_PZVAL (handle );
708
- zend_hash_index_update (presult -> value .obj .properties , 0 ,
709
- & handle , sizeof (pval * ), NULL );
705
+ zend_hash_index_update (Z_OBJPROP_P (presult ), 0 , & handle , sizeof (pval * ), NULL );
710
706
}
711
707
712
708
JNIEXPORT void JNICALL Java_net_php_reflect_setResultFromArray
0 commit comments