2002-09-29 10:45:25 +08:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2019-01-30 17:00:23 +08:00
|
|
|
| Copyright (c) The PHP Group |
|
2002-09-29 10:45:25 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 20:51:34 +08:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
2002-09-29 10:45:25 +08:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-06-11 04:04:29 +08:00
|
|
|
| available through the world-wide-web at the following url: |
|
2021-05-06 18:16:35 +08:00
|
|
|
| https://www.php.net/license/3_01.txt |
|
2002-09-29 10:45:25 +08:00
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
|
|
|
+----------------------------------------------------------------------+
|
2002-09-29 18:00:07 +08:00
|
|
|
| Author: Edin Kadribasic <edink@php.net> |
|
2002-09-29 10:45:25 +08:00
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _PHP_EMBED_H_
|
|
|
|
#define _PHP_EMBED_H_
|
|
|
|
|
|
|
|
#include <main/php.h>
|
|
|
|
#include <main/SAPI.h>
|
|
|
|
#include <main/php_main.h>
|
|
|
|
#include <main/php_variables.h>
|
|
|
|
#include <main/php_ini.h>
|
|
|
|
#include <zend_ini.h>
|
|
|
|
|
|
|
|
#define PHP_EMBED_START_BLOCK(x,y) { \
|
2005-12-29 14:02:17 +08:00
|
|
|
php_embed_init(x, y); \
|
2002-09-29 10:45:25 +08:00
|
|
|
zend_first_try {
|
|
|
|
|
|
|
|
#define PHP_EMBED_END_BLOCK() \
|
|
|
|
} zend_catch { \
|
|
|
|
/* int exit_status = EG(exit_status); */ \
|
|
|
|
} zend_end_try(); \
|
2014-12-14 06:06:14 +08:00
|
|
|
php_embed_shutdown(); \
|
2002-09-29 10:45:25 +08:00
|
|
|
}
|
|
|
|
|
2009-07-31 04:20:56 +08:00
|
|
|
#ifndef PHP_WIN32
|
|
|
|
#define EMBED_SAPI_API SAPI_API
|
|
|
|
#else
|
2015-01-03 17:22:58 +08:00
|
|
|
#define EMBED_SAPI_API
|
|
|
|
#endif
|
2009-07-31 04:20:56 +08:00
|
|
|
|
2014-12-17 17:52:28 +08:00
|
|
|
#ifdef ZTS
|
2016-03-03 23:46:04 +08:00
|
|
|
ZEND_TSRMLS_CACHE_EXTERN()
|
2014-12-17 17:52:28 +08:00
|
|
|
#endif
|
|
|
|
|
2015-01-03 17:22:58 +08:00
|
|
|
BEGIN_EXTERN_C()
|
2014-12-17 17:52:28 +08:00
|
|
|
EMBED_SAPI_API int php_embed_init(int argc, char **argv);
|
2014-12-14 06:06:14 +08:00
|
|
|
EMBED_SAPI_API void php_embed_shutdown(void);
|
2009-07-31 04:20:56 +08:00
|
|
|
extern EMBED_SAPI_API sapi_module_struct php_embed_module;
|
2002-09-29 10:45:25 +08:00
|
|
|
END_EXTERN_C()
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* _PHP_EMBED_H_ */
|