From 2cad8f700849d06000ccfc1d877a0c6bf508d090 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 8 Nov 2018 17:03:56 +0100 Subject: add upstream patches from merged PRs add weak dependencies on geolite2 databases --- c8bf723822ef48f722b78cff240e886cb5907edd.patch | 61 ++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 c8bf723822ef48f722b78cff240e886cb5907edd.patch (limited to 'c8bf723822ef48f722b78cff240e886cb5907edd.patch') diff --git a/c8bf723822ef48f722b78cff240e886cb5907edd.patch b/c8bf723822ef48f722b78cff240e886cb5907edd.patch new file mode 100644 index 0000000..37efc3c --- /dev/null +++ b/c8bf723822ef48f722b78cff240e886cb5907edd.patch @@ -0,0 +1,61 @@ +From c8bf723822ef48f722b78cff240e886cb5907edd Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 7 Nov 2018 14:28:11 +0100 +Subject: [PATCH] add missing arginfo + +--- + ext/maxminddb.c | 19 +++++++++++++++---- + 1 file changed, 15 insertions(+), 4 deletions(-) + +diff --git a/ext/maxminddb.c b/ext/maxminddb.c +index c0177df..428ec65 100644 +--- a/ext/maxminddb.c ++++ b/ext/maxminddb.c +@@ -115,6 +115,10 @@ static inline maxminddb_obj *php_maxminddb_fetch_object(zend_object *obj TSRMLS_ + #endif + } + ++ZEND_BEGIN_ARG_INFO_EX(arginfo_maxmindbreader_construct, 0, 0, 1) ++ ZEND_ARG_INFO(0, db_file) ++ZEND_END_ARG_INFO() ++ + PHP_METHOD(MaxMind_Db_Reader, __construct){ + char *db_file = NULL; + strsize_t name_len; +@@ -150,6 +154,10 @@ PHP_METHOD(MaxMind_Db_Reader, __construct){ + mmdb_obj->mmdb = mmdb; + } + ++ZEND_BEGIN_ARG_INFO_EX(arginfo_maxmindbreader_get, 0, 0, 1) ++ ZEND_ARG_INFO(0, ip_address) ++ZEND_END_ARG_INFO() ++ + PHP_METHOD(MaxMind_Db_Reader, get){ + char *ip_address = NULL; + strsize_t name_len; +@@ -225,6 +233,9 @@ PHP_METHOD(MaxMind_Db_Reader, get){ + MMDB_free_entry_data_list(entry_data_list); + } + ++ZEND_BEGIN_ARG_INFO_EX(arginfo_maxmindbreader_void, 0, 0, 0) ++ZEND_END_ARG_INFO() ++ + PHP_METHOD(MaxMind_Db_Reader, metadata){ + if (ZEND_NUM_ARGS() != 0) { + THROW_EXCEPTION("InvalidArgumentException", +@@ -520,11 +531,11 @@ static zend_object_value maxminddb_create_handler( + + /* *INDENT-OFF* */ + static zend_function_entry maxminddb_methods[] = { +- PHP_ME(MaxMind_Db_Reader, __construct, NULL, ++ PHP_ME(MaxMind_Db_Reader, __construct, arginfo_maxmindbreader_construct, + ZEND_ACC_PUBLIC | ZEND_ACC_CTOR) +- PHP_ME(MaxMind_Db_Reader, close, NULL, ZEND_ACC_PUBLIC) +- PHP_ME(MaxMind_Db_Reader, get, NULL, ZEND_ACC_PUBLIC) +- PHP_ME(MaxMind_Db_Reader, metadata, NULL, ZEND_ACC_PUBLIC) ++ PHP_ME(MaxMind_Db_Reader, close, arginfo_maxmindbreader_void, ZEND_ACC_PUBLIC) ++ PHP_ME(MaxMind_Db_Reader, get, arginfo_maxmindbreader_get, ZEND_ACC_PUBLIC) ++ PHP_ME(MaxMind_Db_Reader, metadata, arginfo_maxmindbreader_void, ZEND_ACC_PUBLIC) + { NULL, NULL, NULL } + }; + /* *INDENT-ON* */ -- cgit