File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -184,3 +184,7 @@ void phper_zval_ptr_dtor_nogc(zval *zval_ptr) {
184
184
bool phper_z_refcounted_p (zval * zval_ptr ) {
185
185
return Z_REFCOUNTED_P (zval_ptr );
186
186
}
187
+
188
+ zval * phper_execute_data_call_arg (zend_execute_data * execute_data , int index ) {
189
+ return ZEND_CALL_ARG (execute_data , index );
190
+ }
Original file line number Diff line number Diff line change @@ -64,4 +64,6 @@ void phper_zval_ptr_dtor_nogc(zval *zval_ptr);
64
64
65
65
bool phper_z_refcounted_p (zval * zval_ptr );
66
66
67
+ zval * phper_execute_data_call_arg (zend_execute_data * execute_data , int index );
68
+
67
69
#endif //PHPER_PHP_WRAPPER_H
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ use std::{
17
17
collections:: { BTreeMap , HashMap } ,
18
18
convert:: TryInto ,
19
19
mem:: { transmute, zeroed} ,
20
+ os:: raw:: c_int,
20
21
str,
21
22
str:: Utf8Error ,
22
23
} ;
@@ -97,6 +98,13 @@ impl ExecuteData {
97
98
}
98
99
transmute ( arguments)
99
100
}
101
+
102
+ pub fn get_parameter ( & mut self , index : usize ) -> & mut Val {
103
+ unsafe {
104
+ let val = phper_execute_data_call_arg ( self . as_mut_ptr ( ) , index as c_int ) ;
105
+ Val :: from_mut_ptr ( val)
106
+ }
107
+ }
100
108
}
101
109
102
110
/// Wrapper of [crate::sys::zval].
You can’t perform that action at this time.
0 commit comments