diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-10-08 11:11:51 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-10-08 11:11:51 +0200 |
| commit | 5480e6b13de9ed16c98a1648c12c433202b3ebb4 (patch) | |
| tree | 6c9552fdbadc78061c40ec6b77a75db48141f88a | |
| parent | 1fba22072596c34b32fa09986107bde3b4ab946d (diff) | |
| download | php-git-5480e6b13de9ed16c98a1648c12c433202b3ebb4.tar.gz | |
Accept bool in snmp_set_(quick|enum)_print()
The integer parameter here is actually a boolean.
snmp_set_quick_print() already documented it as such, and
snmp_get_quick_print() was already returning a boolean.
| -rw-r--r-- | ext/snmp/snmp.c | 8 | ||||
| -rw-r--r-- | ext/snmp/snmp.stub.php | 4 | ||||
| -rw-r--r-- | ext/snmp/snmp_arginfo.h | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 0ca49fc208..b5a81f2dd4 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -1321,9 +1321,9 @@ PHP_FUNCTION(snmp_get_quick_print) /* {{{ Return all objects including their respective object id within the specified one */ PHP_FUNCTION(snmp_set_quick_print) { - zend_long a1; + zend_bool a1; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &a1) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &a1) == FAILURE) { RETURN_THROWS(); } @@ -1335,9 +1335,9 @@ PHP_FUNCTION(snmp_set_quick_print) /* {{{ Return all values that are enums with their enum value instead of the raw integer */ PHP_FUNCTION(snmp_set_enum_print) { - zend_long a1; + zend_bool a1; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &a1) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &a1) == FAILURE) { RETURN_THROWS(); } diff --git a/ext/snmp/snmp.stub.php b/ext/snmp/snmp.stub.php index 28cdd5f4f7..e0cdab8f04 100644 --- a/ext/snmp/snmp.stub.php +++ b/ext/snmp/snmp.stub.php @@ -17,9 +17,9 @@ function snmpset(string $host, string $community, array|string $object_id, array function snmp_get_quick_print(): bool {} -function snmp_set_quick_print(int $quick_print): bool {} +function snmp_set_quick_print(bool $quick_print): bool {} -function snmp_set_enum_print(int $enum_print): bool {} +function snmp_set_enum_print(bool $enum_print): bool {} function snmp_set_oid_output_format(int $oid_format): bool {} diff --git a/ext/snmp/snmp_arginfo.h b/ext/snmp/snmp_arginfo.h index 69d404bef7..b145870f37 100644 --- a/ext/snmp/snmp_arginfo.h +++ b/ext/snmp/snmp_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 31a125dde8e52e7849c8cd62ac410be9249a80df */ + * Stub hash: 4b1adaf7afe143328f1b05c7039fb3d974b29545 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_snmpget, 0, 3, stdClass, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_BOOL) ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0) @@ -37,11 +37,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmp_get_quick_print, 0, 0, _IS_ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmp_set_quick_print, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, quick_print, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, quick_print, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmp_set_enum_print, 0, 1, _IS_BOOL, 0) - ZEND_ARG_TYPE_INFO(0, enum_print, IS_LONG, 0) + ZEND_ARG_TYPE_INFO(0, enum_print, _IS_BOOL, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_snmp_set_oid_output_format, 0, 1, _IS_BOOL, 0) |
