@@ -28,6 +28,9 @@
|
|||||||
#if PHP_VERSION_ID >= 70000
|
#if PHP_VERSION_ID >= 70000
|
||||||
#define NXT_PHP7 1
|
#define NXT_PHP7 1
|
||||||
#endif
|
#endif
|
||||||
|
#if PHP_VERSION_ID >= 80000
|
||||||
|
#define NXT_PHP8 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* PHP 8 */
|
/* PHP 8 */
|
||||||
#ifndef TSRMLS_CC
|
#ifndef TSRMLS_CC
|
||||||
@@ -61,7 +64,9 @@ typedef struct {
|
|||||||
} nxt_php_run_ctx_t;
|
} nxt_php_run_ctx_t;
|
||||||
|
|
||||||
|
|
||||||
#ifdef NXT_PHP7
|
#if NXT_PHP8
|
||||||
|
typedef int (*nxt_php_disable_t)(const char *p, size_t size);
|
||||||
|
#elif NXT_PHP7
|
||||||
typedef int (*nxt_php_disable_t)(char *p, size_t size);
|
typedef int (*nxt_php_disable_t)(char *p, size_t size);
|
||||||
#else
|
#else
|
||||||
typedef int (*nxt_php_disable_t)(char *p, uint TSRMLS_DC);
|
typedef int (*nxt_php_disable_t)(char *p, uint TSRMLS_DC);
|
||||||
@@ -105,11 +110,15 @@ nxt_inline void nxt_php_set_str(nxt_unit_request_info_t *req, const char *name,
|
|||||||
static void nxt_php_set_cstr(nxt_unit_request_info_t *req, const char *name,
|
static void nxt_php_set_cstr(nxt_unit_request_info_t *req, const char *name,
|
||||||
const char *str, uint32_t len, zval *track_vars_array TSRMLS_DC);
|
const char *str, uint32_t len, zval *track_vars_array TSRMLS_DC);
|
||||||
static void nxt_php_register_variables(zval *track_vars_array TSRMLS_DC);
|
static void nxt_php_register_variables(zval *track_vars_array TSRMLS_DC);
|
||||||
|
#if NXT_PHP8
|
||||||
|
static void nxt_php_log_message(const char *message, int syslog_type_int);
|
||||||
|
#else
|
||||||
#ifdef NXT_HAVE_PHP_LOG_MESSAGE_WITH_SYSLOG_TYPE
|
#ifdef NXT_HAVE_PHP_LOG_MESSAGE_WITH_SYSLOG_TYPE
|
||||||
static void nxt_php_log_message(char *message, int syslog_type_int);
|
static void nxt_php_log_message(char *message, int syslog_type_int);
|
||||||
#else
|
#else
|
||||||
static void nxt_php_log_message(char *message TSRMLS_DC);
|
static void nxt_php_log_message(char *message TSRMLS_DC);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef NXT_PHP7
|
#ifdef NXT_PHP7
|
||||||
static size_t nxt_php_unbuffered_write(const char *str,
|
static size_t nxt_php_unbuffered_write(const char *str,
|
||||||
@@ -1240,6 +1249,10 @@ nxt_php_set_cstr(nxt_unit_request_info_t *req, const char *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if NXT_PHP8
|
||||||
|
static void
|
||||||
|
nxt_php_log_message(const char *message, int syslog_type_int)
|
||||||
|
#else
|
||||||
#ifdef NXT_HAVE_PHP_LOG_MESSAGE_WITH_SYSLOG_TYPE
|
#ifdef NXT_HAVE_PHP_LOG_MESSAGE_WITH_SYSLOG_TYPE
|
||||||
static void
|
static void
|
||||||
nxt_php_log_message(char *message, int syslog_type_int)
|
nxt_php_log_message(char *message, int syslog_type_int)
|
||||||
@@ -1247,6 +1260,7 @@ nxt_php_log_message(char *message, int syslog_type_int)
|
|||||||
static void
|
static void
|
||||||
nxt_php_log_message(char *message TSRMLS_DC)
|
nxt_php_log_message(char *message TSRMLS_DC)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
nxt_php_run_ctx_t *ctx;
|
nxt_php_run_ctx_t *ctx;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user