@@ -917,25 +917,27 @@ static PHPDBG_COMMAND(list) /* {{{ */
917
917
return SUCCESS ;
918
918
} /* }}} */
919
919
920
- int phpdbg_call_register (phpdbg_input_t * input TSRMLS_DC ) /* {{{ */
920
+ static inline int phpdbg_call_register (phpdbg_input_t * input TSRMLS_DC ) /* {{{ */
921
921
{
922
922
phpdbg_input_t * function = input -> argv [0 ];
923
923
924
924
if (zend_hash_exists (
925
925
& PHPDBG_G (registered ), function -> string , function -> length + 1 )) {
926
926
927
927
zval fname , * fretval ;
928
- zend_fcall_info * fci = ecalloc ( 1 , sizeof ( zend_fcall_info )) ;
928
+ zend_fcall_info fci ;
929
929
930
930
ZVAL_STRINGL (& fname , function -> string , function -> length , 1 );
931
931
932
- fci -> size = sizeof (zend_fcall_info );
933
- fci -> function_table = & PHPDBG_G (registered );
934
- fci -> function_name = & fname ;
935
- fci -> symbol_table = EG (active_symbol_table );
936
- fci -> object_ptr = NULL ;
937
- fci -> retval_ptr_ptr = & fretval ;
938
- fci -> no_separation = 1 ;
932
+ memset (& fci , 0 , sizeof (zend_fcall_info ));
933
+
934
+ fci .size = sizeof (zend_fcall_info );
935
+ fci .function_table = & PHPDBG_G (registered );
936
+ fci .function_name = & fname ;
937
+ fci .symbol_table = EG (active_symbol_table );
938
+ fci .object_ptr = NULL ;
939
+ fci .retval_ptr_ptr = & fretval ;
940
+ fci .no_separation = 1 ;
939
941
940
942
if (input -> argc > 1 ) {
941
943
int param ;
@@ -954,17 +956,17 @@ int phpdbg_call_register(phpdbg_input_t *input TSRMLS_DC) /* {{{ */
954
956
param , param + 1 , input -> argv [param + 1 ]-> string );
955
957
}
956
958
957
- zend_fcall_info_args (fci , & params TSRMLS_CC );
959
+ zend_fcall_info_args (& fci , & params TSRMLS_CC );
958
960
} else {
959
- fci -> params = NULL ;
960
- fci -> param_count = 0 ;
961
+ fci . params = NULL ;
962
+ fci . param_count = 0 ;
961
963
}
962
964
963
965
phpdbg_debug (
964
966
"created %d params from %d argvuments" ,
965
- fci -> param_count , input -> argc );
967
+ fci . param_count , input -> argc );
966
968
967
- zend_call_function (fci , NULL TSRMLS_CC );
969
+ zend_call_function (& fci , NULL TSRMLS_CC );
968
970
969
971
if (fretval ) {
970
972
zend_print_zval_r (
@@ -973,12 +975,6 @@ int phpdbg_call_register(phpdbg_input_t *input TSRMLS_DC) /* {{{ */
973
975
}
974
976
975
977
zval_dtor (& fname );
976
-
977
- if (fci -> params ) {
978
- efree (fci -> params );
979
- }
980
-
981
- efree (fci );
982
978
983
979
return SUCCESS ;
984
980
}
0 commit comments