Skip to content

Inline functions instead of macros #6030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
6 changes: 4 additions & 2 deletions Zend/zend.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,9 @@ ZEND_API void zend_print_zval_r(zval *expr, int indent);
ZEND_API zend_string *zend_print_zval_r_to_str(zval *expr, int indent);
ZEND_API void zend_print_flat_zval_r(zval *expr);

#define zend_print_variable(var) \
zend_print_zval((var), 0)
static zend_always_inline size_t zend_print_variable(zval *var) {
return zend_print_zval(var, 0);
}

ZEND_API ZEND_COLD void zend_output_debug_string(zend_bool trigger_break, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 2, 3);

Expand All @@ -269,6 +270,7 @@ ZEND_API void free_estring(char **str_p);
END_EXTERN_C()

/* output support */
// TODO Convert to inline functions?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anything spelled UPPERCASE should stay a macro.

#define ZEND_WRITE(str, str_len) zend_write((str), (str_len))
#define ZEND_WRITE_EX(str, str_len) write_func((str), (str_len))
#define ZEND_PUTS(str) zend_write((str), strlen((str)))
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static zend_module_entry **module_post_deactivate_handlers;

static zend_class_entry **class_cleanup_handlers;

ZEND_API zend_result _zend_get_parameters_array_ex(uint32_t param_count, zval *argument_array) /* {{{ */
ZEND_API zend_result zend_get_parameters_array_ex(uint32_t param_count, zval *argument_array) /* {{{ */
{
zval *param_ptr;
uint32_t arg_count;
Expand Down
86 changes: 61 additions & 25 deletions Zend/zend_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,14 @@ typedef struct _zend_fcall_info_cache {
ZEND_API int zend_next_free_module(void);

BEGIN_EXTERN_C()
ZEND_API zend_result _zend_get_parameters_array_ex(uint32_t param_count, zval *argument_array);
ZEND_API zend_result zend_get_parameters_array_ex(uint32_t param_count, zval *argument_array);

/* internal function to efficiently copy parameters when executing __call() */
ZEND_API zend_result zend_copy_parameters_array(uint32_t param_count, zval *argument_array);

// TODO Replace _ex version with zend_get_parameters_array()
#define zend_get_parameters_array(ht, param_count, argument_array) \
_zend_get_parameters_array_ex(param_count, argument_array)
#define zend_get_parameters_array_ex(param_count, argument_array) \
_zend_get_parameters_array_ex(param_count, argument_array)
zend_get_parameters_array_ex(param_count, argument_array)
#define zend_parse_parameters_none() \
(EXPECTED(ZEND_NUM_ARGS() == 0) ? SUCCESS : (zend_wrong_parameters_none_error(), FAILURE))
#define zend_parse_parameters_none_throw() \
Expand Down Expand Up @@ -336,8 +335,9 @@ ZEND_API void zend_class_implements(zend_class_entry *class_entry, int num_inter

ZEND_API zend_result zend_register_class_alias_ex(const char *name, size_t name_len, zend_class_entry *ce, bool persistent);

#define zend_register_class_alias(name, ce) \
zend_register_class_alias_ex(name, sizeof(name)-1, ce, 1)
static inline zend_result zend_register_class_alias(const char *name, zend_class_entry *ce) {
return zend_register_class_alias_ex(name, strlen(name), ce, 1);
}
#define zend_register_ns_class_alias(ns, name, ce) \
zend_register_class_alias_ex(ZEND_NS_NAME(ns, name), sizeof(ZEND_NS_NAME(ns, name))-1, ce, 1)

Expand Down Expand Up @@ -444,15 +444,33 @@ ZEND_API void add_assoc_string_ex(zval *arg, const char *key, size_t key_len, co
ZEND_API void add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length);
ZEND_API void add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);

#define add_assoc_long(__arg, __key, __n) add_assoc_long_ex(__arg, __key, strlen(__key), __n)
#define add_assoc_null(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key))
#define add_assoc_bool(__arg, __key, __b) add_assoc_bool_ex(__arg, __key, strlen(__key), __b)
#define add_assoc_resource(__arg, __key, __r) add_assoc_resource_ex(__arg, __key, strlen(__key), __r)
#define add_assoc_double(__arg, __key, __d) add_assoc_double_ex(__arg, __key, strlen(__key), __d)
#define add_assoc_str(__arg, __key, __str) add_assoc_str_ex(__arg, __key, strlen(__key), __str)
#define add_assoc_string(__arg, __key, __str) add_assoc_string_ex(__arg, __key, strlen(__key), __str)
#define add_assoc_stringl(__arg, __key, __str, __length) add_assoc_stringl_ex(__arg, __key, strlen(__key), __str, __length)
#define add_assoc_zval(__arg, __key, __value) add_assoc_zval_ex(__arg, __key, strlen(__key), __value)
static inline void add_assoc_long(zval *arg, const char *key, zend_long n) {
add_assoc_long_ex(arg, key, strlen(key), n);
}
static inline void add_assoc_null(zval *arg, const char *key) {
add_assoc_null_ex(arg, key, strlen(key));
}
static inline void add_assoc_bool(zval *arg, const char *key, int b) {
add_assoc_bool_ex(arg, key, strlen(key), b);
}
static inline void add_assoc_resource(zval *arg, const char *key, zend_resource *r) {
add_assoc_resource_ex(arg, key, strlen(key), r);
}
static inline void add_assoc_double(zval *arg, const char *key, double d) {
add_assoc_double_ex(arg, key, strlen(key), d);
}
static inline void add_assoc_str(zval *arg, const char *key, zend_string *str) {
add_assoc_str_ex(arg, key, strlen(key), str);
}
static inline void add_assoc_string(zval *arg, const char *key, const char *str) {
add_assoc_string_ex(arg, key, strlen(key), str);
}
static inline void add_assoc_stringl(zval *arg, const char *key, const char *str, size_t length) {
add_assoc_stringl_ex(arg, key, strlen(key), str, length);
}
static inline void add_assoc_zval(zval *arg, const char *key, zval *value) {
add_assoc_zval_ex(arg, key, strlen(key), value);
}

ZEND_API void add_index_long(zval *arg, zend_ulong index, zend_long n);
ZEND_API void add_index_null(zval *arg, zend_ulong index);
Expand Down Expand Up @@ -494,17 +512,35 @@ ZEND_API void add_property_string_ex(zval *arg, const char *key, size_t key_len,
ZEND_API void add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length);
ZEND_API void add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);

#define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key), __n)
#define add_property_null(__arg, __key) add_property_null_ex(__arg, __key, strlen(__key))
#define add_property_bool(__arg, __key, __b) add_property_bool_ex(__arg, __key, strlen(__key), __b)
#define add_property_resource(__arg, __key, __r) add_property_resource_ex(__arg, __key, strlen(__key), __r)
#define add_property_double(__arg, __key, __d) add_property_double_ex(__arg, __key, strlen(__key), __d)
#define add_property_str(__arg, __key, __str) add_property_str_ex(__arg, __key, strlen(__key), __str)
#define add_property_string(__arg, __key, __str) add_property_string_ex(__arg, __key, strlen(__key), __str)
#define add_property_stringl(__arg, __key, __str, __length) add_property_stringl_ex(__arg, __key, strlen(__key), __str, __length)
#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key), __value)

static inline void add_property_long(zval *arg, const char *key, zend_long n) {
add_property_long_ex(arg, key, strlen(key), n);
}
static inline void add_property_null(zval *arg, const char *key) {
add_property_null_ex(arg, key, strlen(key));
}
static inline void add_property_bool(zval *arg, const char *key, bool b) {
add_property_bool_ex(arg, key, strlen(key), b);
}
static inline void add_property_resource(zval *arg, const char *key, zend_resource *r) {
add_property_resource_ex(arg, key, strlen(key), r);
}
static inline void add_property_double(zval *arg, const char *key, double d) {
add_property_double_ex(arg, key, strlen(key), d);
}
static inline void add_property_str(zval *arg, const char *key, zend_string *str) {
add_property_str_ex(arg, key, strlen(key), str);
}
static inline void add_property_string(zval *arg, const char *key, const char *str) {
add_property_string_ex(arg, key, strlen(key), str);
}
static inline void add_property_stringl(zval *arg, const char *key, const char *str, size_t length) {
add_property_stringl_ex(arg, key, strlen(key), str, length);
}
static inline void add_property_zval(zval *arg, const char *key, zval *value) {
add_property_zval_ex(arg, key, strlen(key), value);
}

// TODO Drop function_table argument?
ZEND_API zend_result _call_user_function_impl(zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], HashTable *named_params);

#define call_user_function(function_table, object, function_name, retval_ptr, param_count, params) \
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -2374,7 +2374,7 @@ ZEND_API zend_result ZEND_FASTCALL zend_hash_move_backwards_ex(HashTable *ht, Ha


/* This function should be made binary safe */
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos)
ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, const HashPosition *pos)
{
uint32_t idx;
Bucket *p;
Expand All @@ -2394,7 +2394,7 @@ ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zen
return HASH_KEY_NON_EXISTENT;
}

ZEND_API void ZEND_FASTCALL zend_hash_get_current_key_zval_ex(const HashTable *ht, zval *key, HashPosition *pos)
ZEND_API void ZEND_FASTCALL zend_hash_get_current_key_zval_ex(const HashTable *ht, zval *key, const HashPosition *pos)
{
uint32_t idx;
Bucket *p;
Expand Down
62 changes: 38 additions & 24 deletions Zend/zend_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define ZEND_HASH_H

#include "zend.h"
#include "zend_sort.h"

#define HASH_KEY_IS_STRING 1
#define HASH_KEY_IS_LONG 2
Expand Down Expand Up @@ -225,35 +226,45 @@ static zend_always_inline zend_bool zend_hash_index_exists(const HashTable *ht,
/* traversing */
ZEND_API HashPosition ZEND_FASTCALL zend_hash_get_current_pos(const HashTable *ht);

#define zend_hash_has_more_elements_ex(ht, pos) \
(zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTENT ? FAILURE : SUCCESS)
ZEND_API zend_result ZEND_FASTCALL zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
ZEND_API zend_result ZEND_FASTCALL zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
ZEND_API zend_result ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, HashPosition *pos);
ZEND_API void ZEND_FASTCALL zend_hash_get_current_key_zval_ex(const HashTable *ht, zval *key, HashPosition *pos);
ZEND_API zend_result ZEND_FASTCALL zend_hash_get_current_key_ex(const HashTable *ht, zend_string **str_index, zend_ulong *num_index, const HashPosition *pos);
ZEND_API void ZEND_FASTCALL zend_hash_get_current_key_zval_ex(const HashTable *ht, zval *key, const HashPosition *pos);
ZEND_API zend_result ZEND_FASTCALL zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos);
ZEND_API zval* ZEND_FASTCALL zend_hash_get_current_data_ex(HashTable *ht, HashPosition *pos);
ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos);
ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos);

#define zend_hash_has_more_elements(ht) \
zend_hash_has_more_elements_ex(ht, &(ht)->nInternalPointer)
#define zend_hash_move_forward(ht) \
zend_hash_move_forward_ex(ht, &(ht)->nInternalPointer)
#define zend_hash_move_backwards(ht) \
zend_hash_move_backwards_ex(ht, &(ht)->nInternalPointer)
#define zend_hash_get_current_key(ht, str_index, num_index) \
zend_hash_get_current_key_ex(ht, str_index, num_index, &(ht)->nInternalPointer)
#define zend_hash_get_current_key_zval(ht, key) \
zend_hash_get_current_key_zval_ex(ht, key, &(ht)->nInternalPointer)
#define zend_hash_get_current_key_type(ht) \
zend_hash_get_current_key_type_ex(ht, &(ht)->nInternalPointer)
#define zend_hash_get_current_data(ht) \
zend_hash_get_current_data_ex(ht, &(ht)->nInternalPointer)
#define zend_hash_internal_pointer_reset(ht) \
zend_hash_internal_pointer_reset_ex(ht, &(ht)->nInternalPointer)
#define zend_hash_internal_pointer_end(ht) \
zend_hash_internal_pointer_end_ex(ht, &(ht)->nInternalPointer)
static zend_always_inline zend_result zend_hash_has_more_elements_ex(HashTable *ht, HashPosition *pos) {
return (zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTENT ? FAILURE : SUCCESS);
}
static inline zend_result zend_hash_has_more_elements(HashTable *ht) {
return zend_hash_has_more_elements_ex(ht, &ht->nInternalPointer);
}
static inline zend_result zend_hash_move_forward(HashTable *ht) {
return zend_hash_move_forward_ex(ht, &ht->nInternalPointer);
}
static inline zend_result zend_hash_move_backwards(HashTable *ht) {
return zend_hash_move_backwards_ex(ht, &ht->nInternalPointer);
}
static inline zend_result zend_hash_get_current_key(const HashTable *ht, zend_string **str_index, zend_ulong *num_index) {
return zend_hash_get_current_key_ex(ht, str_index, num_index, &ht->nInternalPointer);
}
static inline void zend_hash_get_current_key_zval(const HashTable *ht, zval *key) {
zend_hash_get_current_key_zval_ex(ht, key, &ht->nInternalPointer);
}
static inline zend_result zend_hash_get_current_key_type(HashTable *ht) {
return zend_hash_get_current_key_type_ex(ht, &ht->nInternalPointer);
}
static inline zval* zend_hash_get_current_data(HashTable *ht) {
return zend_hash_get_current_data_ex(ht, &ht->nInternalPointer);
}
static inline void zend_hash_internal_pointer_reset(HashTable *ht) {
zend_hash_internal_pointer_reset_ex(ht, &ht->nInternalPointer);
}
static inline void zend_hash_internal_pointer_end(HashTable *ht) {
zend_hash_internal_pointer_end_ex(ht, &ht->nInternalPointer);
}

/* Copying, merging and sorting */
ZEND_API void ZEND_FASTCALL zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor);
Expand All @@ -268,9 +279,11 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t
ZEND_API void ZEND_FASTCALL zend_hash_sort_ex(HashTable *ht, sort_func_t sort_func, bucket_compare_func_t compare_func, zend_bool renumber);
ZEND_API zval* ZEND_FASTCALL zend_hash_minmax(const HashTable *ht, bucket_compare_func_t compar, uint32_t flag);

#define zend_hash_sort(ht, compare_func, renumber) \
zend_hash_sort_ex(ht, zend_sort, compare_func, renumber)
static inline void ZEND_FASTCALL zend_hash_sort(HashTable *ht, bucket_compare_func_t compare_func, zend_bool renumber) {
zend_hash_sort_ex(ht, zend_sort, compare_func, renumber);
}

// TODO Inline functions?
#define zend_hash_num_elements(ht) \
(ht)->nNumOfElements

Expand Down Expand Up @@ -345,6 +358,7 @@ static zend_always_inline void zend_hash_release(zend_array *array)

END_EXTERN_C()

// TODO Inline functions?
#define ZEND_INIT_SYMTABLE(ht) \
ZEND_INIT_SYMTABLE_EX(ht, 8, 0)

Expand Down
5 changes: 3 additions & 2 deletions Zend/zend_inheritance.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ BEGIN_EXTERN_C()
ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry *iface);
ZEND_API void zend_do_inheritance_ex(zend_class_entry *ce, zend_class_entry *parent_ce, zend_bool checked);

#define zend_do_inheritance(ce, parent_ce) \
zend_do_inheritance_ex(ce, parent_ce, 0)
static inline void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce) {
zend_do_inheritance_ex(ce, parent_ce, 0);
}

ZEND_API zend_result zend_do_link_class(zend_class_entry *ce, zend_string *lc_parent_name);

Expand Down
41 changes: 30 additions & 11 deletions Zend/zend_ini.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,22 +138,41 @@ END_EXTERN_C()
ZEND_INI_ENTRY3_EX(name, default_value, modifiable, on_modify, (void *) XtOffsetOf(struct_type, property_name), (void *) &struct_ptr, NULL, zend_ini_boolean_displayer_cb)
#endif

#define INI_INT(name) zend_ini_long((name), strlen(name), 0)
#define INI_FLT(name) zend_ini_double((name), strlen(name), 0)
#define INI_STR(name) zend_ini_string_ex((name), strlen(name), 0, NULL)
#define INI_BOOL(name) ((zend_bool) INI_INT(name))

#define INI_ORIG_INT(name) zend_ini_long((name), strlen(name), 1)
#define INI_ORIG_FLT(name) zend_ini_double((name), strlen(name), 1)
#define INI_ORIG_STR(name) zend_ini_string((name), strlen(name), 1)
#define INI_ORIG_BOOL(name) ((zend_bool) INI_ORIG_INT(name))
static inline zend_long INI_INT(const char *name) {
return zend_ini_long(name, strlen(name), 0);
}
static inline double INI_FLT(const char *name) {
return zend_ini_double(name, strlen(name), 0);
}
static inline char* INI_STR(const char *name) {
return zend_ini_string_ex(name, strlen(name), 0, NULL);
}
static inline bool INI_BOOL(const char *name) {
return (bool) zend_ini_long(name, strlen(name), 0);
}
static inline zend_long INI_ORIG_INT(const char *name) {
return zend_ini_long(name, strlen(name), 1);
}
static inline double INI_ORIG_FLT(const char *name) {
return zend_ini_double(name, strlen(name), 1);
}
static inline char* INI_ORIG_STR(const char *name) {
return zend_ini_string(name, strlen(name), 1);
}
static inline bool INI_ORIG_BOOL(const char *name) {
return (bool) zend_ini_long(name, strlen(name), 1);
}

#define REGISTER_INI_ENTRIES() zend_register_ini_entries(ini_entries, module_number)
#define UNREGISTER_INI_ENTRIES() zend_unregister_ini_entries(module_number)
#define DISPLAY_INI_ENTRIES() display_ini_entries(zend_module)

#define REGISTER_INI_DISPLAYER(name, displayer) zend_ini_register_displayer((name), strlen(name), displayer)
#define REGISTER_INI_BOOLEAN(name) REGISTER_INI_DISPLAYER(name, zend_ini_boolean_displayer_cb)
static inline zend_result REGISTER_INI_DISPLAYER(const char *name, void (*displayer)(zend_ini_entry *ini_entry, int type)) {
return zend_ini_register_displayer(name, strlen(name), displayer);
}
static inline zend_result REGISTER_INI_BOOLEAN(const char *name) {
return zend_ini_register_displayer(name, strlen(name), zend_ini_boolean_displayer_cb);
}

/* Standard message handlers */
BEGIN_EXTERN_C()
Expand Down
25 changes: 17 additions & 8 deletions Zend/zend_interfaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,23 @@ typedef struct _zend_user_iterator {

ZEND_API zval* zend_call_method(zend_object *object, zend_class_entry *obj_ce, zend_function **fn_proxy, const char *function_name, size_t function_name_len, zval *retval, uint32_t param_count, zval* arg1, zval* arg2);

#define zend_call_method_with_0_params(obj, obj_ce, fn_proxy, function_name, retval) \
zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 0, NULL, NULL)

#define zend_call_method_with_1_params(obj, obj_ce, fn_proxy, function_name, retval, arg1) \
zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 1, arg1, NULL)

#define zend_call_method_with_2_params(obj, obj_ce, fn_proxy, function_name, retval, arg1, arg2) \
zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 2, arg1, arg2)
static inline zval* zend_call_method_with_0_params(zend_object *object, zend_class_entry *obj_ce,
zend_function **fn_proxy, const char *function_name, zval *retval)
{
return zend_call_method(object, obj_ce, fn_proxy, function_name, strlen(function_name), retval, 0, NULL, NULL);
}

static inline zval* zend_call_method_with_1_params(zend_object *object, zend_class_entry *obj_ce,
zend_function **fn_proxy, const char *function_name, zval *retval, zval* arg1)
{
return zend_call_method(object, obj_ce, fn_proxy, function_name, strlen(function_name), retval, 1, arg1, NULL);
}

static inline zval* zend_call_method_with_2_params(zend_object *object, zend_class_entry *obj_ce,
zend_function **fn_proxy, const char *function_name, zval *retval, zval* arg1, zval* arg2)
{
return zend_call_method(object, obj_ce, fn_proxy, function_name, strlen(function_name), retval, 2, arg1, arg2);
}

#define REGISTER_MAGIC_INTERFACE(class_name, class_name_str) \
{\
Expand Down
23 changes: 19 additions & 4 deletions Zend/zend_llist.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,25 @@ ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos);
ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos);

#define zend_llist_get_first(l) zend_llist_get_first_ex(l, NULL)
#define zend_llist_get_last(l) zend_llist_get_last_ex(l, NULL)
#define zend_llist_get_next(l) zend_llist_get_next_ex(l, NULL)
#define zend_llist_get_prev(l) zend_llist_get_prev_ex(l, NULL)
static inline void *zend_llist_get_first(zend_llist *l)
{
return zend_llist_get_first_ex(l, NULL);
}

static inline void *zend_llist_get_last(zend_llist *l)
{
return zend_llist_get_last_ex(l, NULL);
}

static inline void *zend_llist_get_next(zend_llist *l)
{
return zend_llist_get_next_ex(l, NULL);
}

static inline void *zend_llist_get_prev(zend_llist *l)
{
return zend_llist_get_prev_ex(l, NULL);
}

END_EXTERN_C()

Expand Down
Loading