2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 1997-2006 The PHP Group |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
16 +----------------------------------------------------------------------+
19 /* $Id: php_lua.h,v 1.2 2008/03/31 09:50:39 sfox Exp $ */
24 extern zend_module_entry lua_module_entry
;
25 #define phpext_lua_ptr &lua_module_entry
27 #define PHP_LUA_VERSION "0.1.1"
30 #define PHP_LUA_API __declspec(dllexport)
39 PHP_MINIT_FUNCTION(lua
);
40 PHP_MSHUTDOWN_FUNCTION(lua
);
41 PHP_RINIT_FUNCTION(lua
);
42 PHP_RSHUTDOWN_FUNCTION(lua
);
43 PHP_MINFO_FUNCTION(lua
);
45 PHP_FUNCTION(confirm_lua_compiled
); /* For testing, remove later. */
47 ZEND_BEGIN_MODULE_GLOBALS(lua
)
49 long lua_callback_count
;
50 zend_bool load_standard_libs
;
51 ZEND_END_MODULE_GLOBALS(lua
)
53 /* In every utility function you add that needs to use variables
54 in php_lua_globals, call TSRMLS_FETCH(); after declaring other
55 variables used by that function, or better yet, pass in TSRMLS_CC
56 after the last function argument and declare your utility function
57 with TSRMLS_DC after the last declared argument. Always refer to
58 the globals in your function as LUA_G(variable). You are
59 encouraged to rename these macros something shorter, see
60 examples in any other php module directory.
64 #define LUA_G(v) TSRMG(lua_globals_id, zend_lua_globals *, v)
66 #define LUA_G(v) (lua_globals.v)
69 #endif /* PHP_LUA_H */
77 * vim600: noet sw=4 ts=4 fdm=marker
78 * vim<600: noet sw=4 ts=4