php-src/sapi/embed/php_embed.h

56 lines
1.8 KiB
C
Raw Normal View History

/*
+----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
2006-01-01 20:51:34 +08:00
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| https://www.php.net/license/3_01.txt |
| 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> |
+----------------------------------------------------------------------+
*/
#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) { \
php_embed_init(x, y); \
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(); \
}
#ifndef PHP_WIN32
#define EMBED_SAPI_API SAPI_API
#else
2015-01-03 17:22:58 +08:00
#define EMBED_SAPI_API
#endif
2014-12-17 17:52:28 +08:00
#ifdef ZTS
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);
extern EMBED_SAPI_API sapi_module_struct php_embed_module;
END_EXTERN_C()
#endif /* _PHP_EMBED_H_ */