1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
#ifndef FREEAGE_MODULE_MODULE_INCLUDED
#define FREEAGE_MODULE_MODULE_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
#include "php.h"
#include "net_types.h"
#ifdef ZTS
#include "TSRM.h"
#endif
ZEND_BEGIN_MODULE_GLOBALS(module)
/* test_module result declaration. */
struct test_module_result
{
net_int_t ret; /*< A result. */
};
/* test_sql result declaration. */
struct test_sql_result
{
net_int_t intval; /*< An integer. */
net_float_t floatval; /*< A float. */
net_char_t strval [32]; /*< A string. */
};
ZEND_END_MODULE_GLOBALS(module)
#ifdef ZTS
#define MODULE_G(v) TSRMG(module_globals_id, zend_module_globals *, v)
#else
#define MODULE_G(v) (module_globals.v)
#endif
#define PHP_MODULE_EXTNAME "module"
#define PHP_MODULE_EXTVER "1.0"
/* Declaration of functions to create. */
PHP_MINIT_FUNCTION(module);
PHP_MINFO_FUNCTION(module);
PHP_MSHUTDOWN_FUNCTION(module);
PHP_FUNCTION(test_module);
PHP_FUNCTION(test_module_result);
PHP_FUNCTION(test_sql);
PHP_FUNCTION(test_sql_result);
/* Registration module inputs. */
extern zend_module_entry module_module_entry;
#define phpext_module_ptr &module_module_entry
#ifdef __cplusplus
}
#endif
#endif /* FREEAGE_MODULE_MODULE_INCLUDED */ |
Partager