summaryrefslogtreecommitdiff
path: root/ext/dba
diff options
context:
space:
mode:
authorMáté Kocsis <kocsismate@woohoolabs.com>2020-04-04 20:41:42 +0200
committerMáté Kocsis <kocsismate@woohoolabs.com>2020-04-04 20:41:48 +0200
commit7c3078737fcdd7c4da0607b2856502089e60194b (patch)
treec4e37fd2cd962616072b7324d78c7c6a5c6255d2 /ext/dba
parenta43bc33fb2575cda582167c0d6571e501a2e6496 (diff)
downloadphp-git-7c3078737fcdd7c4da0607b2856502089e60194b.tar.gz
Generate function entries from stubs for a couple of extensions
Closes GH-5347
Diffstat (limited to 'ext/dba')
-rw-r--r--ext/dba/dba.c24
-rw-r--r--ext/dba/dba.stub.php2
-rw-r--r--ext/dba/dba_arginfo.h37
-rw-r--r--ext/dba/php_dba.h16
4 files changed, 40 insertions, 39 deletions
diff --git a/ext/dba/dba.c b/ext/dba/dba.c
index d407d2a8e7..4e26157050 100644
--- a/ext/dba/dba.c
+++ b/ext/dba/dba.c
@@ -50,28 +50,6 @@
#include "php_lmdb.h"
#include "dba_arginfo.h"
-/* {{{ dba_functions[]
- */
-static const zend_function_entry dba_functions[] = {
- PHP_FE(dba_open, arginfo_dba_open)
- PHP_FE(dba_popen, arginfo_dba_popen)
- PHP_FE(dba_close, arginfo_dba_close)
- PHP_FE(dba_delete, arginfo_dba_delete)
- PHP_FE(dba_exists, arginfo_dba_exists)
- PHP_FE(dba_fetch, arginfo_dba_fetch)
- PHP_FE(dba_insert, arginfo_dba_insert)
- PHP_FE(dba_replace, arginfo_dba_replace)
- PHP_FE(dba_firstkey, arginfo_dba_firstkey)
- PHP_FE(dba_nextkey, arginfo_dba_nextkey)
- PHP_FE(dba_optimize, arginfo_dba_optimize)
- PHP_FE(dba_sync, arginfo_dba_sync)
- PHP_FE(dba_handlers, arginfo_dba_handlers)
- PHP_FE(dba_list, arginfo_dba_list)
- PHP_FE(dba_key_split, arginfo_dba_key_split)
- PHP_FE_END
-};
-/* }}} */
-
PHP_MINIT_FUNCTION(dba);
PHP_MSHUTDOWN_FUNCTION(dba);
PHP_MINFO_FUNCTION(dba);
@@ -90,7 +68,7 @@ static PHP_GINIT_FUNCTION(dba);
zend_module_entry dba_module_entry = {
STANDARD_MODULE_HEADER,
"dba",
- dba_functions,
+ ext_functions,
PHP_MINIT(dba),
PHP_MSHUTDOWN(dba),
NULL,
diff --git a/ext/dba/dba.stub.php b/ext/dba/dba.stub.php
index 96ce6d573a..9127bb96d0 100644
--- a/ext/dba/dba.stub.php
+++ b/ext/dba/dba.stub.php
@@ -1,5 +1,7 @@
<?php
+/** @generate-function-entries */
+
/** @return resource|false */
function dba_popen($path, $mode, $handlername = UNKNOWN, ...$handler_parameters) {}
diff --git a/ext/dba/dba_arginfo.h b/ext/dba/dba_arginfo.h
index 32e925fb6a..97f3a29936 100644
--- a/ext/dba/dba_arginfo.h
+++ b/ext/dba/dba_arginfo.h
@@ -56,3 +56,40 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_dba_list, 0, 0, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
+
+
+ZEND_FUNCTION(dba_popen);
+ZEND_FUNCTION(dba_open);
+ZEND_FUNCTION(dba_close);
+ZEND_FUNCTION(dba_exists);
+ZEND_FUNCTION(dba_fetch);
+ZEND_FUNCTION(dba_key_split);
+ZEND_FUNCTION(dba_firstkey);
+ZEND_FUNCTION(dba_nextkey);
+ZEND_FUNCTION(dba_delete);
+ZEND_FUNCTION(dba_insert);
+ZEND_FUNCTION(dba_replace);
+ZEND_FUNCTION(dba_optimize);
+ZEND_FUNCTION(dba_sync);
+ZEND_FUNCTION(dba_handlers);
+ZEND_FUNCTION(dba_list);
+
+
+static const zend_function_entry ext_functions[] = {
+ ZEND_FE(dba_popen, arginfo_dba_popen)
+ ZEND_FE(dba_open, arginfo_dba_open)
+ ZEND_FE(dba_close, arginfo_dba_close)
+ ZEND_FE(dba_exists, arginfo_dba_exists)
+ ZEND_FE(dba_fetch, arginfo_dba_fetch)
+ ZEND_FE(dba_key_split, arginfo_dba_key_split)
+ ZEND_FE(dba_firstkey, arginfo_dba_firstkey)
+ ZEND_FE(dba_nextkey, arginfo_dba_nextkey)
+ ZEND_FE(dba_delete, arginfo_dba_delete)
+ ZEND_FE(dba_insert, arginfo_dba_insert)
+ ZEND_FE(dba_replace, arginfo_dba_replace)
+ ZEND_FE(dba_optimize, arginfo_dba_optimize)
+ ZEND_FE(dba_sync, arginfo_dba_sync)
+ ZEND_FE(dba_handlers, arginfo_dba_handlers)
+ ZEND_FE(dba_list, arginfo_dba_list)
+ ZEND_FE_END
+};
diff --git a/ext/dba/php_dba.h b/ext/dba/php_dba.h
index cd93b47bd1..4054b5be0f 100644
--- a/ext/dba/php_dba.h
+++ b/ext/dba/php_dba.h
@@ -125,22 +125,6 @@ typedef struct dba_handler {
DBA_SYNC_FUNC(x); \
DBA_INFO_FUNC(x)
-PHP_FUNCTION(dba_open);
-PHP_FUNCTION(dba_popen);
-PHP_FUNCTION(dba_close);
-PHP_FUNCTION(dba_firstkey);
-PHP_FUNCTION(dba_nextkey);
-PHP_FUNCTION(dba_replace);
-PHP_FUNCTION(dba_insert);
-PHP_FUNCTION(dba_delete);
-PHP_FUNCTION(dba_exists);
-PHP_FUNCTION(dba_fetch);
-PHP_FUNCTION(dba_optimize);
-PHP_FUNCTION(dba_sync);
-PHP_FUNCTION(dba_handlers);
-PHP_FUNCTION(dba_list);
-PHP_FUNCTION(dba_key_split);
-
#else
#define dba_module_ptr NULL
#endif