Skip to content

Commit 99928db

Browse files
committed
php8 support
1 parent 64ce5ff commit 99928db

File tree

4 files changed

+64
-6
lines changed

4 files changed

+64
-6
lines changed

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
*.lo
2+
*.la
3+
.libs
4+
acinclude.m4
5+
aclocal.m4
6+
autom4te.cache
7+
build
8+
config.guess
9+
config.h
10+
config.h.in
11+
config.log
12+
config.nice
13+
config.status
14+
config.sub
15+
configure
16+
configure.ac
17+
configure.in
18+
include
19+
install-sh
20+
libtool
21+
ltmain.sh
22+
Makefile
23+
Makefile.fragments
24+
Makefile.global
25+
Makefile.objects
26+
missing
27+
mkinstalldirs
28+
modules
29+
php_test_results_*.txt
30+
phpt.*
31+
run-test-info.php
32+
run-tests.php
33+
tests/**/*.diff
34+
tests/**/*.out
35+
tests/**/*.php
36+
tests/**/*.exp
37+
tests/**/*.log
38+
tests/**/*.sh
39+
tests/**/*.db
40+
tests/**/*.mem
41+
tmp-php.ini

php_murmurhash3.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "php_ini.h"
2121
#include "ext/standard/info.h"
2222
#include "php_murmurhash3.h"
23+
#include "php_murmurhash3_arginfo.h"
2324

2425
#include "MurmurHash3.h"
2526

@@ -80,15 +81,10 @@ PHP_FUNCTION(murmurhash3)
8081
}
8182

8283

83-
const zend_function_entry murmurhash3_functions[] = {
84-
PHP_FE(murmurhash3, NULL)
85-
PHP_FE_END
86-
};
87-
8884
zend_module_entry murmurhash3_module_entry = {
8985
STANDARD_MODULE_HEADER,
9086
PHP_MURMURHASH3_EXTNAME,
91-
murmurhash3_functions,
87+
ext_functions,
9288
NULL,
9389
NULL,
9490
NULL,

php_murmurhash3.stub.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
/** @generate-class-entries */
4+
5+
function murmurhash3(string $str, int $seed = 0): string {}

php_murmurhash3_arginfo.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* This is a generated file, edit the .stub.php file instead.
2+
* Stub hash: a4a8d7a4e8a21ab6c8ce2f15d24fef7c2304049a */
3+
4+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_murmurhash3, 0, 1, IS_STRING, 0)
5+
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
6+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, seed, IS_LONG, 0, "0")
7+
ZEND_END_ARG_INFO()
8+
9+
10+
ZEND_FUNCTION(murmurhash3);
11+
12+
13+
static const zend_function_entry ext_functions[] = {
14+
ZEND_FE(murmurhash3, arginfo_murmurhash3)
15+
ZEND_FE_END
16+
};

0 commit comments

Comments
 (0)