@@ -32,12 +32,29 @@ hashids_t *hashids_entry;
3232
3333ZEND_DECLARE_MODULE_GLOBALS (hashids )
3434
35- ZEND_BEGIN_ARG_INFO_EX ( arginfo__construct , 0 , 0 , 3 )
35+ ZEND_BEGIN_ARG_INFO ( arginfo_hashids_construct , 0 )
3636 ZEND_ARG_INFO (0 , salt )
3737 ZEND_ARG_INFO (0 , min_hash_length )
3838 ZEND_ARG_INFO (0 , alphabet )
3939ZEND_END_ARG_INFO ()
4040
41+ ZEND_BEGIN_ARG_INFO (arginfo_hashids_encode , 0 )
42+ ZEND_ARG_VARIADIC_INFO (0 , argc )
43+ ZEND_END_ARG_INFO ()
44+
45+ ZEND_BEGIN_ARG_INFO (arginfo_hashids_decode , 0 )
46+ ZEND_ARG_INFO (0 , hash )
47+ ZEND_END_ARG_INFO ()
48+
49+ ZEND_BEGIN_ARG_INFO (arginfo_hashids_encode_hex , 0 )
50+ ZEND_ARG_INFO (0 , hex_str )
51+ ZEND_END_ARG_INFO ()
52+
53+ ZEND_BEGIN_ARG_INFO (arginfo_hashids_decode_hex , 0 )
54+ ZEND_ARG_INFO (0 , hash )
55+ ZEND_END_ARG_INFO ()
56+
57+
4158PHP_INI_BEGIN ()
4259 STD_PHP_INI_ENTRY ("hashids .salt ", HASHIDS_DEFAULT_SALT , PHP_INI_ALL , OnUpdateString , salt , zend_hashids_globals , hashids_globals )
4360 STD_PHP_INI_ENTRY ("hashids .min_hash_length ", "0 ", PHP_INI_ALL , OnUpdateLong , min_hash_length , zend_hashids_globals , hashids_globals )
@@ -259,7 +276,7 @@ PHP_METHOD(hashids, encode) {
259276
260277 ZEND_HASH_FOREACH_NUM_KEY_VAL (Z_ARRVAL (args [0 ]), i , value ) {
261278 numbers [i ] = Z_LVAL_P (value );
262- }ZEND_HASH_FOREACH_END ();
279+ } ZEND_HASH_FOREACH_END ();
263280 } else {
264281 //get all the variables
265282 for (i = 0 ; i < argc ; i ++ ) {
@@ -331,11 +348,11 @@ PHP_METHOD(hashids, decodeHex) {
331348}
332349
333350static const zend_function_entry hashids_methods [] = {
334- PHP_ME (hashids , __construct , arginfo__construct , ZEND_ACC_CTOR | ZEND_ACC_PUBLIC )
335- PHP_ME (hashids , encode , NULL , ZEND_ACC_STATIC | ZEND_ACC_PUBLIC )
336- PHP_ME (hashids , decode , NULL , ZEND_ACC_STATIC | ZEND_ACC_PUBLIC )
337- PHP_ME (hashids , encodeHex , NULL , ZEND_ACC_STATIC | ZEND_ACC_PUBLIC )
338- PHP_ME (hashids , decodeHex , NULL , ZEND_ACC_STATIC | ZEND_ACC_PUBLIC )
351+ PHP_ME (hashids , __construct , arginfo_hashids_construct , ZEND_ACC_CTOR | ZEND_ACC_PUBLIC )
352+ PHP_ME (hashids , encode , arginfo_hashids_encode , ZEND_ACC_STATIC | ZEND_ACC_PUBLIC )
353+ PHP_ME (hashids , decode , arginfo_hashids_decode , ZEND_ACC_STATIC | ZEND_ACC_PUBLIC )
354+ PHP_ME (hashids , encodeHex , arginfo_hashids_encode_hex , ZEND_ACC_STATIC | ZEND_ACC_PUBLIC )
355+ PHP_ME (hashids , decodeHex , arginfo_hashids_decode_hex , ZEND_ACC_STATIC | ZEND_ACC_PUBLIC )
339356 PHP_FE_END
340357};
341358
0 commit comments