* call it upon all exit conditions. extern DECLSPEC void SDLCALL SDL_Quit(void); */ PHP_FUNCTION(SDL_Quit) { if (zend_parse_parameters_none() == FAILURE) { RETURN_FALSE; } SDL_Quit(); } /* }}} */ /* {{{ sdl_functions[] */ zend_function_entry sdl_functions[] = { ZEND_FE(SDL_Init, arginfo_SDL_Init) ZEND_FE(SDL_InitSubSystem, arginfo_SDL_InitSubSystem) ZEND_FE(SDL_Quit, arginfo_sdl_none) ZEND_FE(SDL_QuitSubSystem, arginfo_SDL_QuitSubSystem) ZEND_FE(SDL_WasInit, arginfo_SDL_WasInit) ZEND_FE_END }; /* }}} */ /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(sdl_sdl) { /* * These are the flags which may be passed to SDL_Init(). You should * specify the subsystems which you will be using in your application. */
PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN( "msgpack.error_display", "1", PHP_INI_ALL, OnUpdateBool, error_display, zend_msgpack_globals, msgpack_globals) STD_PHP_INI_BOOLEAN( "msgpack.php_only", "1", PHP_INI_ALL, OnUpdateBool, php_only, zend_msgpack_globals, msgpack_globals) STD_PHP_INI_BOOLEAN( "msgpack.illegal_key_insert", "0", PHP_INI_ALL, OnUpdateBool, illegal_key_insert, zend_msgpack_globals, msgpack_globals) PHP_INI_END() PS_SERIALIZER_FUNCS(msgpack); static const zend_function_entry msgpack_functions[] = { ZEND_FE(msgpack_serialize, arginfo_msgpack_serialize) ZEND_FE(msgpack_unserialize, arginfo_msgpack_unserialize) ZEND_FALIAS(msgpack_pack, msgpack_serialize, arginfo_msgpack_serialize) ZEND_FALIAS(msgpack_unpack, msgpack_unserialize, arginfo_msgpack_unserialize) {NULL, NULL, NULL} }; static void msgpack_init_globals(zend_msgpack_globals *msgpack_globals) { TSRMLS_FETCH(); if (PG(display_errors)) { msgpack_globals->error_display = 1; } else
ZEND_ARG_INFO(0, script) ZEND_END_ARG_INFO() /* User functions */ static ZEND_FUNCTION(opcache_reset); static ZEND_FUNCTION(opcache_invalidate); static ZEND_FUNCTION(opcache_is_script_cached); /* Private functions */ static ZEND_FUNCTION(opcache_get_status); static ZEND_FUNCTION(opcache_compile_file); static ZEND_FUNCTION(opcache_get_configuration); static zend_function_entry accel_functions[] = { /* User functions */ ZEND_FE(opcache_reset, arginfo_opcache_none) ZEND_FE(opcache_invalidate, arginfo_opcache_invalidate) ZEND_FE(opcache_compile_file, arginfo_opcache_compile_file) ZEND_FE(opcache_is_script_cached, arginfo_opcache_is_script_cached) /* Private functions */ ZEND_FE(opcache_get_configuration, arginfo_opcache_none) ZEND_FE(opcache_get_status, arginfo_opcache_get_status) { NULL, NULL, NULL, 0, 0 } }; static int validate_api_restriction(TSRMLS_D) { if (ZCG(accel_directives).restrict_api && *ZCG(accel_directives).restrict_api) { int len = strlen(ZCG(accel_directives).restrict_api); if (!SG(request_info).path_translated ||
if(zend_hash_find(HASH_OF(data_array),name,name_len,(void**)&fooval) == SUCCESS ){ RETVAL_ZVAL(*fooval, 1, 0); }else{ // RETVAL_STRING(&str, 1); RETVAL_STRING("index_not_found", 1); } // array_init(return_value); // add_index_zval(return_value, 444, data_array); // RETURN_ZVAL(data_array, 1, 0); //返回复合类型变量 return; } static zend_function_entry alinq_functions[] = { ZEND_FE(sample_array, NULL) ZEND_FE(alinq_get_array_item, NULL) { NULL, NULL, NULL } }; //module entry zend_module_entry alinq_module_entry = { #if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER, #endif "alinq", //这个地方是扩展名称,往往我们会在这个地方使用一个宏。 alinq_functions, /* Functions */ ZEND_MINIT(test), /* MINIT */ NULL, /* MSHUTDOWN */ NULL, /* RINIT */ NULL, /* RSHUTDOWN */
PHP_FUNCTION(onionSetVerbosity) { long verbosity; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &verbosity) == FAILURE) { RETURN_FALSE; } phpOnionSetVerbosity(verbosity); } zend_function_entry omega_functions[] = { ZEND_FE(onionSetVerbosity, arginfo_onionSetVerbosity) ZEND_FE(pwmCheckInit, arginfo_pwmCheckInit) ZEND_FE(pwmDriverInit, NULL) ZEND_FE(pwmDisableChip, NULL) ZEND_FE(pwmSetFrequency, arginfo_pwmSetFrequency) ZEND_FE(pwmSetupDriver, arginfo_pwmSetupDriver) ZEND_FE(oledCheckInit, NULL) ZEND_FE(oledDriverInit, NULL) ZEND_FE(oledClear, NULL) ZEND_FE(oledSetDisplayPower, arginfo_oledSetDisplayPower) ZEND_FE(oledSetDisplayMode, arginfo_oledSetDisplayMode) ZEND_FE(oledSetBrightness, arginfo_oledSetBrightness) ZEND_FE(oledSetDim, arginfo_oledSetDim) ZEND_FE(oledSetMemoryMode, arginfo_oledSetMemoryMode)
/* True global resources - no need for thread safety here */ static int le_sdl_ttf; static int le_ttf_font; static zend_module_dep sdl_ttf_deps[] = { ZEND_MOD_REQUIRED("sdl") ZEND_MOD_END }; /* {{{ sdl_ttf_functions[] * * Every user visible function must have an entry in sdl_ttf_functions[]. */ const zend_function_entry sdl_ttf_functions[] = { ZEND_FE(ttf_init, NULL) ZEND_FE(ttf_openfont, NULL) ZEND_FE(ttf_closefont, NULL) ZEND_FE(ttf_rendertext_solid, NULL) ZEND_FE(ttf_rendertext_blended, NULL) ZEND_FE(ttf_renderutf8_solid, NULL) ZEND_FE(ttf_renderutf8_blended, NULL) ZEND_FE(ttf_renderunicode_solid, NULL) ZEND_FE(ttf_fontlineskip, NULL) ZEND_FE(ttf_quit, NULL) ZEND_FE_END }; /* }}} */ /* {{{ sdl_ttf_module_entry
#include "ext/standard/info.h" #include "ext/standard/php_string.h" #include "php_verdep.h" #include "php_override.h" ZEND_FUNCTION(override_function); ZEND_BEGIN_ARG_INFO_EX(arginfo_override_function, 0, 0, 3) ZEND_ARG_INFO(0, name) ZEND_ARG_INFO(0, args) ZEND_ARG_INFO(0, code) ZEND_ARG_INFO(0, origin) ZEND_END_ARG_INFO() static const zend_function_entry override_functions[] = { ZEND_FE(override_function, arginfo_override_function) ZEND_FE_END }; ZEND_MINFO_FUNCTION(override) { php_info_print_table_start(); php_info_print_table_row(2, "Override support", "enabled"); php_info_print_table_row(2, "Extension Version", OVERRIDE_EXT_VERSION); php_info_print_table_end(); } zend_module_entry override_module_entry = { #if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER, #endif
snprintf(buf, sizeof(buf), "%d.%d.%d", ver.major, ver.minor, ver.patch); php_info_print_table_row(2, "SDL2 headers version", buf); /* runtime library version */ SDL_GetVersion(&ver); snprintf(buf, sizeof(buf), "%d.%d.%d", ver.major, ver.minor, ver.patch); php_info_print_table_row(2, "SDL2 library version", buf); php_info_print_table_end(); } /* }}} */ /* {{{ sdl_functions[] */ static zend_function_entry sdl_functions[] = { // Core ZEND_FE(SDL_Init, arginfo_SDL_Init) ZEND_FE(SDL_InitSubSystem, arginfo_SDL_InitSubSystem) ZEND_FE(SDL_Quit, arginfo_SDL_Quit) ZEND_FE(SDL_QuitSubSystem, arginfo_SDL_QuitSubSystem) ZEND_FE(SDL_WasInit, arginfo_SDL_WasInit) // Window ZEND_FE(SDL_CreateWindow, arginfo_SDL_CreateWindow) ZEND_FE(SDL_CreateShapedWindow, arginfo_SDL_CreateWindow) ZEND_FE(SDL_DestroyWindow, arginfo_SDL_Window) ZEND_FE(SDL_UpdateWindowSurface, arginfo_SDL_Window) ZEND_FE(SDL_GetWindowTitle, arginfo_SDL_Window) ZEND_FE(SDL_SetWindowTitle, arginfo_SDL_SetWindowTitle) ZEND_FE(SDL_GetWindowDisplayIndex, arginfo_SDL_Window) ZEND_FE(SDL_ShowWindow, arginfo_SDL_Window) ZEND_FE(SDL_HideWindow, arginfo_SDL_Window)
ZEND_BEGIN_ARG_INFO_EX(arginfo_ellipticCurveSignature_ec_sign,0,0,3) ZEND_ARG_INFO(0,secretKey) ZEND_ARG_INFO(0,publicKey) ZEND_ARG_INFO(0,message) ZEND_ARG_INFO(0,curveType) ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO_EX(arginfo_ellipticCurveSignature_ec_verify,0,0,3) ZEND_ARG_INFO(0,signature) ZEND_ARG_INFO(0,original) ZEND_ARG_INFO(0,publicKey) ZEND_ARG_INFO(0,curveType) ZEND_END_ARG_INFO(); static zend_function_entry ellipticCurveSignature_functions[] = { ZEND_FE(ec_generate_pk,arginfo_ellipticCurveSignature_ec_generate_pk) ZEND_FE(ec_sign,arginfo_ellipticCurveSignature_ec_sign) ZEND_FE(ec_verify,arginfo_ellipticCurveSignature_ec_verify) {NULL,NULL,NULL} }; zend_module_entry ellipticCurveSignature_module_entry = { STANDARD_MODULE_HEADER, PHP_ELLIPTIC_CURVE_EXTNAME, ellipticCurveSignature_functions, ZEND_MINIT(ellipticCurveSignature), NULL, NULL, NULL, NULL, PHP_ELLIPTIC_CURVE_VERSION,
#include "ip2country.h" /* If you declare any globals in php_ip2c.h uncomment this: ZEND_DECLARE_MODULE_GLOBALS(ip2c) */ /* True global resources - no need for thread safety here */ static int le_ip2c; /* {{{ ip2c_functions[] * * Every user visible function must have an entry in ip2c_functions[]. */ function_entry ip2c_functions[] = { ZEND_FE(ip2c_init, NULL) ZEND_FE(ip2c_lookup, NULL) ZEND_FE(ip2c_countrycode, NULL) ZEND_FE(ip2c_destroy, NULL) {NULL, NULL, NULL} /* Must be the last line in ip2c_functions[] */ }; /* }}} */ /* {{{ ip2c_module_entry */ zend_module_entry ip2c_module_entry = { #if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER, #endif "ip2c", ip2c_functions,
#include "errorclearlast.h" #include "php.h" PHP_FUNCTION(error_clear_last); const zend_function_entry errorclearlast_functions[] = { ZEND_FE(error_clear_last, NULL) ZEND_FE_END }; PHP_RINIT_FUNCTION(errorclearlast); zend_module_entry errorclearlast_module_entry = { STANDARD_MODULE_HEADER, ERRORCLEARLAST_EXT_NAME, errorclearlast_functions, NULL, NULL, NULL, NULL, NULL, ERRORCLEARLAST_EXT_VERSION, STANDARD_MODULE_PROPERTIES }; ZEND_GET_MODULE(errorclearlast) /* {{{ proto void error_clear_last() */ PHP_FUNCTION(error_clear_last)
#undef DEBUG_PLPHP_MEMORY #ifdef DEBUG_PLPHP_MEMORY #define REPORT_PHP_MEMUSAGE(where) \ elog(NOTICE, "PHP mem usage: «%s»: %u", where, AG(allocated_memory)); #else #define REPORT_PHP_MEMUSAGE(a) #endif /* resource type Id for SPIresult */ int SPIres_rtype; /* SPI function table */ zend_function_entry spi_functions[] = { ZEND_FE(spi_exec, NULL) ZEND_FE(spi_fetch_row, NULL) ZEND_FE(spi_processed, NULL) ZEND_FE(spi_status, NULL) ZEND_FE(spi_rewind, NULL) ZEND_FE(pg_raise, NULL) ZEND_FE(return_next, NULL) {NULL, NULL, NULL} }; /* SRF support: */ FunctionCallInfo current_fcinfo = NULL; TupleDesc current_tupledesc = NULL; AttInMetadata *current_attinmeta = NULL; MemoryContext current_memcxt = NULL; Tuplestorestate *current_tuplestore = NULL;
#include "fastcommon.h" #define MAJOR_VERSION 1 #define MINOR_VERSION 0 #if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3) const zend_fcall_info empty_fcall_info = { 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0 }; #undef ZEND_BEGIN_ARG_INFO_EX #define ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, return_reference, required_num_args) \ static zend_arg_info name[] = { \ { NULL, 0, NULL, 0, 0, 0, pass_rest_by_reference, return_reference, required_num_args }, #endif // Every user visible function must have an entry in fastcommon_functions[]. zend_function_entry fastcommon_functions[] = { ZEND_FE(fastcommon_version, NULL) ZEND_FE(fastcommon_gethostaddrs, NULL) ZEND_FE(fastcommon_time33_hash, NULL) ZEND_FE(fastcommon_simple_hash, NULL) ZEND_FE(fastcommon_get_line_distance_km, NULL) ZEND_FE(fastcommon_get_first_local_ip, NULL) ZEND_FE(fastcommon_get_next_local_ip, NULL) ZEND_FE(fastcommon_is_private_ip, NULL) {NULL, NULL, NULL} /* Must be the last line */ }; zend_module_entry fastcommon_module_entry = { STANDARD_MODULE_HEADER, "fastcommon", fastcommon_functions, PHP_MINIT(fastcommon),
ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_msgpacki_filter_prepend, 0, 0, 1) ZEND_ARG_INFO(0, filtername) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_msgpacki_filter_remove, 0, 0, 1) ZEND_ARG_INFO(0, filtername) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_msgpacki_get_filters, 0, 0, 0) ZEND_ARG_INFO(0, filter) ZEND_END_ARG_INFO() MSGPACKI_ZEND_FUNCTION_ENTRY msgpacki_functions[] = { ZEND_FE(msgpacki_serialize, arginfo_msgpacki_serialize) ZEND_FE(msgpacki_unserialize, arginfo_msgpacki_unserialize) ZEND_FE(msgpacki_encode, arginfo_msgpacki_encode) ZEND_FE(msgpacki_decode, arginfo_msgpacki_decode) ZEND_FE(msgpacki_filter_register, arginfo_msgpacki_filter_register) ZEND_FE(msgpacki_filter_append, arginfo_msgpacki_filter_append) ZEND_FE(msgpacki_filter_prepend, arginfo_msgpacki_filter_prepend) ZEND_FE(msgpacki_filter_remove, arginfo_msgpacki_filter_remove) ZEND_FE(msgpacki_get_filters, arginfo_msgpacki_get_filters) #ifdef HAVE_MSGPACKI_NAMESPACE ZEND_NS_FALIAS(PHP_MSGPACKI_NS, serialize, msgpacki_serialize, arginfo_msgpacki_serialize) ZEND_NS_FALIAS(PHP_MSGPACKI_NS, unserialize, msgpacki_unserialize, arginfo_msgpacki_unserialize) ZEND_NS_FALIAS(PHP_MSGPACKI_NS, encode, msgpacki_encode, arginfo_msgpacki_encode)
ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_scan, 0, 0, 2) ZEND_ARG_INFO(0, a) ZEND_ARG_INFO(0, start) ZEND_END_ARG_INFO() /* }}} */ ZEND_DECLARE_MODULE_GLOBALS(gmp) static ZEND_GINIT_FUNCTION(gmp); /* {{{ gmp_functions[] */ const zend_function_entry gmp_functions[] = { ZEND_FE(gmp_init, arginfo_gmp_init) ZEND_FE(gmp_intval, arginfo_gmp_intval) ZEND_FE(gmp_strval, arginfo_gmp_strval) ZEND_FE(gmp_add, arginfo_gmp_binary) ZEND_FE(gmp_sub, arginfo_gmp_binary) ZEND_FE(gmp_mul, arginfo_gmp_binary) ZEND_FE(gmp_div_qr, arginfo_gmp_div) ZEND_FE(gmp_div_q, arginfo_gmp_div) ZEND_FE(gmp_div_r, arginfo_gmp_div) ZEND_FALIAS(gmp_div, gmp_div_q, arginfo_gmp_div) ZEND_FE(gmp_mod, arginfo_gmp_binary) ZEND_FE(gmp_divexact, arginfo_gmp_binary) ZEND_FE(gmp_neg, arginfo_gmp_unary) ZEND_FE(gmp_abs, arginfo_gmp_unary) ZEND_FE(gmp_fact, arginfo_gmp_unary) ZEND_FE(gmp_sqrt, arginfo_gmp_unary)
/* You should tweak config.m4 so this symbol (or some else suitable) gets defined. */ #if HAVE_FRIBIDI /* If you declare any globals in php_fribidi.h uncomment this: ZEND_DECLARE_MODULE_GLOBALS(fribidi) */ /* True global resources - no need for thread safety here */ /* static int le_fribidi; */ /* Every user visible function must have an entry in fribidi_functions[]. */ function_entry fribidi_functions[] = { ZEND_FE(fribidi_log2vis, NULL) {NULL, NULL, NULL} /* Must be the last line in fribidi_functions[] */ }; zend_module_entry fribidi_module_entry = { "fribidi", fribidi_functions, PHP_MINIT(fribidi), PHP_MSHUTDOWN(fribidi), PHP_RINIT(fribidi), /* Replace with NULL if there's nothing to do at request start */ PHP_RSHUTDOWN(fribidi), /* Replace with NULL if there's nothing to do at request end */ PHP_MINFO(fribidi), STANDARD_MODULE_PROPERTIES }; #ifdef COMPILE_DL_FRIBIDI
#include "myretval.h" ZEND_FUNCTION(myretval_ret) { RETVAL_LONG(101); return; } static zend_function_entry myretval_functions[] = { ZEND_FE(myretval_ret, NULL) {NULL, NULL, NULL} }; zend_module_entry myretval_module_entry = { #if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER, #endif "myretval", myretval_functions, //Functions NULL, //MINIT NULL, //MSHUTDOWN NULL, //RINIT NULL, //RSHUTDOWN NULL, //MINFO #if ZEND_MODULE_API_NO >= 20010901 "0.1", #endif STANDARD_MODULE_PROPERTIES };
#include "config.h" #endif #include "php.h" #include "php_murmurhash3.h" } #include "MurmurHash3.h" #define MURMURHASH3_128_OUTPUT_LENGTH 16 #define MURMURHASH3_32_OUTPUT_LENGTH 4 static zend_function_entry murmurhash3_functions[] = { ZEND_FALIAS(murmurhash3, murmurhash3_128, NULL) ZEND_FE(murmurhash3_128, NULL) ZEND_FE(murmurhash3_32, NULL) {NULL, NULL, NULL} }; zend_module_entry murmurhash3_module_entry = { #if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER, #endif PHP_MURMURHASH3_EXTNAME, murmurhash3_functions, NULL, NULL, NULL, NULL, NULL,
#include "myini.h" static zend_function_entry myini_functions[] = { ZEND_FE(myini_say, NULL) { NULL, NULL, NULL } }; zend_module_entry myini_module_entry = { #if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER, #endif "myini", myini_functions, ZEND_MINIT(myini), ZEND_MSHUTDOWN(myini), NULL, NULL, NULL, #if ZEND_MODULE_API_NO >= 20010901 "0.1", #endif STANDARD_MODULE_PROPERTIES }; #ifdef COMPILE_DL_MYINI ZEND_GET_MODULE(myini) #endif ZEND_MINIT_FUNCTION(myini) {
} ZEND_FUNCTION(myparam_null) //参数传null { zval *val; //格式串中的“!”表示当传null变量时,直接把其转成C语言的null,而非封装成IS_NULL类型的zval,以减小开销 if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z!", &val) == FAILURE) { RETURN_NULL(); } if(!val) { val = php_sample_make_defaultval(TSRMLS_C); } } static zend_function_entry myparam_functions[] = { ZEND_FE(myparam_hello, NULL) ZEND_FE(myparam_hello_more, NULL) ZEND_FE(myparam_var_dump, NULL) ZEND_FE(myparam_default, NULL) {NULL, NULL, NULL} }; zend_module_entry myparam_module_entry = { #if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER, #endif "myparam", myparam_functions, //FUNCTIONS NULL, //MINIT NULL, //MSHUTDOWN NULL, //RINIT
} PHP_RSHUTDOWN_FUNCTION(zend_test) { return SUCCESS; } PHP_MINFO_FUNCTION(zend_test) { php_info_print_table_start(); php_info_print_table_header(2, "zend-test extension", "enabled"); php_info_print_table_end(); } static const zend_function_entry zend_test_functions[] = { ZEND_FE(zend_test_array_return, arginfo_zend_test_array_return) ZEND_FE(zend_test_nullable_array_return, arginfo_zend_test_nullable_array_return) ZEND_FE(zend_test_void_return, arginfo_zend_test_void_return) ZEND_FE(zend_create_unterminated_string, NULL) ZEND_FE(zend_terminate_string, arginfo_zend_terminate_string) ZEND_FE(zend_leak_bytes, NULL) ZEND_FE(zend_leak_variable, arginfo_zend_leak_variable) ZEND_FE_END }; zend_module_entry zend_test_module_entry = { STANDARD_MODULE_HEADER, "zend-test", zend_test_functions, PHP_MINIT(zend_test), PHP_MSHUTDOWN(zend_test),
#include "myrsrc2.h" static int le_myrsrc2_descriptor; static int le_myrsrc2_descriptor_persist; static zend_function_entry myrsrc2_functions[] = { ZEND_FE(myrsrc2_fopen, NULL) ZEND_FE(myrsrc2_fwrite, NULL) ZEND_FE(myrsrc2_fclose, NULL) ZEND_FE(myrsrc2_fname, NULL) {NULL, NULL, NULL} }; static void myrsrc2_descriptor_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) { myrsrc2_descriptor_data *fdata = (myrsrc2_descriptor_data *)rsrc->ptr; fclose(fdata->fp); efree(fdata->filename); efree(fdata); } static void myrsrc2_descriptor_dtor_persistent(zend_rsrc_list_entry *rsrc TSRMLS_DC) { myrsrc2_descriptor_data *fdata = (myrsrc2_descriptor_data *)rsrc->ptr; fclose(fdata->fp); pefree(fdata->filename, 1); pefree(fdata, 1); } zend_module_entry myrsrc2_module_entry = { #if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER, #endif "myrsrc2", myrsrc2_functions, ZEND_MINIT(myrsrc2), NULL,
#include <php.h> #include <TSRM.h> #include "scheme.h" #include "export_func.h" TSRMLS_FETCH(); //--导出函数入口 zend_function_entry iflytek_funcs_entry[] = { ZEND_FE(iflytek_ita, NULL) ZEND_FE(iflytek_tts, NULL) {NULL,NULL,NULL} }; //--扩展程序模块入口 zend_module_entry iflytek_funcs_module_entry = { STANDARD_MODULE_HEADER, "iflytek_funcs", iflytek_funcs_entry, NULL, // module_startup_func NULL, // module_shutdown_func NULL, // request_startup_func NULL, // request_shutdown_func NULL, // info_func NULL, // version STANDARD_MODULE_PROPERTIES }; ZEND_GET_MODULE(iflytek_funcs);
static ZEND_FUNCTION(lz4_uncompress); ZEND_BEGIN_ARG_INFO_EX(arginfo_lz4_compress, 0, 0, 1) ZEND_ARG_INFO(0, data) ZEND_ARG_INFO(0, level) ZEND_ARG_INFO(0, extra) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_lz4_uncompress, 0, 0, 1) ZEND_ARG_INFO(0, data) ZEND_ARG_INFO(0, max) ZEND_ARG_INFO(0, offset) ZEND_END_ARG_INFO() static zend_function_entry lz4_functions[] = { ZEND_FE(lz4_compress, arginfo_lz4_compress) ZEND_FE(lz4_uncompress, arginfo_lz4_uncompress) ZEND_FE_END }; static PHP_MINIT_FUNCTION(lz4) { REGISTER_LONG_CONSTANT("LZ4_CLEVEL_MIN", PHP_LZ4_CLEVEL_MIN, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LZ4_CLEVEL_MAX", PHP_LZ4_CLEVEL_MAX, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("LZ4_VERSION", LZ4_versionNumber(), CONST_CS | CONST_PERSISTENT); return SUCCESS; } ZEND_MINFO_FUNCTION(lz4)
#define STRING_NOT_NULL(s) (NULL == (s)?"":s) #define MIN_ACCEL_FILES 200 #define MAX_ACCEL_FILES 100000 #define TOKENTOSTR(X) #X /* User functions */ static ZEND_FUNCTION(accelerator_reset); /* Private functions */ static ZEND_FUNCTION(accelerator_get_status); static ZEND_FUNCTION(accelerator_get_configuration); static zend_function_entry accel_functions[] = { /* User functions */ ZEND_FE(accelerator_reset, NULL) /* Private functions */ ZEND_FE(accelerator_get_configuration, NULL) ZEND_FE(accelerator_get_status, NULL) { NULL, NULL, NULL, 0, 0 } }; static ZEND_INI_MH(OnUpdateMemoryConsumption) { long *p; long memsize; #ifndef ZTS char *base = (char *) mh_arg2; #else char *base = (char *) ts_resource(*((int *) mh_arg2)); #endif
+----------------------------------------------------------------------+ */ #include <php_puno.h> #include "puno_class.cpp" #include "puno_converters.cpp" #include "puno_functions.cpp" /* {{{ puno_functions[] * * Every user visible function must have an entry in puno_functions[]. */ zend_function_entry puno_functions[] = { ZEND_FE(get_remote_xcomponent, NULL) ZEND_FE(create_struct, NULL) { NULL, NULL, NULL} }; /* {{{ puno_module_entry */ zend_module_entry puno_module_entry = { #if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER, #endif "puno", puno_functions, PHP_MINIT(puno), PHP_MSHUTDOWN(puno), PHP_RINIT(puno),
sapi_cli_log_message, /* Log message */ NULL, /* Get request time */ NULL, /* Child terminate */ STANDARD_SAPI_MODULE_PROPERTIES }; /* }}} */ /* {{{ arginfo ext/standard/dl.c */ ZEND_BEGIN_ARG_INFO(arginfo_dl, 0) ZEND_ARG_INFO(0, extension_filename) ZEND_END_ARG_INFO() /* }}} */ static const zend_function_entry additional_functions[] = { ZEND_FE(dl, arginfo_dl) PHP_FE(cli_set_process_title, arginfo_cli_set_process_title) PHP_FE(cli_get_process_title, arginfo_cli_get_process_title) {NULL, NULL, NULL} }; /* {{{ php_cli_usage */ static void php_cli_usage(char *argv0) { char *prog; prog = strrchr(argv0, '/'); if (prog) { prog++; } else {
} php_dl(fname, MODULE_TEMPORARY, return_value, 0 TSRMLS_CC); if (Z_LVAL_P(return_value) == 1) { EG(full_tables_cleanup) = 1; } if (extension_dir) { PG(extension_dir) = extension_dir; } efree(libpath); } static zend_function_entry extension_load_functions[] = { ZEND_FE(extension_load, arginfo_extension_load) ZEND_FE_END }; static void extension_load_init_globals(zend_extension_load_globals *extension_load_globals) { extension_load_globals->dir = NULL; } ZEND_MINIT_FUNCTION(extension_load) { char *dirname = NULL; ZEND_INIT_MODULE_GLOBALS(extension_load, extension_load_init_globals, NULL); REGISTER_INI_ENTRIES();
/* snappy */ #include "snappy/snappy-c.h" static ZEND_FUNCTION(snappy_compress); static ZEND_FUNCTION(snappy_uncompress); ZEND_BEGIN_ARG_INFO_EX(arginfo_snappy_compress, 0, 0, 1) ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_snappy_uncompress, 0, 0, 1) ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO() static const zend_function_entry snappy_functions[] = { ZEND_FE(snappy_compress, arginfo_snappy_compress) ZEND_FE(snappy_uncompress, arginfo_snappy_uncompress) ZEND_FE_END }; PHP_MINFO_FUNCTION(snappy) { php_info_print_table_start(); php_info_print_table_row(2, "Snappy support", "enabled"); php_info_print_table_row(2, "Extension Version", SNAPPY_EXT_VERSION); php_info_print_table_row(2, "Snappy Version", SNAPPY_LIB_VERSION); php_info_print_table_end(); } zend_module_entry snappy_module_entry = { #if ZEND_MODULE_API_NO >= 20010901
#include "lz4hc.h" static ZEND_FUNCTION(horde_lz4_compress); static ZEND_FUNCTION(horde_lz4_uncompress); ZEND_BEGIN_ARG_INFO_EX(arginfo_horde_lz4_compress, 0, 0, 1) ZEND_ARG_INFO(0, data) ZEND_ARG_INFO(0, high) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_horde_lz4_uncompress, 0, 0, 1) ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO() static zend_function_entry horde_lz4_functions[] = { ZEND_FE(horde_lz4_compress, arginfo_horde_lz4_compress) ZEND_FE(horde_lz4_uncompress, arginfo_horde_lz4_uncompress) ZEND_FE_END }; ZEND_MINFO_FUNCTION(horde_lz4) { php_info_print_table_start(); php_info_print_table_row(2, "Horde LZ4 support", "enabled"); php_info_print_table_row(2, "Extension Version", HORDE_LZ4_EXT_VERSION); php_info_print_table_end(); } zend_module_entry horde_lz4_module_entry = { #if ZEND_MODULE_API_NO >= 20010901 STANDARD_MODULE_HEADER,