php extension use php7_ext_wrapper.h
parent
cfad73a8d5
commit
9f8acd52e9
|
|
@ -1,14 +1,4 @@
|
||||||
#ifdef HAVE_CONFIG_H
|
#include "php7_ext_wrapper.h"
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
#include <php.h>
|
|
||||||
|
|
||||||
#ifdef ZTS
|
|
||||||
#include "TSRM.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <SAPI.h>
|
|
||||||
#include <php_ini.h>
|
|
||||||
#include "ext/standard/info.h"
|
#include "ext/standard/info.h"
|
||||||
#include <zend_extensions.h>
|
#include <zend_extensions.h>
|
||||||
#include <zend_exceptions.h>
|
#include <zend_exceptions.h>
|
||||||
|
|
@ -28,20 +18,6 @@
|
||||||
#define MINOR_VERSION 0
|
#define MINOR_VERSION 0
|
||||||
#define PATCH_VERSION 3
|
#define PATCH_VERSION 3
|
||||||
|
|
||||||
#if PHP_MAJOR_VERSION < 7
|
|
||||||
typedef int zend_size_t;
|
|
||||||
#define ZEND_RETURN_STRINGL(s, l, dup) RETURN_STRINGL(s, l, dup)
|
|
||||||
#define ZEND_RETURN_STRING(s, dup) RETURN_STRING(s, dup)
|
|
||||||
#define zend_add_index_string(z, index, value, dup) \
|
|
||||||
add_index_string(z, index, value, dup)
|
|
||||||
#else
|
|
||||||
typedef size_t zend_size_t;
|
|
||||||
#define ZEND_RETURN_STRINGL(s, l, dup) RETURN_STRINGL(s, l)
|
|
||||||
#define ZEND_RETURN_STRING(s, dup) RETURN_STRING(s)
|
|
||||||
#define zend_add_index_string(z, index, value, dup) \
|
|
||||||
add_index_string(z, index, value)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3)
|
#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3)
|
||||||
const zend_fcall_info empty_fcall_info = { 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0 };
|
const zend_fcall_info empty_fcall_info = { 0, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0 };
|
||||||
#undef ZEND_BEGIN_ARG_INFO_EX
|
#undef ZEND_BEGIN_ARG_INFO_EX
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,9 @@
|
||||||
|
|
||||||
#if PHP_MAJOR_VERSION < 7
|
#if PHP_MAJOR_VERSION < 7
|
||||||
typedef int zend_size_t;
|
typedef int zend_size_t;
|
||||||
#define ZEND_RETURN_STRINGL_DUP(s, l) RETURN_STRINGL(s, l, 1)
|
#define ZEND_RETURN_STRING(s, dup) RETURN_STRING(s, dup)
|
||||||
#define ZEND_RETURN_STRINGL_EX(s, l, callback) \
|
#define ZEND_RETURN_STRINGL(s, l, dup) RETURN_STRINGL(s, l, dup)
|
||||||
|
#define ZEND_RETURN_STRINGL_CALLBACK(s, l, callback) \
|
||||||
do { \
|
do { \
|
||||||
RETVAL_STRINGL(s, l, 1); \
|
RETVAL_STRINGL(s, l, 1); \
|
||||||
callback(s); /* generally for free the pointer */ \
|
callback(s); /* generally for free the pointer */ \
|
||||||
|
|
@ -50,6 +51,9 @@ typedef int zend_size_t;
|
||||||
#define zend_add_assoc_bool_ex(z, key, key_len, b) \
|
#define zend_add_assoc_bool_ex(z, key, key_len, b) \
|
||||||
add_assoc_bool_ex(z, key, key_len, b)
|
add_assoc_bool_ex(z, key, key_len, b)
|
||||||
|
|
||||||
|
#define zend_add_index_string(z, index, value, dup) \
|
||||||
|
add_index_string(z, index, value, dup)
|
||||||
|
|
||||||
static inline int zend_hash_find_wrapper(HashTable *ht, char *key, int key_len,
|
static inline int zend_hash_find_wrapper(HashTable *ht, char *key, int key_len,
|
||||||
zval **value)
|
zval **value)
|
||||||
{
|
{
|
||||||
|
|
@ -77,8 +81,9 @@ static inline int zend_get_configuration_directive_wrapper(char *name, int len,
|
||||||
#else
|
#else
|
||||||
|
|
||||||
typedef size_t zend_size_t;
|
typedef size_t zend_size_t;
|
||||||
#define ZEND_RETURN_STRINGL_DUP(s, l) RETURN_STRINGL(s, l)
|
#define ZEND_RETURN_STRING(s, dup) RETURN_STRING(s)
|
||||||
#define ZEND_RETURN_STRINGL_EX(s, l, callback) \
|
#define ZEND_RETURN_STRINGL(s, l, dup) RETURN_STRINGL(s, l)
|
||||||
|
#define ZEND_RETURN_STRINGL_CALLBACK(s, l, callback) \
|
||||||
do { \
|
do { \
|
||||||
RETVAL_STRINGL(s, l); \
|
RETVAL_STRINGL(s, l); \
|
||||||
callback(s); \
|
callback(s); \
|
||||||
|
|
@ -108,6 +113,9 @@ typedef size_t zend_size_t;
|
||||||
#define zend_add_assoc_bool_ex(z, key, key_len, b) \
|
#define zend_add_assoc_bool_ex(z, key, key_len, b) \
|
||||||
add_assoc_bool_ex(z, key, key_len - 1, b)
|
add_assoc_bool_ex(z, key, key_len - 1, b)
|
||||||
|
|
||||||
|
#define zend_add_index_string(z, index, value, dup) \
|
||||||
|
add_index_string(z, index, value)
|
||||||
|
|
||||||
static inline int zend_hash_find_wrapper(HashTable *ht, char *key, int key_len,
|
static inline int zend_hash_find_wrapper(HashTable *ht, char *key, int key_len,
|
||||||
zval **value)
|
zval **value)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue