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::{
3535
3636/// Wrapper of [crate::sys::zend_execute_data].
3737#[ repr( transparent) ]
38- pub ( crate ) struct ExecuteData {
38+ pub struct ExecuteData {
3939 inner : zend_execute_data ,
4040}
4141
@@ -127,18 +127,20 @@ impl ExecuteData {
127127 unsafe { phper_zend_num_args ( self . as_ptr ( ) ) . try_into ( ) . unwrap ( ) }
128128 }
129129
130+ /// Gets associated function.
130131 pub fn func ( & self ) -> & ZendFunc {
131132 unsafe { ZendFunc :: from_mut_ptr ( self . inner . func ) }
132133 }
133134
134- # [ allow ( dead_code ) ]
135+ /// Gets associated `$this` object if exists.
135136 pub fn get_this ( & mut self ) -> Option < & ZObj > {
136137 unsafe {
137138 let val = ZVal :: from_ptr ( phper_get_this ( & mut self . inner ) ) ;
138139 val. as_z_obj ( )
139140 }
140141 }
141142
143+ /// Gets associated mutable `$this` object if exists.
142144 pub fn get_this_mut ( & mut self ) -> Option < & mut ZObj > {
143145 unsafe {
144146 let val = ZVal :: from_mut_ptr ( phper_get_this ( & mut self . inner ) ) ;
@@ -158,7 +160,7 @@ impl ExecuteData {
158160 transmute ( arguments)
159161 }
160162
161- # [ allow ( dead_code ) ]
163+ /// Gets parameter by index.
162164 pub fn get_parameter ( & mut self , index : usize ) -> & mut ZVal {
163165 unsafe {
164166 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