Skip to content

Commit 2622355

Browse files
committed
Use ‘simdjson-plus’ for package name.
Reduces confusion and conflicts with the simdjson PECL package, which doesn’t seem to be actively maintained.
1 parent 2838544 commit 2622355

File tree

8 files changed

+22
-18
lines changed

8 files changed

+22
-18
lines changed

config.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if test "$PHP_SIMDJSON" != "no"; then
3131
AC_DEFINE(HAVE_SIMDJSON, 1, [whether simdjson is enabled])
3232
dnl Disable exceptions because PHP is written in C and loads this C++ module, handle errors manually.
3333
dnl Disable development checks of C simdjson library in php debug builds (can manually override)
34-
PHP_NEW_EXTENSION(simdjson, [
34+
PHP_NEW_EXTENSION(simdjson_plus, [
3535
php_simdjson.cpp \
3636
src/simdjson_decoder.cpp \
3737
src/countlut.cpp \
@@ -40,7 +40,7 @@ if test "$PHP_SIMDJSON" != "no"; then
4040
src/simdjson.cpp],
4141
$ext_shared,, "-std=c++17 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1", cxx)
4242

43-
PHP_INSTALL_HEADERS([ext/simdjson], [php_simdjson.h src/simdjson_decoder_defs.h])
43+
PHP_INSTALL_HEADERS([ext/simdjson_plus], [php_simdjson.h src/simdjson_decoder_defs.h])
4444
PHP_ADD_MAKEFILE_FRAGMENT
4545
PHP_ADD_BUILD_DIR(src, 1)
4646
fi

php_simdjson.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -678,13 +678,17 @@ PHP_RSHUTDOWN_FUNCTION (simdjson) {
678678
PHP_MINFO_FUNCTION (simdjson) {
679679
php_info_print_table_start();
680680

681-
php_info_print_table_row(2, "simdjson support", "enabled");
682-
php_info_print_table_row(2, "Version", PHP_SIMDJSON_VERSION);
683-
php_info_print_table_row(2, "Support", SIMDJSON_SUPPORT_URL);
681+
const simdutf::implementation *simdutf_impl = simdutf::get_active_implementation();
682+
683+
php_info_print_table_row(2, "simdjson-plus", "enabled");
684+
php_info_print_table_row(2, "simdjson-plus support", SIMDJSON_PLUS_SUPPORT_URL);
685+
php_info_print_table_row(2, "simdjson-plus extension version", PHP_SIMDJSON_PLUS_VERSION);
684686
php_info_print_table_row(2, "simdjson library version", SIMDJSON_VERSION);
687+
php_info_print_table_row(2, "simdjson decoder implementation", simdjson::get_active_implementation()->description().c_str());
688+
php_info_print_table_row(2, "simdjson decoder implementation", simdjson_encode_implementation());
685689
php_info_print_table_row(2, "simdutf library version", SIMDUTF_VERSION);
686-
php_info_print_table_row(2, "Decoder implementation", simdjson::get_active_implementation()->description().c_str());
687-
php_info_print_table_row(2, "Encoder implementation", simdjson_encode_implementation());
690+
php_info_print_table_row(2, "simdutf implementation name", simdutf_impl->name().c_str());
691+
php_info_print_table_row(2, "simdutf implementation description", simdutf_impl->description().c_str());
688692

689693
php_info_print_table_end();
690694
}
@@ -702,14 +706,14 @@ zend_module_dep simdjson_deps[] = {
702706
zend_module_entry simdjson_module_entry = {
703707
STANDARD_MODULE_HEADER_EX, NULL,
704708
simdjson_deps,
705-
"simdjson",
709+
"simdjson_plus",
706710
ext_functions,
707711
PHP_MINIT(simdjson),
708712
PHP_MSHUTDOWN(simdjson),
709713
PHP_RINIT(simdjson),
710714
PHP_RSHUTDOWN(simdjson),
711715
PHP_MINFO(simdjson),
712-
PHP_SIMDJSON_VERSION,
716+
PHP_SIMDJSON_PLUS_VERSION,
713717
PHP_MODULE_GLOBALS(simdjson),
714718
PHP_GINIT(simdjson),
715719
NULL,
@@ -720,7 +724,7 @@ zend_module_entry simdjson_module_entry = {
720724

721725
/** {{{ DL support
722726
*/
723-
#ifdef COMPILE_DL_SIMDJSON
727+
#ifdef COMPILE_DL_SIMDJSON_PLUS
724728
#ifdef ZTS
725729
ZEND_TSRMLS_CACHE_DEFINE();
726730
#endif

php_simdjson.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ BEGIN_EXTERN_C()
5151
extern zend_module_entry simdjson_module_entry;
5252
#define phpext_simdjson_ptr &simdjson_module_entry
5353

54-
#define PHP_SIMDJSON_VERSION "5.0.0dev"
54+
#define PHP_SIMDJSON_PLUS_VERSION "1.0.0"
5555
/**
5656
* PHP_SIMDJSON_VERSION_ID has the same format as PHP_VERSION_ID: Major version * 10000 + Minor version * 100 + Patch version.
5757
* This is meant for use by PECL extensions that depend on simdjson.
5858
* (e.g. 4.5.6dev and 4.5.6 would be 40506)
5959
*/
60-
#define PHP_SIMDJSON_VERSION_ID 50000
60+
#define PHP_SIMDJSON_PLUS_VERSION_ID 10000
6161

62-
#define SIMDJSON_SUPPORT_URL "https://github.com/JakubOnderka/simdjson_php"
62+
#define SIMDJSON_PLUS_SUPPORT_URL "https://github.com/awesomized/simdjson-plus-php-ext"
6363

6464
#define SIMDJSON_PARSE_DEFAULT_DEPTH 512
6565
/**

tests/decode_args.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo $reflection;
77

88
?>
99
--EXPECTF--
10-
Function [ <internal:simdjson> function simdjson_decode ] {
10+
Function [ <internal:simdjson_plus> function simdjson_decode ] {
1111

1212
- Parameters [3] {
1313
Parameter #0 [ <required> string $json ]

tests/is_valid_args.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo $reflection;
77

88
?>
99
--EXPECTF--
10-
Function [ <internal:simdjson> function simdjson_is_valid ] {
10+
Function [ <internal:simdjson_plus> function simdjson_is_valid ] {
1111

1212
- Parameters [2] {
1313
Parameter #0 [ <required> string $json ]

tests/key_count_args.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo $reflection;
77

88
?>
99
--EXPECTF--
10-
Function [ <internal:simdjson> function simdjson_key_count ] {
10+
Function [ <internal:simdjson_plus> function simdjson_key_count ] {
1111

1212
- Parameters [4] {
1313
Parameter #0 [ <required> string $json ]

tests/key_exists_args.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo $reflection;
77

88
?>
99
--EXPECTF--
10-
Function [ <internal:simdjson> function simdjson_key_exists ] {
10+
Function [ <internal:simdjson_plus> function simdjson_key_exists ] {
1111

1212
- Parameters [3] {
1313
Parameter #0 [ <required> string $json ]

tests/key_value_args.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo $reflection;
77

88
?>
99
--EXPECTF--
10-
Function [ <internal:simdjson> function simdjson_key_value ] {
10+
Function [ <internal:simdjson_plus> function simdjson_key_value ] {
1111

1212
- Parameters [4] {
1313
Parameter #0 [ <required> string $json ]

0 commit comments

Comments
 (0)