Skip to content

Commit ab294eb

Browse files
committed
Revert "ensure param slot exists"
This reverts commit 6399c31.
1 parent 6399c31 commit ab294eb

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

phper/src/values.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ impl ExecuteData {
209209
}
210210
}
211211

212-
pub(crate) unsafe fn get_parameters_array(&mut self) -> Vec<ManuallyDrop<ZVal>> {
212+
pub unsafe fn get_parameters_array(&mut self) -> Vec<ManuallyDrop<ZVal>> {
213213
unsafe {
214214
let num_args = self.num_args();
215215
let mut arguments = vec![zeroed::<zval>(); num_args];
@@ -238,18 +238,6 @@ impl ExecuteData {
238238
ZVal::from_mut_ptr(val)
239239
}
240240
}
241-
242-
/// Ensure parameter slot exists, if not, create it and set to null.
243-
pub fn ensure_parameter_slot(&mut self, index: usize) {
244-
let num_args = self.num_args();
245-
if index >= num_args {
246-
unsafe {
247-
let params_ptr = phper_zend_call_var_num(self.as_mut_ptr(), index as i32);
248-
phper_zval_null(params_ptr);
249-
(*self.inner.func).common.num_args = (index + 1) as u32;
250-
}
251-
}
252-
}
253241
}
254242

255243
/// Wrapper of [zval].

0 commit comments

Comments
 (0)