php_extractor.h (2753B)
1 /* 2 +----------------------------------------------------------------------+ 3 | PHP Version 5 | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 1997-2004 The PHP Group | 6 +----------------------------------------------------------------------+ 7 | This source file is subject to version 3.0 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_0.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 +----------------------------------------------------------------------+ 17 */ 18 19 /* $Id: php_extractor.h,v 1.1 2004/12/23 06:20:22 manfred Exp $ */ 20 21 #ifndef PHP_EXTRACTOR_H 22 #define PHP_EXTRACTOR_H 23 24 extern zend_module_entry extractor_module_entry; 25 #define phpext_extractor_ptr &extractor_module_entry 26 27 #ifdef PHP_WIN32 28 #define PHP_EXTRACTOR_API __declspec(dllexport) 29 #else 30 #define PHP_EXTRACTOR_API 31 #endif 32 33 #ifdef ZTS 34 #include "TSRM.h" 35 #endif 36 37 PHP_MINIT_FUNCTION(extractor); 38 PHP_MSHUTDOWN_FUNCTION(extractor); 39 PHP_RINIT_FUNCTION(extractor); 40 PHP_RSHUTDOWN_FUNCTION(extractor); 41 PHP_MINFO_FUNCTION(extractor); 42 43 PHP_FUNCTION(extractor_getkeywords); 44 45 /* 46 Declare any global variables you may need between the BEGIN 47 and END macros here: 48 49 ZEND_BEGIN_MODULE_GLOBALS(extractor) 50 long global_value; 51 char *global_string; 52 ZEND_END_MODULE_GLOBALS(extractor) 53 */ 54 55 /* In every utility function you add that needs to use variables 56 in php_extractor_globals, call TSRMLS_FETCH(); after declaring other 57 variables used by that function, or better yet, pass in TSRMLS_CC 58 after the last function argument and declare your utility function 59 with TSRMLS_DC after the last declared argument. Always refer to 60 the globals in your function as EXTRACTOR_G(variable). You are 61 encouraged to rename these macros something shorter, see 62 examples in any other php module directory. 63 */ 64 65 #ifdef ZTS 66 #define EXTRACTOR_G(v) TSRMG(extractor_globals_id, zend_extractor_globals *, v) 67 #else 68 #define EXTRACTOR_G(v) (extractor_globals.v) 69 #endif 70 71 #endif /* PHP_EXTRACTOR_H */ 72 73 74 /* 75 * Local variables: 76 * tab-width: 4 77 * c-basic-offset: 4 78 * End: 79 * vim600: noet sw=4 ts=4 fdm=marker 80 * vim<600: noet sw=4 ts=4 81 */