Bump version
[phplua.git] / php_lua.h
blob115d18f248f4173328317f99ffa84cdf9a255074
1 /*
2 +----------------------------------------------------------------------+
3 | PHP Version 5 |
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 +----------------------------------------------------------------------+
15 | Author: |
16 +----------------------------------------------------------------------+
19 /* $Id: php_lua.h,v 1.2 2008/03/31 09:50:39 sfox Exp $ */
21 #ifndef PHP_LUA_H
22 #define PHP_LUA_H
24 extern zend_module_entry lua_module_entry;
25 #define phpext_lua_ptr &lua_module_entry
27 #define PHP_LUA_VERSION "0.2.4-dev"
29 #ifdef PHP_WIN32
30 #define PHP_LUA_API __declspec(dllexport)
31 #else
32 #define PHP_LUA_API
33 #endif
35 #ifdef ZTS
36 #include "TSRM.h"
37 #endif
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)
48 zend_bool load_standard_libs;
49 ZEND_END_MODULE_GLOBALS(lua)
51 /* In every utility function you add that needs to use variables
52 in php_lua_globals, call TSRMLS_FETCH(); after declaring other
53 variables used by that function, or better yet, pass in TSRMLS_CC
54 after the last function argument and declare your utility function
55 with TSRMLS_DC after the last declared argument. Always refer to
56 the globals in your function as LUA_G(variable). You are
57 encouraged to rename these macros something shorter, see
58 examples in any other php module directory.
61 #ifdef ZTS
62 #define LUA_G(v) TSRMG(lua_globals_id, zend_lua_globals *, v)
63 #else
64 #define LUA_G(v) (lua_globals.v)
65 #endif
67 #endif /* PHP_LUA_H */
71 * Local variables:
72 * tab-width: 4
73 * c-basic-offset: 4
74 * End:
75 * vim600: noet sw=4 ts=4 fdm=marker
76 * vim<600: noet sw=4 ts=4