File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ use std::{
35
35
36
36
/// Wrapper of [crate::sys::zend_execute_data].
37
37
#[ repr( transparent) ]
38
- pub ( crate ) struct ExecuteData {
38
+ pub struct ExecuteData {
39
39
inner : zend_execute_data ,
40
40
}
41
41
@@ -127,18 +127,20 @@ impl ExecuteData {
127
127
unsafe { phper_zend_num_args ( self . as_ptr ( ) ) . try_into ( ) . unwrap ( ) }
128
128
}
129
129
130
+ /// Gets associated function.
130
131
pub fn func ( & self ) -> & ZendFunc {
131
132
unsafe { ZendFunc :: from_mut_ptr ( self . inner . func ) }
132
133
}
133
134
134
- # [ allow ( dead_code ) ]
135
+ /// Gets associated `$this` object if exists.
135
136
pub fn get_this ( & mut self ) -> Option < & ZObj > {
136
137
unsafe {
137
138
let val = ZVal :: from_ptr ( phper_get_this ( & mut self . inner ) ) ;
138
139
val. as_z_obj ( )
139
140
}
140
141
}
141
142
143
+ /// Gets associated mutable `$this` object if exists.
142
144
pub fn get_this_mut ( & mut self ) -> Option < & mut ZObj > {
143
145
unsafe {
144
146
let val = ZVal :: from_mut_ptr ( phper_get_this ( & mut self . inner ) ) ;
@@ -158,7 +160,7 @@ impl ExecuteData {
158
160
transmute ( arguments)
159
161
}
160
162
161
- # [ allow ( dead_code ) ]
163
+ /// Gets parameter by index.
162
164
pub fn get_parameter ( & mut self , index : usize ) -> & mut ZVal {
163
165
unsafe {
164
166
let val = phper_zend_call_var_num ( self . as_mut_ptr ( ) , index. try_into ( ) . unwrap ( ) ) ;
You can’t perform that action at this time.
0 commit comments