Skip to content

Commit 9d2f7c1

Browse files
author
Boris Lytochkin
committed
remove method open, __construct is enough
1 parent d4ae5bd commit 9d2f7c1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ext/snmp/snmp.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ ZEND_END_ARG_INFO()
322322

323323
/* OO arginfo */
324324

325-
ZEND_BEGIN_ARG_INFO_EX(arginfo_snmp_open, 0, 0, 3)
325+
ZEND_BEGIN_ARG_INFO_EX(arginfo_snmp_create, 0, 0, 3)
326326
ZEND_ARG_INFO(0, version)
327327
ZEND_ARG_INFO(0, host)
328328
ZEND_ARG_INFO(0, community)
@@ -1687,9 +1687,9 @@ PHP_FUNCTION(snmp_read_mib)
16871687
}
16881688
/* }}} */
16891689

1690-
/* {{{ proto SNMP SNMP::open(int version, string hostname, string community|securityName [, long timeout [, long retries]])
1690+
/* {{{ proto SNMP SNMP::__construct(int version, string hostname, string community|securityName [, long timeout [, long retries]])
16911691
Creates a new SNMP session to specified host. */
1692-
PHP_METHOD(snmp, open)
1692+
PHP_METHOD(snmp, __construct)
16931693
{
16941694
php_snmp_object *snmp_object;
16951695
zval *object = getThis();
@@ -2286,7 +2286,7 @@ static int php_snmp_write_oid_output_format(php_snmp_object *snmp_object, zval *
22862286

22872287
/* {{{ php_snmp_class_methods[] */
22882288
static zend_function_entry php_snmp_class_methods[] = {
2289-
PHP_ME(snmp, open, arginfo_snmp_open, ZEND_ACC_PUBLIC)
2289+
PHP_ME(snmp, __construct, arginfo_snmp_create, ZEND_ACC_PUBLIC)
22902290
PHP_ME(snmp, close, arginfo_snmp_void, ZEND_ACC_PUBLIC)
22912291
PHP_ME(snmp, setSecurity, arginfo_snmp_setSecurity, ZEND_ACC_PUBLIC)
22922292

@@ -2297,7 +2297,6 @@ static zend_function_entry php_snmp_class_methods[] = {
22972297
PHP_ME(snmp, get_errno, arginfo_snmp_void, ZEND_ACC_PUBLIC)
22982298
PHP_ME(snmp, get_error, arginfo_snmp_void, ZEND_ACC_PUBLIC)
22992299

2300-
PHP_MALIAS(snmp, __construct, open, arginfo_snmp_open, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
23012300
{NULL, NULL, NULL}
23022301
};
23032302

0 commit comments

Comments
 (0)