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) {
184184bool phper_z_refcounted_p (zval * zval_ptr ) {
185185 return Z_REFCOUNTED_P (zval_ptr );
186186}
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);
6464
6565bool phper_z_refcounted_p (zval * zval_ptr );
6666
67+ zval * phper_execute_data_call_arg (zend_execute_data * execute_data , int index );
68+
6769#endif //PHPER_PHP_WRAPPER_H
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ use std::{
1717 collections:: { BTreeMap , HashMap } ,
1818 convert:: TryInto ,
1919 mem:: { transmute, zeroed} ,
20+ os:: raw:: c_int,
2021 str,
2122 str:: Utf8Error ,
2223} ;
@@ -97,6 +98,13 @@ impl ExecuteData {
9798 }
9899 transmute ( arguments)
99100 }
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+ }
100108}
101109
102110/// Wrapper of [crate::sys::zval].
You can’t perform that action at this time.
0 commit comments