Skip to content

Commit 3b9fadf

Browse files
committed
Convert OpenSSL X.509 Certificate resource to object
1 parent 371e29e commit 3b9fadf

23 files changed

+548
-360
lines changed

Zend/zend_API.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1601,6 +1601,9 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num
16011601
#define Z_PARAM_PATH(dest, dest_len) \
16021602
Z_PARAM_PATH_EX(dest, dest_len, 0, 0)
16031603

1604+
#define Z_PARAM_PATH_OR_NULL(dest, dest_len) \
1605+
Z_PARAM_PATH_EX(dest, dest_len, 1, 0)
1606+
16041607
/* old "P" */
16051608
#define Z_PARAM_PATH_STR_EX2(dest, check_null, deref, separate) \
16061609
Z_PARAM_PROLOGUE(deref, separate); \
@@ -1681,6 +1684,9 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num
16811684
#define Z_PARAM_ZVAL(dest) \
16821685
Z_PARAM_ZVAL_EX(dest, 0, 0)
16831686

1687+
#define Z_PARAM_ZVAL_OR_NULL(dest) \
1688+
Z_PARAM_ZVAL_EX(dest, 1, 0)
1689+
16841690
/* old "+" and "*" */
16851691
#define Z_PARAM_VARIADIC_EX(spec, dest, dest_num, post_varargs) do { \
16861692
uint32_t _num_varargs = _num_args - _i - (post_varargs); \
@@ -2007,7 +2013,8 @@ static zend_always_inline int zend_parse_arg_str_or_obj(
20072013
) {
20082014
if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) {
20092015
if (base_ce && UNEXPECTED(!instanceof_function(Z_OBJCE_P(arg), base_ce))) {
2010-
return 0;
2016+
*destination_object = NULL;
2017+
return zend_parse_arg_str_slow(arg, destination_string);
20112018
}
20122019

20132020
*destination_string = NULL;

0 commit comments

Comments
 (0)