Skip to content

Commit 59ae6a9

Browse files
committed
Declare HASH_HMAC in stubs
1 parent d457519 commit 59ae6a9

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

ext/hash/hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ PHP_MINIT_FUNCTION(hash)
16311631
PHP_HASH_HAVAL_REGISTER(5,224);
16321632
PHP_HASH_HAVAL_REGISTER(5,256);
16331633

1634-
REGISTER_LONG_CONSTANT("HASH_HMAC", PHP_HASH_HMAC, CONST_CS | CONST_PERSISTENT);
1634+
register_hash_consts(module_number);
16351635

16361636
php_hashcontext_ce = register_class_HashContext();
16371637
php_hashcontext_ce->create_object = php_hashcontext_create;

ext/hash/hash.stub.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
/** @generate-class-entries */
44

5+
/**
6+
* @var int
7+
* @cname PHP_HASH_HMAC
8+
*/
9+
const HASH_HMAC = UNKNOWN;
10+
511
/** @refcount 1 */
612
function hash(string $algo, string $data, bool $binary = false, array $options = []): string {}
713

ext/hash/hash_arginfo.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 8b5131fd7bd88d1ec0211bcfcb5a4854418aa3c8 */
2+
* Stub hash: 2c21ea2ab2a1f461c6a59b7c98160dac5d00b339 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash, 0, 2, IS_STRING, 0)
55
ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
@@ -210,6 +210,11 @@ static const zend_function_entry class_HashContext_methods[] = {
210210
ZEND_FE_END
211211
};
212212

213+
static void register_hash_consts(int module_number)
214+
{
215+
REGISTER_LONG_CONSTANT("HASH_HMAC", PHP_HASH_HMAC, CONST_CS | CONST_PERSISTENT);
216+
}
217+
213218
static zend_class_entry *register_class_HashContext(void)
214219
{
215220
zend_class_entry ce, *class_entry;

0 commit comments

Comments
 (0)