minor fixes

This commit is contained in:
Robin Appelman 2019-03-27 22:28:51 +01:00
commit 135185ca50
2 changed files with 2 additions and 2 deletions

View file

@ -57,7 +57,7 @@ impl Function {
pub fn new_with_args( pub fn new_with_args(
name: *const c_char, name: *const c_char,
handler: HandlerFunc, handler: HandlerFunc,
mut args: &'static [ArgInfo], args: &'static [ArgInfo],
) -> Function { ) -> Function {
let num_args = args.len() as u32; let num_args = args.len() as u32;
let mut args_vec = Vec::new(); let mut args_vec = Vec::new();

View file

@ -21,7 +21,7 @@ impl ExecuteData {
let offset = (size_of::<zend_execute_data>() + size_of::<zval>() - 1) / size_of::<zval>(); let offset = (size_of::<zend_execute_data>() + size_of::<zval>() - 1) / size_of::<zval>();
let self_ptr: *const zend_execute_data = &self.0; let self_ptr: *const zend_execute_data = &self.0;
unsafe { unsafe {
transmute::<_, *const ZVal>(self_ptr).add(5) transmute::<_, *const ZVal>(self_ptr).add(offset)
} }
} }