#include "zend_operators.h"
#include "zend_globals.h"
-
-void free_zend_constant(zend_constant *c)
+void free_zend_constant(zend_constant *c) /* {{{ */
{
if (!(c->flags & CONST_PERSISTENT)) {
zval_dtor(&c->value);
}
free(c->name.v);
}
+/* }}} */
-
-void copy_zend_constant(zend_constant *c)
+void copy_zend_constant(zend_constant *c) /* {{{ */
{
TSRMLS_FETCH();
if (UG(unicode)) {
zval_copy_ctor(&c->value);
}
}
+/* }}} */
-
-void zend_copy_constants(HashTable *target, HashTable *source)
+void zend_copy_constants(HashTable *target, HashTable *source) /* {{{ */
{
zend_constant tmp_constant;
zend_hash_copy(target, source, (copy_ctor_func_t) copy_zend_constant, &tmp_constant, sizeof(zend_constant));
}
+/* }}} */
-
-static int clean_non_persistent_constant(zend_constant *c TSRMLS_DC)
+static int clean_non_persistent_constant(zend_constant *c TSRMLS_DC) /* {{{ */
{
return (c->flags & CONST_PERSISTENT) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE;
}
+/* }}} */
-
-static int clean_non_persistent_constant_full(zend_constant *c TSRMLS_DC)
+static int clean_non_persistent_constant_full(zend_constant *c TSRMLS_DC) /* {{{ */
{
return (c->flags & CONST_PERSISTENT) ? 0 : 1;
}
+/* }}} */
-
-static int clean_module_constant(zend_constant *c, int *module_number TSRMLS_DC)
+static int clean_module_constant(zend_constant *c, int *module_number TSRMLS_DC) /* {{{ */
{
if (c->module_number == *module_number) {
return 1;
return 0;
}
}
+/* }}} */
-
-void clean_module_constants(int module_number TSRMLS_DC)
+void clean_module_constants(int module_number TSRMLS_DC) /* {{{ */
{
zend_hash_apply_with_argument(EG(zend_constants), (apply_func_arg_t) clean_module_constant, (void *) &module_number TSRMLS_CC);
}
+/* }}} */
-
-int zend_startup_constants(TSRMLS_D)
+int zend_startup_constants(TSRMLS_D) /* {{{ */
{
EG(zend_constants) = (HashTable *) malloc(sizeof(HashTable));
}
return SUCCESS;
}
+/* }}} */
-
-
-void zend_register_standard_constants(TSRMLS_D)
+void zend_register_standard_constants(TSRMLS_D) /* {{{ */
{
REGISTER_MAIN_LONG_CONSTANT("E_ERROR", E_ERROR, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("E_RECOVERABLE_ERROR", E_RECOVERABLE_ERROR, CONST_PERSISTENT | CONST_CS);
zend_register_constant(&c TSRMLS_CC);
}
}
+/* }}} */
-
-int zend_shutdown_constants(TSRMLS_D)
+int zend_shutdown_constants(TSRMLS_D) /* {{{ */
{
zend_hash_destroy(EG(zend_constants));
free(EG(zend_constants));
return SUCCESS;
}
+/* }}} */
-
-void clean_non_persistent_constants(TSRMLS_D)
+void clean_non_persistent_constants(TSRMLS_D) /* {{{ */
{
if (EG(full_tables_cleanup)) {
zend_hash_apply(EG(zend_constants), (apply_func_t) clean_non_persistent_constant_full TSRMLS_CC);
zend_hash_reverse_apply(EG(zend_constants), (apply_func_t) clean_non_persistent_constant TSRMLS_CC);
}
}
+/* }}} */
-
-ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number TSRMLS_DC)
+ZEND_API void zend_register_long_constant(char *name, uint name_len, long lval, int flags, int module_number TSRMLS_DC) /* {{{ */
{
zend_constant c;
c.module_number = module_number;
zend_u_register_constant(ZEND_STR_TYPE, &c TSRMLS_CC);
}
+/* }}} */
-
-ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number TSRMLS_DC)
+ZEND_API void zend_register_double_constant(char *name, uint name_len, double dval, int flags, int module_number TSRMLS_DC) /* {{{ */
{
zend_constant c;
c.module_number = module_number;
zend_u_register_constant(ZEND_STR_TYPE, &c TSRMLS_CC);
}
+/* }}} */
-
-ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number TSRMLS_DC)
+ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number TSRMLS_DC) /* {{{ */
{
zend_constant c;
c.module_number = module_number;
zend_u_register_constant(ZEND_STR_TYPE, &c TSRMLS_CC);
}
+/* }}} */
-
-ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number TSRMLS_DC)
+ZEND_API void zend_register_string_constant(char *name, uint name_len, char *strval, int flags, int module_number TSRMLS_DC) /* {{{ */
{
zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number TSRMLS_CC);
}
+/* }}} */
-
-ZEND_API int zend_u_get_constant(zend_uchar type, zstr name, uint name_len, zval *result, zend_class_entry *scope TSRMLS_DC)
+ZEND_API int zend_u_get_constant(zend_uchar type, zstr name, uint name_len, zval *result, zend_class_entry *scope TSRMLS_DC) /* {{{ */
{
zend_constant *c;
int retval = 1;
return retval;
}
+/* }}} */
-ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC)
+ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC) /* {{{ */
{
return zend_u_get_constant(IS_STRING, ZSTR(name), name_len, result, NULL TSRMLS_CC);
}
+/* }}} */
-ZEND_API int zend_u_register_constant(zend_uchar type, zend_constant *c TSRMLS_DC)
+ZEND_API int zend_u_register_constant(zend_uchar type, zend_constant *c TSRMLS_DC) /* {{{ */
{
unsigned int lookup_name_len;
zstr lookup_name;
}
return ret;
}
+/* }}} */
-ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
+ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC) /* {{{ */
{
if (UG(unicode)) {
UChar *ustr;
return zend_u_register_constant(IS_STRING, c TSRMLS_CC);
}
}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
#include "zend_interfaces.h"
#include "zend_exceptions.h"
-
-ZEND_API void zend_register_default_classes(TSRMLS_D)
+ZEND_API void zend_register_default_classes(TSRMLS_D) /* {{{ */
{
zend_register_interfaces(TSRMLS_C);
zend_register_default_exception(TSRMLS_C);
zend_register_unicode_exceptions(TSRMLS_C);
zend_register_iterator_wrapper(TSRMLS_C);
}
+/* }}} */
/*
* Local variables:
unsigned int allocated;
} dynamic_array;
-ZEND_API int zend_dynamic_array_init(dynamic_array *da, unsigned int element_size, unsigned int size)
+ZEND_API int zend_dynamic_array_init(dynamic_array *da, unsigned int element_size, unsigned int size) /* {{{ */
{
da->element_size = element_size;
da->allocated = size;
}
return 0;
}
+/* }}} */
-ZEND_API void *zend_dynamic_array_push(dynamic_array *da)
+ZEND_API void *zend_dynamic_array_push(dynamic_array *da) /* {{{ */
{
if (da->current == da->allocated) {
da->allocated *= 2;
}
return (void *)(da->array+(da->current++)*da->element_size);
}
+/* }}} */
-ZEND_API void *zend_dynamic_array_pop(dynamic_array *da)
+ZEND_API void *zend_dynamic_array_pop(dynamic_array *da) /* {{{ */
{
return (void *)(da->array+(--(da->current))*da->element_size);
}
+/* }}} */
-ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index)
+ZEND_API void *zend_dynamic_array_get_element(dynamic_array *da, unsigned int index) /* {{{ */
{
if (index >= da->current) {
return NULL;
}
return (void *)(da->array+index*da->element_size);
}
+/* }}} */
/*
* Local variables:
#define TEMP_VAR_STACK_LIMIT 2000
-static inline void zend_pzval_unlock_func(zval *z, zend_free_op *should_free, int unref)
+static inline void zend_pzval_unlock_func(zval *z, zend_free_op *should_free, int unref) /* {{{ */
{
if (!--z->refcount) {
z->refcount = 1;
}
}
}
+/* }}} */
-static inline void zend_pzval_unlock_free_func(zval *z)
+static inline void zend_pzval_unlock_free_func(zval *z) /* {{{ */
{
if (!--z->refcount) {
zval_dtor(z);
safe_free_zval_ptr(z);
}
}
+/* }}} */
#define PZVAL_UNLOCK(z, f) zend_pzval_unlock_func(z, f, 1)
#define PZVAL_UNLOCK_EX(z, f, u) zend_pzval_unlock_func(z, f, u)
#define CV_OF(i) (EG(current_execute_data)->CVs[i])
#define CV_DEF_OF(i) (EG(active_op_array)->vars[i])
-ZEND_API zval** zend_get_compiled_variable_value(zend_execute_data *execute_data_ptr, zend_uint var)
+ZEND_API zval** zend_get_compiled_variable_value(zend_execute_data *execute_data_ptr, zend_uint var) /* {{{ */
{
return execute_data_ptr->CVs[var];
}
+/* }}} */
-static inline void zend_get_cv_address(zend_uchar utype, zend_compiled_variable *cv, zval ***ptr, temp_variable *Ts TSRMLS_DC)
+static inline void zend_get_cv_address(zend_uchar utype, zend_compiled_variable *cv, zval ***ptr, temp_variable *Ts TSRMLS_DC) /* {{{ */
{
zval *new_zval = &EG(uninitialized_zval);
new_zval->refcount++;
zend_u_hash_quick_update(EG(active_symbol_table), utype, cv->name, cv->name_len+1, cv->hash_value, &new_zval, sizeof(zval *), (void **)ptr);
}
+/* }}} */
-static inline zval *_get_zval_ptr_tmp(znode *node, temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
+static inline zval *_get_zval_ptr_tmp(znode *node, temp_variable *Ts, zend_free_op *should_free TSRMLS_DC) /* {{{ */
{
return should_free->var = &T(node->u.var).tmp_var;
}
+/* }}} */
-static inline zval *_get_zval_ptr_var(znode *node, temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
+static inline zval *_get_zval_ptr_var(znode *node, temp_variable *Ts, zend_free_op *should_free TSRMLS_DC) /* {{{ */
{
if (T(node->u.var).var.ptr) {
PZVAL_UNLOCK(T(node->u.var).var.ptr, should_free);
return ptr;
}
}
+/* }}} */
-static inline zval *_get_zval_ptr_cv(znode *node, temp_variable *Ts, int type TSRMLS_DC)
+static inline zval *_get_zval_ptr_cv(znode *node, temp_variable *Ts, int type TSRMLS_DC) /* {{{ */
{
zval ***ptr = &CV_OF(node->u.var);
}
return **ptr;
}
+/* }}} */
-static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) /* {{{ */
{
/* should_free->is_var = 0; */
switch (node->op_type) {
}
return NULL;
}
+/* }}} */
-static inline zval **_get_zval_ptr_ptr_var(znode *node, temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
+static inline zval **_get_zval_ptr_ptr_var(znode *node, temp_variable *Ts, zend_free_op *should_free TSRMLS_DC) /* {{{ */
{
zval** ptr_ptr = T(node->u.var).var.ptr_ptr;
}
return ptr_ptr;
}
+/* }}} */
-static inline zval **_get_zval_ptr_ptr_cv(znode *node, temp_variable *Ts, int type TSRMLS_DC)
+static inline zval **_get_zval_ptr_ptr_cv(znode *node, temp_variable *Ts, int type TSRMLS_DC) /* {{{ */
{
zval ***ptr = &CV_OF(node->u.var);
}
return *ptr;
}
+/* }}} */
-static inline zval **_get_zval_ptr_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+static inline zval **_get_zval_ptr_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) /* {{{ */
{
if (node->op_type == IS_CV) {
should_free->var = 0;
return NULL;
}
}
+/* }}} */
-static inline zval *_get_obj_zval_ptr_unused(TSRMLS_D)
+static inline zval *_get_obj_zval_ptr_unused(TSRMLS_D) /* {{{ */
{
if (EG(This)) {
return EG(This);
return NULL;
}
}
+/* }}} */
-static inline zval **_get_obj_zval_ptr_ptr(znode *op, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+static inline zval **_get_obj_zval_ptr_ptr(znode *op, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) /* {{{ */
{
if (op->op_type == IS_UNUSED) {
if (EG(This)) {
}
return get_zval_ptr_ptr(op, Ts, should_free, type);
}
+/* }}} */
-static inline zval **_get_obj_zval_ptr_ptr_unused(TSRMLS_D)
+static inline zval **_get_obj_zval_ptr_ptr_unused(TSRMLS_D) /* {{{ */
{
if (EG(This)) {
return &EG(This);
return NULL;
}
}
+/* }}} */
-static inline zval *_get_obj_zval_ptr(znode *op, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+static inline zval *_get_obj_zval_ptr(znode *op, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) /* {{{ */
{
if (op->op_type == IS_UNUSED) {
if (EG(This)) {
}
return get_zval_ptr(op, Ts, should_free, type);
}
+/* }}} */
-static inline void zend_switch_free(zend_op *opline, temp_variable *Ts TSRMLS_DC)
+static inline void zend_switch_free(zend_op *opline, temp_variable *Ts TSRMLS_DC) /* {{{ */
{
switch (opline->op1.op_type) {
case IS_VAR:
EMPTY_SWITCH_DEFAULT_CASE()
}
}
+/* }}} */
-static void zend_assign_to_variable_reference(zval **variable_ptr_ptr, zval **value_ptr_ptr TSRMLS_DC)
+static void zend_assign_to_variable_reference(zval **variable_ptr_ptr, zval **value_ptr_ptr TSRMLS_DC) /* {{{ */
{
zval *variable_ptr;
zval *value_ptr;
(*variable_ptr_ptr)->is_ref = 1;
}
}
+/* }}} */
-static inline void make_real_object(zval **object_ptr TSRMLS_DC)
+static inline void make_real_object(zval **object_ptr TSRMLS_DC) /* {{{ */
{
/* this should modify object only if it's empty */
if (Z_TYPE_PP(object_ptr) == IS_NULL
object_init(*object_ptr);
}
}
+/* }}} */
-static inline char * zend_verify_arg_class_kind(zend_arg_info *cur_arg_info, zstr *class_name, zend_class_entry **pce TSRMLS_DC)
+static inline char * zend_verify_arg_class_kind(zend_arg_info *cur_arg_info, zstr *class_name, zend_class_entry **pce TSRMLS_DC) /* {{{ */
{
*pce = zend_u_fetch_class(UG(unicode) ? IS_UNICODE : IS_STRING, cur_arg_info->class_name, cur_arg_info->class_name_len, (ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_NO_AUTOLOAD) TSRMLS_CC);
return "be an instance of ";
}
}
+/* }}} */
-static inline int zend_verify_arg_error(zend_function *zf, zend_uint arg_num, zend_arg_info *cur_arg_info, char *need_msg, zstr need_kind, char *given_msg, zstr given_kind TSRMLS_DC)
+static inline int zend_verify_arg_error(zend_function *zf, zend_uint arg_num, zend_arg_info *cur_arg_info, char *need_msg, zstr need_kind, char *given_msg, zstr given_kind TSRMLS_DC) /* {{{ */
{
zend_execute_data *ptr = EG(current_execute_data)->prev_execute_data;
zstr fname = zf->common.function_name;
}
return 0;
}
+/* }}} */
-static inline int zend_verify_arg_type(zend_function *zf, zend_uint arg_num, zval *arg TSRMLS_DC)
+static inline int zend_verify_arg_type(zend_function *zf, zend_uint arg_num, zval *arg TSRMLS_DC) /* {{{ */
{
zend_arg_info *cur_arg_info;
char *need_msg;
}
return 1;
}
+/* }}} */
-
-static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode *op2, znode *value_op, temp_variable *Ts, int opcode TSRMLS_DC)
+static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode *op2, znode *value_op, temp_variable *Ts, int opcode TSRMLS_DC) /* {{{ */
{
zval *object;
zend_free_op free_op2, free_value;
zval_ptr_dtor(&value);
FREE_OP_IF_VAR(free_value);
}
+/* }}} */
-
-static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2, zval *value, int type, temp_variable *Ts TSRMLS_DC)
+static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2, zval *value, int type, temp_variable *Ts TSRMLS_DC) /* {{{ */
{
zend_free_op free_op1;
zval **variable_ptr_ptr = get_zval_ptr_ptr(op1, Ts, &free_op1, BP_VAR_W);
}
FREE_OP_VAR_PTR(free_op1);
}
+/* }}} */
-
-static inline void zend_receive(zval **variable_ptr_ptr, zval *value TSRMLS_DC)
+static inline void zend_receive(zval **variable_ptr_ptr, zval *value TSRMLS_DC) /* {{{ */
{
(*variable_ptr_ptr)->refcount--;
*variable_ptr_ptr = value;
value->refcount++;
}
+/* }}} */
/* Utility Functions for Extensions */
-static void zend_extension_statement_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
+static void zend_extension_statement_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC) /* {{{ */
{
if (extension->statement_handler) {
extension->statement_handler(op_array);
}
}
+/* }}} */
-
-static void zend_extension_fcall_begin_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
+static void zend_extension_fcall_begin_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC) /* {{{ */
{
if (extension->fcall_begin_handler) {
extension->fcall_begin_handler(op_array);
}
}
+/* }}} */
-
-static void zend_extension_fcall_end_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
+static void zend_extension_fcall_end_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC) /* {{{ */
{
if (extension->fcall_end_handler) {
extension->fcall_end_handler(op_array);
}
}
+/* }}} */
-
-static inline HashTable *zend_get_target_symbol_table(zend_op *opline, temp_variable *Ts, int type, zval *variable TSRMLS_DC)
+static inline HashTable *zend_get_target_symbol_table(zend_op *opline, temp_variable *Ts, int type, zval *variable TSRMLS_DC) /* {{{ */
{
switch (opline->op2.u.EA.type) {
case ZEND_FETCH_LOCAL:
}
return NULL;
}
+/* }}} */
-static inline zval **zend_fetch_dimension_address_inner(HashTable *ht, zval *dim, int type TSRMLS_DC)
+static inline zval **zend_fetch_dimension_address_inner(HashTable *ht, zval *dim, int type TSRMLS_DC) /* {{{ */
{
zval **retval;
zstr offset_key;
}
return retval;
}
+/* }}} */
-static void zend_fetch_dimension_address(temp_variable *result, zval **container_ptr, zval *dim, int dim_is_tmp_var, int type TSRMLS_DC)
+static void zend_fetch_dimension_address(temp_variable *result, zval **container_ptr, zval *dim, int dim_is_tmp_var, int type TSRMLS_DC) /* {{{ */
{
zval *container;
AI_USE_PTR(result->var);
}
}
+/* }}} */
-static void zend_fetch_property_address(temp_variable *result, zval **container_ptr, zval *prop_ptr, int type TSRMLS_DC)
+static void zend_fetch_property_address(temp_variable *result, zval **container_ptr, zval *prop_ptr, int type TSRMLS_DC) /* {{{ */
{
zval *container;
PZVAL_LOCK(*result->var.ptr_ptr);
}
}
+/* }}} */
-static inline zend_brk_cont_element* zend_brk_cont(int nest_levels, int array_offset, zend_op_array *op_array, temp_variable *Ts TSRMLS_DC)
+static inline zend_brk_cont_element* zend_brk_cont(int nest_levels, int array_offset, zend_op_array *op_array, temp_variable *Ts TSRMLS_DC) /* {{{ */
{
int original_nest_levels;
zend_brk_cont_element *jmp_to;
} while (--nest_levels > 0);
return jmp_to;
}
+/* }}} */
#if ZEND_INTENSIVE_DEBUGGING
zend_hash_apply(EG(active_symbol_table), (apply_func_t) zend_check_symbol TSRMLS_CC); \
}
-static int zend_check_symbol(zval **pz TSRMLS_DC)
+static int zend_check_symbol(zval **pz TSRMLS_DC) /* {{{ */
{
if (Z_TYPE_PP(pz) > 9) {
fprintf(stderr, "Warning! %x has invalid type!\n", *pz);
return 0;
}
-
+/* }}} */
#else
#define CHECK_SYMBOL_TABLES()
ZEND_API opcode_handler_t *zend_opcode_handlers;
-ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC)
+ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC) /* {{{ */
{
zval **return_value_ptr = &(*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.u.var)).var.ptr;
((zend_internal_function *) execute_data_ptr->function_state.function)->handler(execute_data_ptr->opline->extended_value, *return_value_ptr, return_value_ptr, execute_data_ptr->object, return_value_used TSRMLS_CC);
}
+/* }}} */
#define ZEND_VM_NEXT_OPCODE() \
CHECK_SYMBOL_TABLES() \
#include "zend_vm_execute.h"
-ZEND_API int zend_set_user_opcode_handler(zend_uchar opcode, opcode_handler_t handler)
+ZEND_API int zend_set_user_opcode_handler(zend_uchar opcode, opcode_handler_t handler) /* {{{ */
{
if (opcode != ZEND_USER_OPCODE) {
zend_user_opcodes[opcode] = ZEND_USER_OPCODE;
}
return FAILURE;
}
+/* }}} */
-ZEND_API opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode)
+ZEND_API opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode) /* {{{ */
{
return zend_user_opcode_handlers[opcode];
}
+/* }}} */
-ZEND_API zval *zend_get_zval_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) {
+ZEND_API zval *zend_get_zval_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) { /* {{{ */
return get_zval_ptr(node, Ts, should_free, type);
}
+/* }}} */
-ZEND_API zval **zend_get_zval_ptr_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) {
+ZEND_API zval **zend_get_zval_ptr_ptr(znode *node, temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) { /* {{{ */
return get_zval_ptr_ptr(node, Ts, should_free, type);
}
+/* }}} */
/*
* Local variables:
#if 0&&ZEND_DEBUG
static void (*original_sigsegv_handler)(int);
-static void zend_handle_sigsegv(int dummy)
+static void zend_handle_sigsegv(int dummy) /* {{{ */
{
fflush(stdout);
fflush(stderr);
original_sigsegv_handler(dummy);
}
}
+/* }}} */
#endif
-
-static void zend_extension_activator(zend_extension *extension TSRMLS_DC)
+static void zend_extension_activator(zend_extension *extension TSRMLS_DC) /* {{{ */
{
if (extension->activate) {
extension->activate();
}
}
+/* }}} */
-
-static void zend_extension_deactivator(zend_extension *extension TSRMLS_DC)
+static void zend_extension_deactivator(zend_extension *extension TSRMLS_DC) /* {{{ */
{
if (extension->deactivate) {
extension->deactivate();
}
}
+/* }}} */
-
-static int clean_non_persistent_function(zend_function *function TSRMLS_DC)
+static int clean_non_persistent_function(zend_function *function TSRMLS_DC) /* {{{ */
{
return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE;
}
+/* }}} */
-
-static int clean_non_persistent_function_full(zend_function *function TSRMLS_DC)
+static int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) /* {{{ */
{
return (function->type != ZEND_INTERNAL_FUNCTION);
}
+/* }}} */
-
-static int clean_non_persistent_class(zend_class_entry **ce TSRMLS_DC)
+static int clean_non_persistent_class(zend_class_entry **ce TSRMLS_DC) /* {{{ */
{
return ((*ce)->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE;
}
+/* }}} */
-
-static int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC)
+static int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) /* {{{ */
{
return ((*ce)->type != ZEND_INTERNAL_CLASS);
}
+/* }}} */
-
-void init_executor(TSRMLS_D)
+void init_executor(TSRMLS_D) /* {{{ */
{
INIT_ZVAL(EG(uninitialized_zval));
/* trick to make uninitialized_zval never be modified, passed by ref, etc. */
EG(active) = 1;
}
+/* }}} */
-static int zval_call_destructor(zval **zv TSRMLS_DC)
+static int zval_call_destructor(zval **zv TSRMLS_DC) /* {{{ */
{
if (Z_TYPE_PP(zv) == IS_OBJECT && (*zv)->refcount == 1) {
return ZEND_HASH_APPLY_REMOVE;
return ZEND_HASH_APPLY_KEEP;
}
}
+/* }}} */
-void shutdown_destructors(TSRMLS_D) {
+void shutdown_destructors(TSRMLS_D) /* {{{ */
+{
zend_try {
int symbols;
do {
zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC);
} zend_end_try();
}
+/* }}} */
-void shutdown_executor(TSRMLS_D)
+void shutdown_executor(TSRMLS_D) /* {{{ */
{
zend_try {
/* Removed because this can not be safely done, e.g. in this situation:
} zend_end_try();
EG(active) = 0;
}
-
+/* }}} */
/* return class name and "::" or "". */
-ZEND_API zstr get_active_class_name(char **space TSRMLS_DC)
+ZEND_API zstr get_active_class_name(char **space TSRMLS_DC) /* {{{ */
{
if (!zend_is_executing(TSRMLS_C)) {
if (space) {
return EMPTY_ZSTR;
}
}
+/* }}} */
-
-ZEND_API zstr get_active_function_name(TSRMLS_D)
+ZEND_API zstr get_active_function_name(TSRMLS_D) /* {{{ */
{
zstr ret;
return NULL_ZSTR;
}
}
+/* }}} */
-
-ZEND_API char *zend_get_executed_filename(TSRMLS_D)
+ZEND_API char *zend_get_executed_filename(TSRMLS_D) /* {{{ */
{
if (EG(active_op_array)) {
return EG(active_op_array)->filename;
return "[no active file]";
}
}
+/* }}} */
-
-ZEND_API uint zend_get_executed_lineno(TSRMLS_D)
+ZEND_API uint zend_get_executed_lineno(TSRMLS_D) /* {{{ */
{
if (EG(opline_ptr)) {
return active_opline->lineno;
return 0;
}
}
+/* }}} */
-
-ZEND_API zend_bool zend_is_executing(TSRMLS_D)
+ZEND_API zend_bool zend_is_executing(TSRMLS_D) /* {{{ */
{
return EG(in_execution);
}
+/* }}} */
-
-ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC)
+ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC) /* {{{ */
{
#if DEBUG_ZEND>=2
printf("Reducing refcount for %x (%x): %d->%d\n", *zval_ptr, zval_ptr, (*zval_ptr)->refcount, (*zval_ptr)->refcount-1);
(*zval_ptr)->is_ref = 0;
}
}
+/* }}} */
-
-ZEND_API void _zval_internal_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC)
+ZEND_API void _zval_internal_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC) /* {{{ */
{
#if DEBUG_ZEND>=2
printf("Reducing refcount for %x (%x): %d->%d\n", *zval_ptr, zval_ptr, (*zval_ptr)->refcount, (*zval_ptr)->refcount-1);
(*zval_ptr)->is_ref = 0;
}
}
+/* }}} */
-
-ZEND_API int zend_is_true(zval *op)
+ZEND_API int zend_is_true(zval *op) /* {{{ */
{
return i_zend_is_true(op);
}
+/* }}} */
#include "../TSRM/tsrm_strtok_r.h"
#define IS_CONSTANT_VISITED(p) (Z_TYPE_P(p) & IS_VISITED_CONSTANT)
#define MARK_CONSTANT_VISITED(p) Z_TYPE_P(p) |= IS_VISITED_CONSTANT
-ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *scope TSRMLS_DC)
+ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *scope TSRMLS_DC) /* {{{ */
{
zval *p = *pp;
zend_bool inline_change = (zend_bool) (zend_uintptr_t) arg;
}
return 0;
}
+/* }}} */
-ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
+ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC) /* {{{ */
{
return zval_update_constant_ex(pp, arg, NULL TSRMLS_CC);
}
+/* }}} */
-int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, zend_uint param_count, zval *params[] TSRMLS_DC)
+int call_user_function(HashTable *function_table, zval **object_pp, zval *function_name, zval *retval_ptr, zend_uint param_count, zval *params[] TSRMLS_DC) /* {{{ */
{
zval ***params_array;
zend_uint i;
}
return ex_retval;
}
+/* }}} */
-
-int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, zend_uint param_count, zval **params[], int no_separation, HashTable *symbol_table TSRMLS_DC)
+int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, zend_uint param_count, zval **params[], int no_separation, HashTable *symbol_table TSRMLS_DC) /* {{{ */
{
zend_fcall_info fci;
return zend_call_function(&fci, NULL TSRMLS_CC);
}
+/* }}} */
-
-int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TSRMLS_DC)
+int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TSRMLS_DC) /* {{{ */
{
zend_uint i;
zval **original_return_value;
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int zend_u_lookup_class_ex(zend_uchar type, zstr name, int name_length, int use_autoload, int do_normalize, zend_class_entry ***ce TSRMLS_DC)
+ZEND_API int zend_u_lookup_class_ex(zend_uchar type, zstr name, int name_length, int use_autoload, int do_normalize, zend_class_entry ***ce TSRMLS_DC) /* {{{ */
{
zval **args[1];
zval autoload_function;
}
return retval;
}
+/* }}} */
-ZEND_API int zend_u_lookup_class(zend_uchar type, zstr name, int name_length, zend_class_entry ***ce TSRMLS_DC)
+ZEND_API int zend_u_lookup_class(zend_uchar type, zstr name, int name_length, zend_class_entry ***ce TSRMLS_DC) /* {{{ */
{
return zend_u_lookup_class_ex(type, name, name_length, 1, 1, ce TSRMLS_CC);
}
+/* }}} */
-ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload, zend_class_entry ***ce TSRMLS_DC)
+ZEND_API int zend_lookup_class_ex(char *name, int name_length, int use_autoload, zend_class_entry ***ce TSRMLS_DC) /* {{{ */
{
return zend_u_lookup_class_ex(IS_STRING, ZSTR(name), name_length, use_autoload, 1, ce TSRMLS_CC);
}
+/* }}} */
-ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***ce TSRMLS_DC)
+ZEND_API int zend_lookup_class(char *name, int name_length, zend_class_entry ***ce TSRMLS_DC) /* {{{ */
{
return zend_u_lookup_class(IS_STRING, ZSTR(name), name_length, ce TSRMLS_CC);
}
+/* }}} */
-ZEND_API int zend_u_eval_string(zend_uchar type, zstr string, zval *retval_ptr, char *string_name TSRMLS_DC)
+ZEND_API int zend_u_eval_string(zend_uchar type, zstr string, zval *retval_ptr, char *string_name TSRMLS_DC) /* {{{ */
{
zval pv;
zend_op_array *new_op_array;
zval_dtor(&pv);
return retval;
}
+/* }}} */
-ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSRMLS_DC)
+ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSRMLS_DC) /* {{{ */
{
return zend_u_eval_string(IS_STRING, ZSTR(str), retval_ptr, string_name TSRMLS_CC);
}
+/* }}} */
-ZEND_API int zend_u_eval_string_ex(zend_uchar type, zstr str, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC)
+ZEND_API int zend_u_eval_string_ex(zend_uchar type, zstr str, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC) /* {{{ */
{
int result;
}
return result;
}
+/* }}} */
-ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC)
+ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC) /* {{{ */
{
return zend_u_eval_string_ex(IS_STRING, ZSTR(str), retval_ptr, string_name, handle_exceptions TSRMLS_CC);
}
+/* }}} */
-
-void execute_new_code(TSRMLS_D)
+void execute_new_code(TSRMLS_D) /* {{{ */
{
zend_op *opline, *end;
zend_op *ret_opline;
CG(active_op_array)->last -= 2; /* get rid of that ZEND_RETURN and ZEND_HANDLE_EXCEPTION */
CG(active_op_array)->start_op = CG(active_op_array)->opcodes+CG(active_op_array)->last;
}
+/* }}} */
-
-ZEND_API void zend_timeout(int dummy)
+ZEND_API void zend_timeout(int dummy) /* {{{ */
{
TSRMLS_FETCH();
zend_error(E_ERROR, "Maximum execution time of %d second%s exceeded",
EG(timeout_seconds), EG(timeout_seconds) == 1 ? "" : "s");
}
+/* }}} */
#ifdef ZEND_WIN32
-static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+static LRESULT CALLBACK zend_timeout_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) /* {{{ */
{
switch (message) {
case WM_DESTROY:
}
return 0;
}
+/* }}} */
-
-
-static unsigned __stdcall timeout_thread_proc(void *pArgs)
+static unsigned __stdcall timeout_thread_proc(void *pArgs) /* {{{ */
{
MSG message;
SetEvent(timeout_thread_handle);
return 0;
}
+/* }}} */
-
-void zend_init_timeout_thread()
+void zend_init_timeout_thread() /* {{{ */
{
timeout_thread_event = CreateEvent(NULL, FALSE, FALSE, NULL);
timeout_thread_handle = CreateEvent(NULL, FALSE, FALSE, NULL);
_beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id);
WaitForSingleObject(timeout_thread_event, INFINITE);
}
+/* }}} */
-
-void zend_shutdown_timeout_thread()
+void zend_shutdown_timeout_thread() /* {{{ */
{
if (!timeout_thread_initialized) {
return;
CloseHandle(timeout_thread_handle);
timeout_thread_initialized = 0;
}
+/* }}} */
#endif
#define SIGPROF 27
#endif
-void zend_set_timeout(long seconds)
+void zend_set_timeout(long seconds) /* {{{ */
{
TSRMLS_FETCH();
# endif
#endif
}
+/* }}} */
-
-void zend_unset_timeout(TSRMLS_D)
+void zend_unset_timeout(TSRMLS_D) /* {{{ */
{
#ifdef ZEND_WIN32
if(timeout_thread_initialized) {
# endif
#endif
}
+/* }}} */
-
-ZEND_API zend_class_entry *zend_u_fetch_class(zend_uchar type, zstr class_name, uint class_name_len, int fetch_type TSRMLS_DC)
+ZEND_API zend_class_entry *zend_u_fetch_class(zend_uchar type, zstr class_name, uint class_name_len, int fetch_type TSRMLS_DC) /* {{{ */
{
zend_class_entry **pce;
int use_autoload = (fetch_type & ZEND_FETCH_CLASS_NO_AUTOLOAD) ? 0 : 1;
return *pce;
}
}
+/* }}} */
-zend_class_entry *zend_fetch_class(char *class_name, uint class_name_len, int fetch_type TSRMLS_DC)
+zend_class_entry *zend_fetch_class(char *class_name, uint class_name_len, int fetch_type TSRMLS_DC) /* {{{ */
{
return zend_u_fetch_class(IS_STRING, ZSTR(class_name), class_name_len, fetch_type TSRMLS_CC);
}
-
+/* }}} */
#define MAX_ABSTRACT_INFO_CNT 3
#define MAX_ABSTRACT_INFO_FMT "%v%s%v%s"
int cnt;
} zend_abstract_info;
-
-static int zend_verify_abstract_class_function(zend_function *fn, zend_abstract_info *ai TSRMLS_DC)
+static int zend_verify_abstract_class_function(zend_function *fn, zend_abstract_info *ai TSRMLS_DC) /* {{{ */
{
if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
if (ai->cnt < MAX_ABSTRACT_INFO_CNT) {
}
return 0;
}
+/* }}} */
-
-void zend_verify_abstract_class(zend_class_entry *ce TSRMLS_DC)
+void zend_verify_abstract_class(zend_class_entry *ce TSRMLS_DC) /* {{{ */
{
zend_abstract_info ai;
}
}
}
+/* }}} */
-ZEND_API void zend_reset_all_cv(HashTable *symbol_table TSRMLS_DC)
+ZEND_API void zend_reset_all_cv(HashTable *symbol_table TSRMLS_DC) /* {{{ */
{
zend_execute_data *ex;
int i;
}
}
}
+/* }}} */
-ZEND_API int zend_u_delete_global_variable(zend_uchar type, zstr name, int name_len TSRMLS_DC)
+ZEND_API int zend_u_delete_global_variable(zend_uchar type, zstr name, int name_len TSRMLS_DC) /* {{{ */
{
zend_execute_data *ex;
ulong hash_value = zend_u_inline_hash_func(type, name, name_len+1);
}
return FAILURE;
}
+/* }}} */
-ZEND_API int zend_delete_global_variable(char *name, int name_len TSRMLS_DC)
+ZEND_API int zend_delete_global_variable(char *name, int name_len TSRMLS_DC) /* {{{ */
{
return zend_u_delete_global_variable(IS_STRING, ZSTR(name), name_len TSRMLS_CC);
}
+/* }}} */
/*
* Local variables:
ZEND_API zend_llist zend_extensions;
static int last_resource_number;
-int zend_load_extension(char *path)
+int zend_load_extension(char *path) /* {{{ */
{
#if ZEND_EXTENSIONS_SUPPORT
DL_HANDLE handle;
return FAILURE;
#endif
}
+/* }}} */
-
-int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle)
+int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle) /* {{{ */
{
#if ZEND_EXTENSIONS_SUPPORT
zend_extension extension;
return SUCCESS;
}
+/* }}} */
-
-static void zend_extension_shutdown(zend_extension *extension TSRMLS_DC)
+static void zend_extension_shutdown(zend_extension *extension TSRMLS_DC) /* {{{ */
{
#if ZEND_EXTENSIONS_SUPPORT
if (extension->shutdown) {
}
#endif
}
+/* }}} */
-static int zend_extension_startup(zend_extension *extension)
+static int zend_extension_startup(zend_extension *extension) /* {{{ */
{
#if ZEND_EXTENSIONS_SUPPORT
if (extension->startup) {
#endif
return 0;
}
+/* }}} */
-
-int zend_startup_extensions_mechanism()
+int zend_startup_extensions_mechanism() /* {{{ */
{
/* Startup extensions mechanism */
zend_llist_init(&zend_extensions, sizeof(zend_extension), (void (*)(void *)) zend_extension_dtor, 1);
last_resource_number = 0;
return SUCCESS;
}
+/* }}} */
-
-int zend_startup_extensions()
+int zend_startup_extensions() /* {{{ */
{
zend_llist_apply_with_del(&zend_extensions, (int (*)(void *)) zend_extension_startup);
return SUCCESS;
}
+/* }}} */
-
-void zend_shutdown_extensions(TSRMLS_D)
+void zend_shutdown_extensions(TSRMLS_D) /* {{{ */
{
zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_shutdown TSRMLS_CC);
zend_llist_destroy(&zend_extensions);
}
+/* }}} */
-
-void zend_extension_dtor(zend_extension *extension)
+void zend_extension_dtor(zend_extension *extension) /* {{{ */
{
#if ZEND_EXTENSIONS_SUPPORT && !ZEND_DEBUG
if (extension->handle) {
}
#endif
}
+/* }}} */
-
-static void zend_extension_message_dispatcher(zend_extension *extension, int num_args, va_list args TSRMLS_DC)
+static void zend_extension_message_dispatcher(zend_extension *extension, int num_args, va_list args TSRMLS_DC) /* {{{ */
{
int message;
void *arg;
arg = va_arg(args, void *);
extension->message_handler(message, arg);
}
+/* }}} */
-
-ZEND_API void zend_extension_dispatch_message(int message, void *arg)
+ZEND_API void zend_extension_dispatch_message(int message, void *arg) /* {{{ */
{
TSRMLS_FETCH();
zend_llist_apply_with_arguments(&zend_extensions, (llist_apply_with_args_func_t) zend_extension_message_dispatcher TSRMLS_CC, 2, message, arg);
}
+/* }}} */
-
-ZEND_API int zend_get_resource_handle(zend_extension *extension)
+ZEND_API int zend_get_resource_handle(zend_extension *extension) /* {{{ */
{
if (last_resource_number<ZEND_MAX_RESERVED_RESOURCES) {
extension->resource_number = last_resource_number;
return -1;
}
}
+/* }}} */
-
-ZEND_API zend_extension *zend_get_extension(char *extension_name)
+ZEND_API zend_extension *zend_get_extension(char *extension_name) /* {{{ */
{
zend_llist_element *element;
}
return NULL;
}
+/* }}} */
/*
* Support for dynamic loading of MH_BUNDLEs on Darwin / Mac OS X
#if HAVE_MACH_O_DYLD_H
-void *zend_mh_bundle_load(char* bundle_path)
+void *zend_mh_bundle_load(char* bundle_path) /* {{{ */
{
NSObjectFileImage bundle_image;
NSModule bundle_handle;
return bundle_handle;
}
+/* }}} */
-int zend_mh_bundle_unload(void *bundle_handle)
+int zend_mh_bundle_unload(void *bundle_handle) /* {{{ */
{
NSSymbol bundle_fini_nssymbol;
void (*bundle_fini)(void);
return (int) NSUnLinkModule(bundle_handle, NULL);
}
+/* }}} */
-void *zend_mh_bundle_symbol(void *bundle_handle, const char *symbol_name)
+void *zend_mh_bundle_symbol(void *bundle_handle, const char *symbol_name) /* {{{ */
{
NSSymbol symbol;
symbol = NSLookupSymbolInModule(bundle_handle, symbol_name);
return NSAddressOfSymbol(symbol);
}
+/* }}} */
-const char *zend_mh_bundle_error(void)
+const char *zend_mh_bundle_error(void) /* {{{ */
{
/* Witness the state of the art error reporting */
return NULL;
}
+/* }}} */
#endif /* HAVE_MACH_O_DYLD_H */
#define HT_DESTROYED 2
#define HT_CLEANING 3
-static void _zend_is_inconsistent(HashTable *ht, char *file, int line)
+static void _zend_is_inconsistent(HashTable *ht, char *file, int line) /* {{{ */
{
if (ht->inconsistent==HT_OK) {
return;
}
zend_bailout();
}
+/* }}} */
+
#define IS_CONSISTENT(a) _zend_is_inconsistent(a, __FILE__, __LINE__);
#define SET_INCONSISTENT(n) ht->inconsistent = n;
#else
static int zend_hash_do_resize(HashTable *ht);
-ZEND_API ulong zend_u_hash_func(zend_uchar type, zstr arKey, uint nKeyLength)
+ZEND_API ulong zend_u_hash_func(zend_uchar type, zstr arKey, uint nKeyLength) /* {{{ */
{
return zend_u_inline_hash_func(type, arKey, nKeyLength);
}
+/* }}} */
-ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength)
+ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength) /* {{{ */
{
return zend_u_hash_func(IS_STRING, ZSTR(arKey), nKeyLength);
}
+/* }}} */
#define UPDATE_DATA(ht, p, pData, nDataSize) \
if (nDataSize == sizeof(void*)) { \
} \
memcpy((p)->pData, pData, nDataSize); \
}
+/* }}} */
-
-
-ZEND_API int _zend_u_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool unicode ZEND_FILE_LINE_DC)
+ZEND_API int _zend_u_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool unicode ZEND_FILE_LINE_DC) /* {{{ */
{
uint i = 3;
Bucket **tmp;
return SUCCESS;
}
+/* }}} */
-ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
+ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC) /* {{{ */
{
return _zend_u_hash_init(ht, nSize, pHashFunction, pDestructor, persistent, 0 ZEND_FILE_LINE_CC);
}
+/* }}} */
-ZEND_API int _zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
+ZEND_API int _zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC) /* {{{ */
{
int retval = _zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent ZEND_FILE_LINE_CC);
ht->bApplyProtection = bApplyProtection;
return retval;
}
+/* }}} */
-ZEND_API int _zend_u_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool unicode, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
+ZEND_API int _zend_u_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool unicode, zend_bool bApplyProtection ZEND_FILE_LINE_DC) /* {{{ */
{
int retval = _zend_u_hash_init(ht, nSize, pHashFunction, pDestructor, persistent, unicode ZEND_FILE_LINE_CC);
ht->bApplyProtection = bApplyProtection;
return retval;
}
+/* }}} */
-ZEND_API void zend_hash_set_apply_protection(HashTable *ht, zend_bool bApplyProtection)
+ZEND_API void zend_hash_set_apply_protection(HashTable *ht, zend_bool bApplyProtection) /* {{{ */
{
ht->bApplyProtection = bApplyProtection;
}
+/* }}} */
-
-
-ZEND_API int _zend_u_hash_add_or_update(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
+ZEND_API int _zend_u_hash_add_or_update(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{
ulong h;
uint nIndex;
if (tmp) efree(tmp);
return SUCCESS;
}
+/* }}} */
-ZEND_API int _zend_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
+ZEND_API int _zend_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{
return _zend_u_hash_add_or_update(ht, IS_STRING, ZSTR(arKey), nKeyLength, pData, nDataSize, pDest, flag ZEND_FILE_LINE_CC);
}
+/* }}} */
-ZEND_API int _zend_ascii_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
+ZEND_API int _zend_ascii_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{
TSRMLS_FETCH();
return _zend_u_hash_add_or_update(ht, IS_STRING, ZSTR(arKey), nKeyLength, pData, nDataSize, pDest, flag ZEND_FILE_LINE_CC);
}
}
+/* }}} */
-ZEND_API int _zend_rt_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
+ZEND_API int _zend_rt_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{
TSRMLS_FETCH();
return _zend_u_hash_add_or_update(ht, IS_STRING, ZSTR(arKey), nKeyLength, pData, nDataSize, pDest, flag ZEND_FILE_LINE_CC);
}
}
+/* }}} */
-ZEND_API int _zend_utf8_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
+ZEND_API int _zend_utf8_hash_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{
TSRMLS_FETCH();
return _zend_u_hash_add_or_update(ht, IS_STRING, ZSTR(arKey), nKeyLength, pData, nDataSize, pDest, flag ZEND_FILE_LINE_CC);
}
}
+/* }}} */
-ZEND_API int _zend_u_hash_quick_add_or_update(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
+ZEND_API int _zend_u_hash_quick_add_or_update(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{
uint nIndex;
Bucket *p;
if (tmp) efree(tmp);
return SUCCESS;
}
+/* }}} */
-ZEND_API int _zend_hash_quick_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
+ZEND_API int _zend_hash_quick_add_or_update(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{
return _zend_u_hash_quick_add_or_update(ht, IS_STRING, ZSTR(arKey), nKeyLength, h, pData, nDataSize, pDest, flag ZEND_FILE_LINE_CC);
}
+/* }}} */
-ZEND_API int zend_u_hash_add_empty_element(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength)
+ZEND_API int zend_u_hash_add_empty_element(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength) /* {{{ */
{
void *dummy = (void *) 1;
return zend_u_hash_add(ht, type, arKey, nKeyLength, &dummy, sizeof(void *), NULL);
}
+/* }}} */
-ZEND_API int zend_hash_add_empty_element(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_hash_add_empty_element(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
void *dummy = (void *) 1;
return zend_u_hash_add(ht, IS_STRING, ZSTR(arKey), nKeyLength, &dummy, sizeof(void *), NULL);
}
+/* }}} */
-
-ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
+ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{
uint nIndex;
Bucket *p;
ZEND_HASH_IF_FULL_DO_RESIZE(ht);
return SUCCESS;
}
+/* }}} */
-
-static int zend_hash_do_resize(HashTable *ht)
+static int zend_hash_do_resize(HashTable *ht) /* {{{ */
{
Bucket **t;
}
return SUCCESS;
}
+/* }}} */
-ZEND_API int zend_hash_rehash(HashTable *ht)
+ZEND_API int zend_hash_rehash(HashTable *ht) /* {{{ */
{
Bucket *p;
uint nIndex;
}
return SUCCESS;
}
+/* }}} */
-ZEND_API int zend_u_hash_del_key_or_index(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, int flag)
+ZEND_API int zend_u_hash_del_key_or_index(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, int flag) /* {{{ */
{
uint nIndex;
Bucket *p;
if (tmp) efree(tmp);
return FAILURE;
}
+/* }}} */
-ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag)
+ZEND_API int zend_hash_del_key_or_index(HashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag) /* {{{ */
{
return zend_u_hash_del_key_or_index(ht, IS_STRING, ZSTR(arKey), nKeyLength, h, flag);
}
+/* }}} */
-ZEND_API int zend_ascii_hash_del(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_ascii_hash_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
TSRMLS_FETCH();
return zend_u_hash_del_key_or_index(ht, IS_STRING, ZSTR(arKey), nKeyLength, 0, HASH_DEL_KEY);
}
}
+/* }}} */
-ZEND_API int zend_rt_hash_del(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_rt_hash_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
TSRMLS_FETCH();
return zend_u_hash_del_key_or_index(ht, IS_STRING, ZSTR(arKey), nKeyLength, 0, HASH_DEL_KEY);
}
}
+/* }}} */
-ZEND_API int zend_utf8_hash_del(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_utf8_hash_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
TSRMLS_FETCH();
return zend_u_hash_del_key_or_index(ht, IS_STRING, ZSTR(arKey), nKeyLength, 0, HASH_DEL_KEY);
}
}
+/* }}} */
-ZEND_API void zend_hash_destroy(HashTable *ht)
+ZEND_API void zend_hash_destroy(HashTable *ht) /* {{{ */
{
Bucket *p, *q;
SET_INCONSISTENT(HT_DESTROYED);
}
+/* }}} */
-
-ZEND_API void zend_hash_clean(HashTable *ht)
+ZEND_API void zend_hash_clean(HashTable *ht) /* {{{ */
{
Bucket *p, *q;
SET_INCONSISTENT(HT_OK);
}
+/* }}} */
/* This function is used by the various apply() functions.
* It deletes the passed bucket, and returns the address of the
* next bucket. The hash *may* be altered during that time, the
* returned value will still be valid.
*/
-static Bucket *zend_hash_apply_deleter(HashTable *ht, Bucket *p)
+static Bucket *zend_hash_apply_deleter(HashTable *ht, Bucket *p) /* {{{ */
{
Bucket *retval;
return retval;
}
+/* }}} */
-
-ZEND_API void zend_hash_graceful_destroy(HashTable *ht)
+ZEND_API void zend_hash_graceful_destroy(HashTable *ht) /* {{{ */
{
Bucket *p;
SET_INCONSISTENT(HT_DESTROYED);
}
+/* }}} */
-ZEND_API void zend_hash_graceful_reverse_destroy(HashTable *ht)
+ZEND_API void zend_hash_graceful_reverse_destroy(HashTable *ht) /* {{{ */
{
Bucket *p;
SET_INCONSISTENT(HT_DESTROYED);
}
+/* }}} */
/* This is used to recurse elements and selectively delete certain entries
* from a hashtable. apply_func() receives the data and decides if the entry
* ZEND_HASH_APPLY_REMOVE - delete the element, combineable with the former
*/
-ZEND_API void zend_hash_apply(HashTable *ht, apply_func_t apply_func TSRMLS_DC)
+ZEND_API void zend_hash_apply(HashTable *ht, apply_func_t apply_func TSRMLS_DC) /* {{{ */
{
Bucket *p;
}
HASH_UNPROTECT_RECURSION(ht);
}
+/* }}} */
-
-ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *argument TSRMLS_DC)
+ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *argument TSRMLS_DC) /* {{{ */
{
Bucket *p;
}
HASH_UNPROTECT_RECURSION(ht);
}
+/* }}} */
-
-ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t apply_func, int num_args, ...)
+ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t apply_func, int num_args, ...) /* {{{ */
{
Bucket *p;
va_list args;
HASH_UNPROTECT_RECURSION(ht);
}
+/* }}} */
-
-ZEND_API void zend_hash_reverse_apply(HashTable *ht, apply_func_t apply_func TSRMLS_DC)
+ZEND_API void zend_hash_reverse_apply(HashTable *ht, apply_func_t apply_func TSRMLS_DC) /* {{{ */
{
Bucket *p, *q;
}
HASH_UNPROTECT_RECURSION(ht);
}
+/* }}} */
-
-ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size)
+ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size) /* {{{ */
{
Bucket *p;
void *new_entry;
}
target->pInternalPointer = target->pListHead;
}
+/* }}} */
-
-ZEND_API void _zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite ZEND_FILE_LINE_DC)
+ZEND_API void _zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite ZEND_FILE_LINE_DC) /* {{{ */
{
Bucket *p;
void *t;
}
target->pInternalPointer = target->pListHead;
}
+/* }}} */
-
-static zend_bool zend_hash_replace_checker_wrapper(HashTable *target, void *source_data, Bucket *p, void *pParam, merge_checker_func_t merge_checker_func)
+static zend_bool zend_hash_replace_checker_wrapper(HashTable *target, void *source_data, Bucket *p, void *pParam, merge_checker_func_t merge_checker_func) /* {{{ */
{
zend_hash_key hash_key;
hash_key.arKey.s = p->key.arKey.s;
return merge_checker_func(target, source_data, &hash_key, pParam);
}
+/* }}} */
-
-ZEND_API void zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, uint size, merge_checker_func_t pMergeSource, void *pParam)
+ZEND_API void zend_hash_merge_ex(HashTable *target, HashTable *source, copy_ctor_func_t pCopyConstructor, uint size, merge_checker_func_t pMergeSource, void *pParam) /* {{{ */
{
Bucket *p;
void *t;
}
target->pInternalPointer = target->pListHead;
}
+/* }}} */
-
-ZEND_API ulong zend_u_get_hash_value(zend_uchar type, zstr arKey, uint nKeyLength)
+ZEND_API ulong zend_u_get_hash_value(zend_uchar type, zstr arKey, uint nKeyLength) /* {{{ */
{
return zend_u_inline_hash_func(type, arKey, nKeyLength);
}
+/* }}} */
-ZEND_API ulong zend_get_hash_value(char *arKey, uint nKeyLength)
+ZEND_API ulong zend_get_hash_value(char *arKey, uint nKeyLength) /* {{{ */
{
return zend_u_get_hash_value(IS_STRING, ZSTR(arKey), nKeyLength);
}
-
+/* }}} */
/* Returns SUCCESS if found and FAILURE if not. The pointer to the
* data is returned in pData. The reason is that there's no reason
* someone using the hash table might not want to have NULL data
*/
-ZEND_API int zend_u_hash_find(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void **pData)
+ZEND_API int zend_u_hash_find(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void **pData) /* {{{ */
{
ulong h;
uint nIndex;
if (tmp) efree(tmp);
return FAILURE;
}
+/* }}} */
-ZEND_API int zend_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData)
+ZEND_API int zend_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */
{
return zend_u_hash_find(ht, IS_STRING, ZSTR(arKey), nKeyLength, pData);
}
+/* }}} */
-ZEND_API int zend_ascii_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData)
+ZEND_API int zend_ascii_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */
{
TSRMLS_FETCH();
return zend_u_hash_find(ht, IS_STRING, ZSTR(arKey), nKeyLength, pData);
}
}
+/* }}} */
-ZEND_API int zend_rt_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData)
+ZEND_API int zend_rt_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */
{
TSRMLS_FETCH();
return zend_u_hash_find(ht, IS_STRING, ZSTR(arKey), nKeyLength, pData);
}
}
+/* }}} */
-ZEND_API int zend_utf8_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData)
+ZEND_API int zend_utf8_hash_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */
{
TSRMLS_FETCH();
return zend_u_hash_find(ht, IS_STRING, ZSTR(arKey), nKeyLength, pData);
}
}
+/* }}} */
-ZEND_API int zend_u_hash_quick_find(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, void **pData)
+ZEND_API int zend_u_hash_quick_find(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h, void **pData) /* {{{ */
{
uint nIndex;
Bucket *p;
if (tmp) efree(tmp);
return FAILURE;
}
+/* }}} */
-ZEND_API int zend_hash_quick_find(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void **pData)
+ZEND_API int zend_hash_quick_find(HashTable *ht, char *arKey, uint nKeyLength, ulong h, void **pData) /* {{{ */
{
return zend_u_hash_quick_find(ht, IS_STRING, ZSTR(arKey), nKeyLength, h, pData);
}
+/* }}} */
-ZEND_API int zend_u_hash_exists(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength)
+ZEND_API int zend_u_hash_exists(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength) /* {{{ */
{
ulong h;
uint nIndex;
if (tmp) efree(tmp);
return 0;
}
+/* }}} */
-ZEND_API int zend_hash_exists(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_hash_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
return zend_u_hash_exists(ht, IS_STRING, ZSTR(arKey), nKeyLength);
}
+/* }}} */
-ZEND_API int zend_ascii_hash_exists(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_ascii_hash_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
TSRMLS_FETCH();
return zend_u_hash_exists(ht, IS_STRING, ZSTR(arKey), nKeyLength);
}
}
+/* }}} */
-ZEND_API int zend_rt_hash_exists(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_rt_hash_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
TSRMLS_FETCH();
return zend_u_hash_exists(ht, IS_STRING, ZSTR(arKey), nKeyLength);
}
}
+/* }}} */
-ZEND_API int zend_utf8_hash_exists(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_utf8_hash_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
TSRMLS_FETCH();
return zend_u_hash_exists(ht, IS_STRING, ZSTR(arKey), nKeyLength);
}
}
+/* }}} */
-ZEND_API int zend_u_hash_quick_exists(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h)
+ZEND_API int zend_u_hash_quick_exists(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, ulong h) /* {{{ */
{
uint nIndex;
Bucket *p;
if (tmp) efree(tmp);
return 0;
}
+/* }}} */
-ZEND_API int zend_hash_quick_exists(HashTable *ht, char *arKey, uint nKeyLength, ulong h)
+ZEND_API int zend_hash_quick_exists(HashTable *ht, char *arKey, uint nKeyLength, ulong h) /* {{{ */
{
return zend_u_hash_quick_exists(ht, IS_STRING, ZSTR(arKey), nKeyLength, h);
}
+/* }}} */
-ZEND_API int zend_hash_index_find(HashTable *ht, ulong h, void **pData)
+ZEND_API int zend_hash_index_find(HashTable *ht, ulong h, void **pData) /* {{{ */
{
uint nIndex;
Bucket *p;
}
return FAILURE;
}
+/* }}} */
-
-ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h)
+ZEND_API int zend_hash_index_exists(HashTable *ht, ulong h) /* {{{ */
{
uint nIndex;
Bucket *p;
}
return 0;
}
+/* }}} */
-
-ZEND_API int zend_hash_num_elements(HashTable *ht)
+ZEND_API int zend_hash_num_elements(HashTable *ht) /* {{{ */
{
IS_CONSISTENT(ht);
return ht->nNumOfElements;
}
+/* }}} */
-
-ZEND_API int zend_hash_get_pointer(HashTable *ht, HashPointer *ptr)
+ZEND_API int zend_hash_get_pointer(HashTable *ht, HashPointer *ptr) /* {{{ */
{
ptr->pos = ht->pInternalPointer;
if (ht->pInternalPointer) {
return 0;
}
}
+/* }}} */
-ZEND_API int zend_hash_set_pointer(HashTable *ht, const HashPointer *ptr)
+ZEND_API int zend_hash_set_pointer(HashTable *ht, const HashPointer *ptr) /* {{{ */
{
if (ptr->pos == NULL) {
ht->pInternalPointer = NULL;
}
return 1;
}
+/* }}} */
-ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos)
+ZEND_API void zend_hash_internal_pointer_reset_ex(HashTable *ht, HashPosition *pos) /* {{{ */
{
IS_CONSISTENT(ht);
else
ht->pInternalPointer = ht->pListHead;
}
-
+/* }}} */
/* This function will be extremely optimized by remembering
* the end of the list
*/
-ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos)
+ZEND_API void zend_hash_internal_pointer_end_ex(HashTable *ht, HashPosition *pos) /* {{{ */
{
IS_CONSISTENT(ht);
else
ht->pInternalPointer = ht->pListTail;
}
+/* }}} */
-
-ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos)
+ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos) /* {{{ */
{
HashPosition *current = pos ? pos : &ht->pInternalPointer;
} else
return FAILURE;
}
+/* }}} */
-ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos)
+ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos) /* {{{ */
{
HashPosition *current = pos ? pos : &ht->pInternalPointer;
} else
return FAILURE;
}
-
+/* }}} */
/* This function should be made binary safe */
-ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, zstr *str_index, uint *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos)
+ZEND_API int zend_hash_get_current_key_ex(HashTable *ht, zstr *str_index, uint *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos) /* {{{ */
{
Bucket *p;
}
return HASH_KEY_NON_EXISTANT;
}
+/* }}} */
-
-ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos)
+ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos) /* {{{ */
{
Bucket *p;
}
return HASH_KEY_NON_EXISTANT;
}
+/* }}} */
-
-ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos)
+ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosition *pos) /* {{{ */
{
Bucket *p;
return FAILURE;
}
}
+/* }}} */
/* This function changes key of currevt element without changing elements'
* order. If element with target key already exists, it will be deleted first.
*/
-ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, zstr str_index, uint str_length, ulong num_index, HashPosition *pos)
+ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, zstr str_index, uint str_length, ulong num_index, HashPosition *pos) /* {{{ */
{
Bucket *p;
uint real_length;
return FAILURE;
}
}
+/* }}} */
-ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func,
- compare_func_t compar, int renumber TSRMLS_DC)
+ZEND_API int zend_hash_sort(HashTable *ht, sort_func_t sort_func, compare_func_t compar, int renumber TSRMLS_DC) /* {{{ */
{
Bucket **arTmp;
Bucket *p;
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC)
+ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC) /* {{{ */
{
Bucket *p1, *p2 = NULL;
int result;
HASH_UNPROTECT_RECURSION(ht2);
return 0;
}
+/* }}} */
-
-ZEND_API int zend_hash_minmax(HashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC)
+ZEND_API int zend_hash_minmax(HashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC) /* {{{ */
{
Bucket *p, *res;
*pData = res->pData;
return SUCCESS;
}
+/* }}} */
-ZEND_API ulong zend_hash_next_free_element(HashTable *ht)
+ZEND_API ulong zend_hash_next_free_element(HashTable *ht) /* {{{ */
{
IS_CONSISTENT(ht);
return ht->nNextFreeElement;
}
+/* }}} */
+/* {{{ HANDLE_*_NUMERIC macros */
#define HANDLE_NUMERIC(key, length, func) { \
register char *tmp=key; \
\
} \
} while (0); \
}
+/* }}} */
-ZEND_API int zend_u_symtable_update(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest)
+ZEND_API int zend_u_symtable_update(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */
{
if (type == IS_STRING) {
HANDLE_NUMERIC(arKey.s, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest));
}
return zend_u_hash_update(ht, type, arKey, nKeyLength, pData, nDataSize, pDest);
}
+/* }}} */
-
-ZEND_API int zend_u_symtable_del(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength)
+ZEND_API int zend_u_symtable_del(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength) /* {{{ */
{
if (type == IS_STRING) {
HANDLE_NUMERIC(arKey.s, nKeyLength, zend_hash_index_del(ht, idx));
}
return zend_u_hash_del(ht, type, arKey, nKeyLength);
}
+/* }}} */
-
-ZEND_API int zend_u_symtable_find(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void **pData)
+ZEND_API int zend_u_symtable_find(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength, void **pData) /* {{{ */
{
if (type == IS_STRING) {
HANDLE_NUMERIC(arKey.s, nKeyLength, zend_hash_index_find(ht, idx, pData));
}
return zend_u_hash_find(ht, type, arKey, nKeyLength, pData);
}
+/* }}} */
-
-ZEND_API int zend_u_symtable_exists(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength)
+ZEND_API int zend_u_symtable_exists(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength) /* {{{ */
{
if (type == IS_STRING) {
HANDLE_NUMERIC(arKey.s, nKeyLength, zend_hash_index_exists(ht, idx));
}
return zend_u_hash_exists(ht, type, arKey, nKeyLength);
}
+/* }}} */
-
-ZEND_API int zend_u_symtable_update_current_key(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength)
+ZEND_API int zend_u_symtable_update_current_key(HashTable *ht, zend_uchar type, zstr arKey, uint nKeyLength) /* {{{ */
{
zend_uchar key_type;
}
return zend_hash_update_current_key(ht, key_type, arKey, nKeyLength, 0);
}
+/* }}} */
-
-ZEND_API int zend_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest)
+ZEND_API int zend_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest));
return zend_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest);
}
+/* }}} */
-
-ZEND_API int zend_symtable_del(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_symtable_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx))
return zend_hash_del(ht, arKey, nKeyLength);
}
+/* }}} */
-
-ZEND_API int zend_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData)
+ZEND_API int zend_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_find(ht, idx, pData));
return zend_hash_find(ht, arKey, nKeyLength, pData);
}
+/* }}} */
-
-ZEND_API int zend_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_exists(ht, idx));
return zend_hash_exists(ht, arKey, nKeyLength);
}
+/* }}} */
-
-ZEND_API int zend_symtable_update_current_key(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_symtable_update_current_key(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_update_current_key(ht, HASH_KEY_IS_LONG, NULL_ZSTR, 0, idx));
return zend_hash_update_current_key(ht, HASH_KEY_IS_STRING, ZSTR(arKey), nKeyLength, 0);
}
+/* }}} */
-ZEND_API int zend_ascii_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest)
+ZEND_API int zend_ascii_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest));
return zend_ascii_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest);
}
+/* }}} */
-
-ZEND_API int zend_ascii_symtable_del(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_ascii_symtable_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx))
return zend_ascii_hash_del(ht, arKey, nKeyLength);
}
+/* }}} */
-
-ZEND_API int zend_ascii_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData)
+ZEND_API int zend_ascii_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_find(ht, idx, pData));
return zend_ascii_hash_find(ht, arKey, nKeyLength, pData);
}
+/* }}} */
-
-ZEND_API int zend_ascii_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_ascii_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_exists(ht, idx));
return zend_ascii_hash_exists(ht, arKey, nKeyLength);
}
+/* }}} */
-ZEND_API int zend_rt_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest)
+ZEND_API int zend_rt_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest));
return zend_rt_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest);
}
+/* }}} */
-
-ZEND_API int zend_rt_symtable_del(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_rt_symtable_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx))
return zend_rt_hash_del(ht, arKey, nKeyLength);
}
+/* }}} */
-
-ZEND_API int zend_rt_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData)
+ZEND_API int zend_rt_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_find(ht, idx, pData));
return zend_rt_hash_find(ht, arKey, nKeyLength, pData);
}
+/* }}} */
-
-ZEND_API int zend_rt_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_rt_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_exists(ht, idx));
return zend_rt_hash_exists(ht, arKey, nKeyLength);
}
+/* }}} */
-ZEND_API int zend_utf8_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest)
+ZEND_API int zend_utf8_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest));
return zend_utf8_hash_update(ht, arKey, nKeyLength, pData, nDataSize, pDest);
}
+/* }}} */
-
-ZEND_API int zend_utf8_symtable_del(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_utf8_symtable_del(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx))
return zend_utf8_hash_del(ht, arKey, nKeyLength);
}
+/* }}} */
-
-ZEND_API int zend_utf8_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData)
+ZEND_API int zend_utf8_symtable_find(HashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_find(ht, idx, pData));
return zend_utf8_hash_find(ht, arKey, nKeyLength, pData);
}
+/* }}} */
-
-ZEND_API int zend_utf8_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_utf8_symtable_exists(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_exists(ht, idx));
return zend_utf8_hash_exists(ht, arKey, nKeyLength);
}
+/* }}} */
-ZEND_API void zend_hash_to_unicode(HashTable *ht, apply_func_t apply_func TSRMLS_DC)
+ZEND_API void zend_hash_to_unicode(HashTable *ht, apply_func_t apply_func TSRMLS_DC) /* {{{ */
{
Bucket **p;
uint nIndex;
p = &(*p)->pListNext;
}
}
+/* }}} */
#if ZEND_DEBUG
-void zend_hash_display_pListTail(HashTable *ht)
+void zend_hash_display_pListTail(HashTable *ht) /* {{{ */
{
Bucket *p;
p = p->pListLast;
}
}
+/* }}} */
-void zend_hash_display(HashTable *ht)
+void zend_hash_display(HashTable *ht) /* {{{ */
{
Bucket *p;
uint i;
p = p->pListLast;
}
}
+/* }}} */
#endif
#include "zend_globals.h"
#include "zend_operators.h"
-ZEND_API void zend_html_putc(char c)
+ZEND_API void zend_html_putc(char c) /* {{{ */
{
switch (c) {
case '\n':
break;
}
}
+/* }}} */
-
-ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC)
+ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC) /* {{{ */
{
const char *ptr=s, *end=s+len;
}
}
}
+/* }}} */
-
-
-ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini TSRMLS_DC)
+ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini TSRMLS_DC) /* {{{ */
{
zval token;
int token_type;
zend_printf("</span>\n");
zend_printf("</code>");
}
+/* }}} */
-
-
-ZEND_API void zend_strip(TSRMLS_D)
+ZEND_API void zend_strip(TSRMLS_D) /* {{{ */
{
zval token;
int token_type;
prev_space = Z_TYPE(token) = 0;
}
}
+/* }}} */
/*
* Local variables:
#define zendtext LANG_SCNG(yy_text)
#define zendleng LANG_SCNG(yy_leng)
-
-static void handle_whitespace(int *emit_whitespace)
+static void handle_whitespace(int *emit_whitespace) /* {{{ */
{
unsigned char c;
int i;
}
memset(emit_whitespace, 0, sizeof(int)*256);
}
+/* }}} */
-
-ZEND_API void zend_indent()
+ZEND_API void zend_indent() /* {{{ */
{
zval token;
int token_type;
Z_TYPE(token) = 0;
}
}
+/* }}} */
/*
* Local variables:
/*
* hash_apply functions
*/
-static int zend_remove_ini_entries(zend_ini_entry *ini_entry, int *module_number TSRMLS_DC)
+static int zend_remove_ini_entries(zend_ini_entry *ini_entry, int *module_number TSRMLS_DC) /* {{{ */
{
if (ini_entry->module_number == *module_number) {
return 1;
return 0;
}
}
+/* }}} */
-
-static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage TSRMLS_DC)
+static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage TSRMLS_DC) /* {{{ */
{
if (ini_entry->modified) {
if (ini_entry->on_modify) {
}
return 0;
}
+/* }}} */
-static int zend_restore_ini_entry_wrapper(zend_ini_entry **ini_entry TSRMLS_DC)
+static int zend_restore_ini_entry_wrapper(zend_ini_entry **ini_entry TSRMLS_DC) /* {{{ */
{
zend_restore_ini_entry_cb(*ini_entry, ZEND_INI_STAGE_DEACTIVATE TSRMLS_CC);
return 1;
}
+/* }}} */
/*
* Startup / shutdown
*/
-ZEND_API int zend_ini_startup(TSRMLS_D)
+ZEND_API int zend_ini_startup(TSRMLS_D) /* {{{ */
{
registered_zend_ini_directives = (HashTable *) malloc(sizeof(HashTable));
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int zend_ini_shutdown(TSRMLS_D)
+ZEND_API int zend_ini_shutdown(TSRMLS_D) /* {{{ */
{
zend_hash_destroy(EG(ini_directives));
free(EG(ini_directives));
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int zend_ini_global_shutdown(TSRMLS_D)
+ZEND_API int zend_ini_global_shutdown(TSRMLS_D) /* {{{ */
{
zend_hash_destroy(registered_zend_ini_directives);
free(registered_zend_ini_directives);
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int zend_ini_deactivate(TSRMLS_D)
+ZEND_API int zend_ini_deactivate(TSRMLS_D) /* {{{ */
{
if (EG(modified_ini_directives)) {
zend_hash_apply(EG(modified_ini_directives), (apply_func_t) zend_restore_ini_entry_wrapper TSRMLS_CC);
}
return SUCCESS;
}
-
+/* }}} */
#ifdef ZTS
-ZEND_API int zend_copy_ini_directives(TSRMLS_D)
+ZEND_API int zend_copy_ini_directives(TSRMLS_D) /* {{{ */
{
zend_ini_entry ini_entry;
zend_hash_copy(EG(ini_directives), registered_zend_ini_directives, NULL, &ini_entry, sizeof(zend_ini_entry));
return SUCCESS;
}
+/* }}} */
#endif
-
-static int ini_key_compare(const void *a, const void *b TSRMLS_DC)
+static int ini_key_compare(const void *a, const void *b TSRMLS_DC) /* {{{ */
{
Bucket *f;
Bucket *s;
return zend_binary_strcasecmp(f->key.arKey.s, f->nKeyLength, s->key.arKey.s, s->nKeyLength);
}
}
+/* }}} */
-
-ZEND_API void zend_ini_sort_entries(TSRMLS_D)
+ZEND_API void zend_ini_sort_entries(TSRMLS_D) /* {{{ */
{
zend_hash_sort(EG(ini_directives), zend_qsort, ini_key_compare, 0 TSRMLS_CC);
}
+/* }}} */
/*
* Registration / unregistration
*/
-
-ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number TSRMLS_DC)
+ZEND_API int zend_register_ini_entries(zend_ini_entry *ini_entry, int module_number TSRMLS_DC) /* {{{ */
{
zend_ini_entry *p = ini_entry;
zend_ini_entry *hashed_ini_entry;
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC)
+ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC) /* {{{ */
{
zend_hash_apply_with_argument(registered_zend_ini_directives, (apply_func_arg_t) zend_remove_ini_entries, (void *) &module_number TSRMLS_CC);
}
-
+/* }}} */
#ifdef ZTS
-static int zend_ini_refresh_cache(zend_ini_entry *p, int stage TSRMLS_DC)
+static int zend_ini_refresh_cache(zend_ini_entry *p, int stage TSRMLS_DC) /* {{{ */
{
if (p->on_modify) {
p->on_modify(p, p->value, p->value_length, p->mh_arg1, p->mh_arg2, p->mh_arg3, stage TSRMLS_CC);
}
return 0;
}
+/* }}} */
-
-ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC)
+ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC) /* {{{ */
{
zend_hash_apply_with_argument(EG(ini_directives), (apply_func_arg_t) zend_ini_refresh_cache, (void *)(zend_uintptr_t) stage TSRMLS_CC);
}
+/* }}} */
#endif
-
-ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage)
+ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage) /* {{{ */
{
zend_ini_entry *ini_entry;
char *duplicate;
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage)
+ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage) /* {{{ */
{
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type))
+ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type)) /* {{{ */
{
zend_ini_entry *ini_entry;
ini_entry->displayer = displayer;
return SUCCESS;
}
-
-
+/* }}} */
/*
* Data retrieval
*/
-
-ZEND_API long zend_ini_long(char *name, uint name_length, int orig)
+ZEND_API long zend_ini_long(char *name, uint name_length, int orig) /* {{{ */
{
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
return 0;
}
+/* }}} */
-
-ZEND_API double zend_ini_double(char *name, uint name_length, int orig)
+ZEND_API double zend_ini_double(char *name, uint name_length, int orig) /* {{{ */
{
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
return 0.0;
}
+/* }}} */
-
-ZEND_API char *zend_ini_string(char *name, uint name_length, int orig)
+ZEND_API char *zend_ini_string(char *name, uint name_length, int orig) /* {{{ */
{
zend_ini_entry *ini_entry;
TSRMLS_FETCH();
return "";
}
+/* }}} */
#if TONY_20070307
-static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type)
+static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type) /* {{{ */
{
if (ini_entry->displayer) {
ini_entry->displayer(ini_entry, type);
ZEND_WRITE(display_string, display_string_length);
}
}
+/* }}} */
#endif
-
-ZEND_INI_DISP(zend_ini_boolean_displayer_cb)
+ZEND_INI_DISP(zend_ini_boolean_displayer_cb) /* {{{ */
{
int value, tmp_value_len;
char *tmp_value;
ZEND_PUTS("Off");
}
}
+/* }}} */
-
-ZEND_INI_DISP(zend_ini_color_displayer_cb)
+ZEND_INI_DISP(zend_ini_color_displayer_cb) /* {{{ */
{
char *value;
}
}
}
+/* }}} */
-
-ZEND_INI_DISP(display_link_numbers)
+ZEND_INI_DISP(display_link_numbers) /* {{{ */
{
char *value;
}
}
}
-
+/* }}} */
/* Standard message handlers */
-
-ZEND_API ZEND_INI_MH(OnUpdateBool)
+ZEND_API ZEND_INI_MH(OnUpdateBool) /* {{{ */
{
zend_bool *p;
#ifndef ZTS
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API ZEND_INI_MH(OnUpdateLong)
+ZEND_API ZEND_INI_MH(OnUpdateLong) /* {{{ */
{
long *p;
#ifndef ZTS
*p = zend_atoi(new_value, new_value_length);
return SUCCESS;
}
-ZEND_API ZEND_INI_MH(OnUpdateLongGEZero)
+/* }}} */
+
+ZEND_API ZEND_INI_MH(OnUpdateLongGEZero) /* {{{ */
{
long *p, tmp;
#ifndef ZTS
return SUCCESS;
}
+/* }}} */
-
-
-ZEND_API ZEND_INI_MH(OnUpdateReal)
+ZEND_API ZEND_INI_MH(OnUpdateReal) /* {{{ */
{
double *p;
#ifndef ZTS
*p = zend_strtod(new_value, NULL);
return SUCCESS;
}
+/* }}} */
-
-ZEND_API ZEND_INI_MH(OnUpdateString)
+ZEND_API ZEND_INI_MH(OnUpdateString) /* {{{ */
{
char **p;
#ifndef ZTS
*p = new_value;
return SUCCESS;
}
+/* }}} */
-
-ZEND_API ZEND_INI_MH(OnUpdateStringUnempty)
+ZEND_API ZEND_INI_MH(OnUpdateStringUnempty) /* {{{ */
{
char **p;
#ifndef ZTS
*p = new_value;
return SUCCESS;
}
+/* }}} */
-ZEND_API ZEND_INI_MH(OnUpdateUTF8String)
+ZEND_API ZEND_INI_MH(OnUpdateUTF8String) /* {{{ */
{
UChar **p;
UChar *ustr = NULL;
*p = ustr;
return SUCCESS;
}
+/* }}} */
/*
* Local variables:
NULL /* count */
};
-ZEND_API void zend_register_iterator_wrapper(TSRMLS_D)
+ZEND_API void zend_register_iterator_wrapper(TSRMLS_D) /* {{{ */
{
INIT_CLASS_ENTRY(zend_iterator_class_entry, "__iterator_wrapper", NULL);
free(zend_iterator_class_entry.name.s);
zend_iterator_class_entry.name.s = "__iterator_wrapper";
}
+/* }}} */
-static void iter_wrapper_dtor(void *object, zend_object_handle handle TSRMLS_DC)
+static void iter_wrapper_dtor(void *object, zend_object_handle handle TSRMLS_DC) /* {{{ */
{
zend_object_iterator *iter = (zend_object_iterator*)object;
iter->funcs->dtor(iter TSRMLS_CC);
}
+/* }}} */
-ZEND_API zval *zend_iterator_wrap(zend_object_iterator *iter TSRMLS_DC)
+ZEND_API zval *zend_iterator_wrap(zend_object_iterator *iter TSRMLS_DC) /* {{{ */
{
zval *wrapped;
return wrapped;
}
+/* }}} */
-ZEND_API enum zend_object_iterator_kind zend_iterator_unwrap(
- zval *array_ptr, zend_object_iterator **iter TSRMLS_DC)
+ZEND_API enum zend_object_iterator_kind zend_iterator_unwrap(zval *array_ptr, zend_object_iterator **iter TSRMLS_DC) /* {{{ */
{
switch (Z_TYPE_P(array_ptr)) {
case IS_OBJECT:
return ZEND_ITER_INVALID;
}
}
+/* }}} */
/*
* Local variables:
/* true global */
static HashTable list_destructors;
-
-ZEND_API int zend_list_insert(void *ptr, int type)
+ZEND_API int zend_list_insert(void *ptr, int type) /* {{{ */
{
int index;
zend_rsrc_list_entry le;
zend_hash_index_update(&EG(regular_list), index, (void *) &le, sizeof(zend_rsrc_list_entry), NULL);
return index;
}
+/* }}} */
-ZEND_API int _zend_list_delete(int id TSRMLS_DC)
+ZEND_API int _zend_list_delete(int id TSRMLS_DC) /* {{{ */
{
zend_rsrc_list_entry *le;
return FAILURE;
}
}
+/* }}} */
-
-ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC)
+ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC) /* {{{ */
{
zend_rsrc_list_entry *le;
return NULL;
}
}
+/* }}} */
-ZEND_API int _zend_list_addref(int id TSRMLS_DC)
+ZEND_API int _zend_list_addref(int id TSRMLS_DC) /* {{{ */
{
zend_rsrc_list_entry *le;
return FAILURE;
}
}
+/* }}} */
-
-ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
+ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type) /* {{{ */
{
int rsrc_id;
return rsrc_id;
}
+/* }}} */
-
-ZEND_API void *zend_fetch_resource(zval **passed_id TSRMLS_DC, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...)
+ZEND_API void *zend_fetch_resource(zval **passed_id TSRMLS_DC, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...) /* {{{ */
{
int id;
int actual_resource_type;
return NULL;
}
+/* }}} */
-
-void list_entry_destructor(void *ptr)
+void list_entry_destructor(void *ptr) /* {{{ */
{
zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr;
zend_rsrc_list_dtors_entry *ld;
zend_error(E_WARNING,"Unknown list entry type in request shutdown (%d)", le->type);
}
}
+/* }}} */
-
-void plist_entry_destructor(void *ptr)
+void plist_entry_destructor(void *ptr) /* {{{ */
{
zend_rsrc_list_entry *le = (zend_rsrc_list_entry *) ptr;
zend_rsrc_list_dtors_entry *ld;
zend_error(E_WARNING,"Unknown persistent list entry type in module shutdown (%d)", le->type);
}
}
+/* }}} */
-
-int zend_init_rsrc_list(TSRMLS_D)
+int zend_init_rsrc_list(TSRMLS_D) /* {{{ */
{
if (zend_hash_init(&EG(regular_list), 0, NULL, list_entry_destructor, 0)==SUCCESS) {
EG(regular_list).nNextFreeElement=1; /* we don't want resource id 0 */
return FAILURE;
}
}
+/* }}} */
-
-int zend_init_rsrc_plist(TSRMLS_D)
+int zend_init_rsrc_plist(TSRMLS_D) /* {{{ */
{
return zend_hash_init_ex(&EG(persistent_list), 0, NULL, plist_entry_destructor, 1, 0);
}
+/* }}} */
-
-void zend_destroy_rsrc_list(HashTable *ht TSRMLS_DC)
+void zend_destroy_rsrc_list(HashTable *ht TSRMLS_DC) /* {{{ */
{
zend_hash_graceful_reverse_destroy(ht);
}
+/* }}} */
-static int clean_module_resource(zend_rsrc_list_entry *le, int *resource_id TSRMLS_DC)
+static int clean_module_resource(zend_rsrc_list_entry *le, int *resource_id TSRMLS_DC) /* {{{ */
{
if (le->type == *resource_id) {
return 1;
return 0;
}
}
+/* }}} */
-
-static int zend_clean_module_rsrc_dtors_cb(zend_rsrc_list_dtors_entry *ld, int *module_number TSRMLS_DC)
+static int zend_clean_module_rsrc_dtors_cb(zend_rsrc_list_dtors_entry *ld, int *module_number TSRMLS_DC) /* {{{ */
{
if (ld->module_number == *module_number) {
zend_hash_apply_with_argument(&EG(regular_list), (apply_func_arg_t) clean_module_resource, (void *) &(ld->resource_id) TSRMLS_CC);
return 0;
}
}
+/* }}} */
-
-void zend_clean_module_rsrc_dtors(int module_number TSRMLS_DC)
+void zend_clean_module_rsrc_dtors(int module_number TSRMLS_DC) /* {{{ */
{
zend_hash_apply_with_argument(&list_destructors, (apply_func_arg_t) zend_clean_module_rsrc_dtors_cb, (void *) &module_number TSRMLS_CC);
}
+/* }}} */
-
-ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number)
+ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number) /* {{{ */
{
zend_rsrc_list_dtors_entry lde;
}
return list_destructors.nNextFreeElement-1;
}
+/* }}} */
-
-ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number)
+ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number) /* {{{ */
{
zend_rsrc_list_dtors_entry lde;
}
return list_destructors.nNextFreeElement-1;
}
+/* }}} */
-ZEND_API int zend_fetch_list_dtor_id(char *type_name)
+ZEND_API int zend_fetch_list_dtor_id(char *type_name) /* {{{ */
{
zend_rsrc_list_dtors_entry *lde;
HashPosition pos;
return 0;
}
+/* }}} */
-int zend_init_rsrc_list_dtors(void)
+int zend_init_rsrc_list_dtors(void) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-
-void zend_destroy_rsrc_list_dtors(void)
+void zend_destroy_rsrc_list_dtors(void) /* {{{ */
{
zend_hash_destroy(&list_destructors);
}
+/* }}} */
-
-char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC)
+char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC) /* {{{ */
{
zend_rsrc_list_dtors_entry *lde;
int rsrc_type;
return NULL;
}
}
+/* }}} */
/*
* Local variables:
#include "zend_llist.h"
#include "zend_qsort.h"
-ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent)
+ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t dtor, unsigned char persistent) /* {{{ */
{
l->head = NULL;
l->tail = NULL;
l->dtor = dtor;
l->persistent = persistent;
}
+/* }}} */
-
-ZEND_API void zend_llist_add_element(zend_llist *l, void *element)
+ZEND_API void zend_llist_add_element(zend_llist *l, void *element) /* {{{ */
{
zend_llist_element *tmp = pemalloc(sizeof(zend_llist_element)+l->size-1, l->persistent);
++l->count;
}
+/* }}} */
-
-ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element)
+ZEND_API void zend_llist_prepend_element(zend_llist *l, void *element) /* {{{ */
{
zend_llist_element *tmp = pemalloc(sizeof(zend_llist_element)+l->size-1, l->persistent);
++l->count;
}
-
+/* }}} */
#define DEL_LLIST_ELEMENT(current, l) \
if ((current)->prev) {\
--l->count;
-ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2))
+ZEND_API void zend_llist_del_element(zend_llist *l, void *element, int (*compare)(void *element1, void *element2)) /* {{{ */
{
zend_llist_element *current=l->head;
zend_llist_element *next;
current = next;
}
}
+/* }}} */
-
-ZEND_API void zend_llist_destroy(zend_llist *l)
+ZEND_API void zend_llist_destroy(zend_llist *l) /* {{{ */
{
zend_llist_element *current=l->head, *next;
l->count = 0;
}
+/* }}} */
-
-ZEND_API void zend_llist_clean(zend_llist *l)
+ZEND_API void zend_llist_clean(zend_llist *l) /* {{{ */
{
zend_llist_destroy(l);
l->head = l->tail = NULL;
}
+/* }}} */
-
-ZEND_API void *zend_llist_remove_tail(zend_llist *l)
+ZEND_API void *zend_llist_remove_tail(zend_llist *l) /* {{{ */
{
zend_llist_element *old_tail;
void *data;
return NULL;
}
+/* }}} */
-
-ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src)
+ZEND_API void zend_llist_copy(zend_llist *dst, zend_llist *src) /* {{{ */
{
zend_llist_element *ptr;
ptr = ptr->next;
}
}
+/* }}} */
-
-ZEND_API void zend_llist_apply_with_del(zend_llist *l, int (*func)(void *data))
+ZEND_API void zend_llist_apply_with_del(zend_llist *l, int (*func)(void *data)) /* {{{ */
{
zend_llist_element *element, *next;
element = next;
}
}
+/* }}} */
-
-ZEND_API void zend_llist_apply(zend_llist *l, llist_apply_func_t func TSRMLS_DC)
+ZEND_API void zend_llist_apply(zend_llist *l, llist_apply_func_t func TSRMLS_DC) /* {{{ */
{
zend_llist_element *element;
func(element->data TSRMLS_CC);
}
}
+/* }}} */
-ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func TSRMLS_DC)
+ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func TSRMLS_DC) /* {{{ */
{
size_t i;
l->tail = elements[i-1];
efree(elements);
}
+/* }}} */
-
-ZEND_API void zend_llist_apply_with_argument(zend_llist *l, llist_apply_with_arg_func_t func, void *arg TSRMLS_DC)
+ZEND_API void zend_llist_apply_with_argument(zend_llist *l, llist_apply_with_arg_func_t func, void *arg TSRMLS_DC) /* {{{ */
{
zend_llist_element *element;
func(element->data, arg TSRMLS_CC);
}
}
+/* }}} */
-
-ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func TSRMLS_DC, int num_args, ...)
+ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func TSRMLS_DC, int num_args, ...) /* {{{ */
{
zend_llist_element *element;
va_list args;
}
va_end(args);
}
+/* }}} */
-
-ZEND_API int zend_llist_count(zend_llist *l)
+ZEND_API int zend_llist_count(zend_llist *l) /* {{{ */
{
return l->count;
}
+/* }}} */
-
-ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos)
+ZEND_API void *zend_llist_get_first_ex(zend_llist *l, zend_llist_position *pos) /* {{{ */
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
return NULL;
}
}
+/* }}} */
-
-ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos)
+ZEND_API void *zend_llist_get_last_ex(zend_llist *l, zend_llist_position *pos) /* {{{ */
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
return NULL;
}
}
+/* }}} */
-
-ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos)
+ZEND_API void *zend_llist_get_next_ex(zend_llist *l, zend_llist_position *pos) /* {{{ */
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
}
return NULL;
}
+/* }}} */
-
-ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos)
+ZEND_API void *zend_llist_get_prev_ex(zend_llist *l, zend_llist_position *pos) /* {{{ */
{
zend_llist_position *current = pos ? pos : &l->traverse_ptr;
}
return NULL;
}
+/* }}} */
/*
* Local variables:
called, we cal __call handler.
*/
-ZEND_API HashTable *zend_std_get_properties(zval *object TSRMLS_DC)
+ZEND_API HashTable *zend_std_get_properties(zval *object TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zobj = Z_OBJ_P(object);
return zobj->properties;
}
+/* }}} */
-ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp TSRMLS_DC)
+ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp TSRMLS_DC) /* {{{ */
{
*is_temp = 0;
return zend_std_get_properties(object TSRMLS_CC);
}
+/* }}} */
-static zval *zend_std_call_getter(zval *object, zval *member TSRMLS_DC)
+static zval *zend_std_call_getter(zval *object, zval *member TSRMLS_DC) /* {{{ */
{
zval *retval = NULL;
zend_class_entry *ce = Z_OBJCE_P(object);
return retval;
}
+/* }}} */
-static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_DC)
+static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_DC) /* {{{ */
{
zval *retval = NULL;
int result;
return FAILURE;
}
}
+/* }}} */
-static void zend_std_call_unsetter(zval *object, zval *member TSRMLS_DC)
+static void zend_std_call_unsetter(zval *object, zval *member TSRMLS_DC) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zval_ptr_dtor(&member);
}
+/* }}} */
-static zval *zend_std_call_issetter(zval *object, zval *member TSRMLS_DC)
+static zval *zend_std_call_issetter(zval *object, zval *member TSRMLS_DC) /* {{{ */
{
zval *retval = NULL;
zend_class_entry *ce = Z_OBJCE_P(object);
return retval;
}
+/* }}} */
-static int zend_verify_property_access(zend_property_info *property_info, zend_class_entry *ce TSRMLS_DC)
+static int zend_verify_property_access(zend_property_info *property_info, zend_class_entry *ce TSRMLS_DC) /* {{{ */
{
switch (property_info->flags & ZEND_ACC_PPP_MASK) {
case ZEND_ACC_PUBLIC:
}
return 0;
}
+/* }}} */
-static inline zend_bool is_derived_class(zend_class_entry *child_class, zend_class_entry *parent_class)
+static inline zend_bool is_derived_class(zend_class_entry *child_class, zend_class_entry *parent_class) /* {{{ */
{
child_class = child_class->parent;
while (child_class) {
return 0;
}
+/* }}} */
-ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zval *member, int silent TSRMLS_DC)
+ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zval *member, int silent TSRMLS_DC) /* {{{ */
{
zend_property_info *property_info = NULL;
zend_property_info *scope_property_info;
}
return property_info;
}
+/* }}} */
-
-ZEND_API int zend_check_property_access(zend_object *zobj, zend_uchar utype, zstr prop_info_name, int prop_info_name_len TSRMLS_DC)
+ZEND_API int zend_check_property_access(zend_object *zobj, zend_uchar utype, zstr prop_info_name, int prop_info_name_len TSRMLS_DC) /* {{{ */
{
zend_property_info *property_info;
zstr class_name, prop_name;
}
return zend_verify_property_access(property_info, zobj->ce TSRMLS_CC) ? SUCCESS : FAILURE;
}
+/* }}} */
-static int zend_get_property_guard(zend_object *zobj, zend_property_info *property_info, zval *member, zend_guard **pguard TSRMLS_DC)
+static int zend_get_property_guard(zend_object *zobj, zend_property_info *property_info, zval *member, zend_guard **pguard TSRMLS_DC) /* {{{ */
{
zend_property_info info;
zend_guard stub;
stub.in_isset = 0;
return zend_u_hash_quick_add(zobj->guards, UG(unicode)?IS_UNICODE:IS_STRING, property_info->name, property_info->name_length+1, property_info->h, (void**)&stub, sizeof(stub), (void**) pguard);
}
+/* }}} */
-zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC)
+zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zval *tmp_member = NULL;
}
return *retval;
}
+/* }}} */
-
-static void zend_std_write_property(zval *object, zval *member, zval *value TSRMLS_DC)
+static void zend_std_write_property(zval *object, zval *member, zval *value TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zval *tmp_member = NULL;
zval_ptr_dtor(&tmp_member);
}
}
+/* }}} */
-zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC)
+zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zval *retval;
return 0;
}
}
+/* }}} */
-
-static void zend_std_write_dimension(zval *object, zval *offset, zval *value TSRMLS_DC)
+static void zend_std_write_dimension(zval *object, zval *offset, zval *value TSRMLS_DC) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zend_error(E_ERROR, "Cannot use object of type %v as array", ce->name);
}
}
+/* }}} */
-
-static int zend_std_has_dimension(zval *object, zval *offset, int check_empty TSRMLS_DC)
+static int zend_std_has_dimension(zval *object, zval *offset, int check_empty TSRMLS_DC) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zval *retval;
}
return result;
}
+/* }}} */
-
-static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC)
+static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zval tmp_member;
}
return retval;
}
+/* }}} */
-
-static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC)
+static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zval *tmp_member = NULL;
zval_ptr_dtor(&tmp_member);
}
}
+/* }}} */
-
-static void zend_std_unset_dimension(zval *object, zval *offset TSRMLS_DC)
+static void zend_std_unset_dimension(zval *object, zval *offset TSRMLS_DC) /* {{{ */
{
zend_class_entry *ce = Z_OBJCE_P(object);
zend_error(E_ERROR, "Cannot use object of type %v as array", ce->name);
}
}
+/* }}} */
-
-ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS)
+ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */
{
zend_internal_function *func = (zend_internal_function *)EG(function_state_ptr)->function;
zval *method_name_ptr, *method_args_ptr;
/* destruct the function also, then - we have allocated it in get_method */
efree(func);
}
+/* }}} */
/* Ensures that we're allowed to call a private method.
* Returns the function address that should be called, or NULL
* if no such function exists.
*/
-static inline zend_function *zend_check_private_int(zend_function *fbc, zend_class_entry *ce, zstr function_name_strval, int function_name_strlen TSRMLS_DC)
+static inline zend_function *zend_check_private_int(zend_function *fbc, zend_class_entry *ce, zstr function_name_strval, int function_name_strlen TSRMLS_DC) /* {{{ */
{
if (!ce) {
return 0;
}
return NULL;
}
+/* }}} */
-
-ZEND_API int zend_check_private(zend_function *fbc, zend_class_entry *ce, zstr function_name_strval, int function_name_strlen TSRMLS_DC)
+ZEND_API int zend_check_private(zend_function *fbc, zend_class_entry *ce, zstr function_name_strval, int function_name_strlen TSRMLS_DC) /* {{{ */
{
return zend_check_private_int(fbc, ce, function_name_strval, function_name_strlen TSRMLS_CC) != NULL;
}
-
+/* }}} */
/* Ensures that we're allowed to call a protected method.
*/
-ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope)
+ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope) /* {{{ */
{
zend_class_entry *fbc_scope = ce;
}
return 0;
}
+/* }}} */
-
-static inline zend_class_entry * zend_get_function_root_class(zend_function *fbc)
+static inline zend_class_entry * zend_get_function_root_class(zend_function *fbc) /* {{{ */
{
return fbc->common.prototype ? fbc->common.prototype->common.scope : fbc->common.scope;
}
+/* }}} */
-
-static union _zend_function *zend_std_get_method(zval **object_ptr, zstr method_name, int method_len TSRMLS_DC)
+static union _zend_function *zend_std_get_method(zval **object_ptr, zstr method_name, int method_len TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zend_function *fbc;
efree(lc_method_name.v);
return fbc;
}
-
+/* }}} */
/* This is not (yet?) in the API, but it belongs in the built-in objects callbacks */
-ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zstr function_name_strval, int function_name_strlen TSRMLS_DC)
+ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zstr function_name_strval, int function_name_strlen TSRMLS_DC) /* {{{ */
{
zend_function *fbc;
/* FIXME: type is default */
return fbc;
}
+/* }}} */
-
-ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, zend_uchar type, zstr property_name, int property_name_len, zend_bool silent TSRMLS_DC)
+ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, zend_uchar type, zstr property_name, int property_name_len, zend_bool silent TSRMLS_DC) /* {{{ */
{
zval **retval = NULL;
zend_class_entry *tmp_ce = ce;
return retval;
}
+/* }}} */
-
-ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_uchar type, zstr property_name, int property_name_len TSRMLS_DC)
+ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_uchar type, zstr property_name, int property_name_len TSRMLS_DC) /* {{{ */
{
zend_error(E_ERROR, "Attempt to unset static property %v::$%R", ce->name, type, property_name);
return 0;
}
+/* }}} */
-
-ZEND_API union _zend_function *zend_std_get_constructor(zval *object TSRMLS_DC)
+ZEND_API union _zend_function *zend_std_get_constructor(zval *object TSRMLS_DC) /* {{{ */
{
zend_object *zobj = Z_OBJ_P(object);
zend_function *constructor = zobj->ce->constructor;
return constructor;
}
-
+/* }}} */
int zend_compare_symbol_tables_i(HashTable *ht1, HashTable *ht2 TSRMLS_DC);
-
-static int zend_std_compare_objects(zval *o1, zval *o2 TSRMLS_DC)
+static int zend_std_compare_objects(zval *o1, zval *o2 TSRMLS_DC) /* {{{ */
{
zend_object *zobj1, *zobj2;
}
return zend_compare_symbol_tables_i(zobj1->properties, zobj2->properties TSRMLS_CC);
}
+/* }}} */
-static int zend_std_has_property(zval *object, zval *member, int has_set_exists TSRMLS_DC)
+static int zend_std_has_property(zval *object, zval *member, int has_set_exists TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
int result;
}
return result;
}
+/* }}} */
-
-zend_class_entry *zend_std_object_get_class(zval *object TSRMLS_DC)
+zend_class_entry *zend_std_object_get_class(zval *object TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zobj = Z_OBJ_P(object);
return zobj->ce;
}
+/* }}} */
-int zend_std_object_get_class_name(zval *object, zstr *class_name, zend_uint *class_name_len, int parent TSRMLS_DC)
+int zend_std_object_get_class_name(zval *object, zstr *class_name, zend_uint *class_name_len, int parent TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zend_class_entry *ce;
}
return SUCCESS;
}
+/* }}} */
-ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int type, void *extra TSRMLS_DC)
+ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int type, void *extra TSRMLS_DC) /* {{{ */
{
zval *retval;
zend_class_entry *ce;
}
return FAILURE;
}
-
+/* }}} */
ZEND_API zend_object_handlers std_object_handlers = {
zend_objects_store_add_ref, /* add_ref */
#include "zend_interfaces.h"
#include "zend_exceptions.h"
-ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC)
+ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC) /* {{{ */
{
ALLOC_HASHTABLE(object->properties);
zend_u_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0, UG(unicode));
object->ce = ce;
object->guards = NULL;
}
+/* }}} */
-ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
+ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC) /* {{{ */
{
if (object->guards) {
zend_hash_destroy(object->guards);
FREE_HASHTABLE(object->properties);
}
}
+/* }}} */
-ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC)
+ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC) /* {{{ */
{
zend_function *destructor = object->ce->destructor;
zval_ptr_dtor(&obj);
}
}
+/* }}} */
-ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC)
+ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC) /* {{{ */
{
if (object->guards) {
zend_hash_destroy(object->guards);
FREE_HASHTABLE(object->properties);
efree(object);
}
+/* }}} */
-ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type TSRMLS_DC)
+ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type TSRMLS_DC) /* {{{ */
{
zend_object_value retval;
(*object)->guards = NULL;
return retval;
}
+/* }}} */
-ZEND_API zend_object *zend_objects_get_address(zval *zobject TSRMLS_DC)
+ZEND_API zend_object *zend_objects_get_address(zval *zobject TSRMLS_DC) /* {{{ */
{
return (zend_object *)zend_object_store_get_object(zobject TSRMLS_CC);
}
+/* }}} */
-ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object_value new_obj_val, zend_object *old_object, zend_object_handle handle TSRMLS_DC)
+ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object_value new_obj_val, zend_object *old_object, zend_object_handle handle TSRMLS_DC) /* {{{ */
{
zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref, (void *) NULL /* Not used anymore */, sizeof(zval *));
if (old_object->ce->clone) {
zval_ptr_dtor(&new_obj);
}
}
+/* }}} */
-ZEND_API zend_object_value zend_objects_clone_obj(zval *zobject TSRMLS_DC)
+ZEND_API zend_object_value zend_objects_clone_obj(zval *zobject TSRMLS_DC) /* {{{ */
{
zend_object_value new_obj_val;
zend_object *old_object;
return new_obj_val;
}
+/* }}} */
/*
* Local variables:
#define ZEND_DEBUG_OBJECTS 0
-ZEND_API void zend_objects_store_init(zend_objects_store *objects, zend_uint init_size)
+ZEND_API void zend_objects_store_init(zend_objects_store *objects, zend_uint init_size) /* {{{ */
{
objects->object_buckets = (zend_object_store_bucket *) emalloc(init_size * sizeof(zend_object_store_bucket));
objects->top = 1; /* Skip 0 so that handles are true */
objects->free_list_head = -1;
memset(&objects->object_buckets[0], 0, sizeof(zend_object_store_bucket));
}
+/* }}} */
-ZEND_API void zend_objects_store_destroy(zend_objects_store *objects)
+ZEND_API void zend_objects_store_destroy(zend_objects_store *objects) /* {{{ */
{
efree(objects->object_buckets);
objects->object_buckets = NULL;
}
+/* }}} */
-ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TSRMLS_DC)
+ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TSRMLS_DC) /* {{{ */
{
zend_uint i = 1;
}
}
}
+/* }}} */
-ZEND_API void zend_objects_store_mark_destructed(zend_objects_store *objects TSRMLS_DC)
+ZEND_API void zend_objects_store_mark_destructed(zend_objects_store *objects TSRMLS_DC) /* {{{ */
{
zend_uint i;
}
}
}
+/* }}} */
-ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects TSRMLS_DC)
+ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects TSRMLS_DC) /* {{{ */
{
zend_uint i = 1;
}
}
}
-
+/* }}} */
/* Store objects API */
-
-ZEND_API zend_object_handle zend_objects_store_put(void *object, zend_objects_store_dtor_t dtor, zend_objects_free_object_storage_t free_storage, zend_objects_store_clone_t clone TSRMLS_DC)
+ZEND_API zend_object_handle zend_objects_store_put(void *object, zend_objects_store_dtor_t dtor, zend_objects_free_object_storage_t free_storage, zend_objects_store_clone_t clone TSRMLS_DC) /* {{{ */
{
zend_object_handle handle;
struct _store_object *obj;
#endif
return handle;
}
+/* }}} */
-ZEND_API zend_uint zend_objects_store_get_refcount(zval *object TSRMLS_DC)
+ZEND_API zend_uint zend_objects_store_get_refcount(zval *object TSRMLS_DC) /* {{{ */
{
zend_object_handle handle = Z_OBJ_HANDLE_P(object);
return EG(objects_store).object_buckets[handle].bucket.obj.refcount;
}
+/* }}} */
-ZEND_API void zend_objects_store_add_ref(zval *object TSRMLS_DC)
+ZEND_API void zend_objects_store_add_ref(zval *object TSRMLS_DC) /* {{{ */
{
zend_object_handle handle = Z_OBJ_HANDLE_P(object);
fprintf(stderr, "Increased refcount of object id #%d\n", handle);
#endif
}
+/* }}} */
-ZEND_API int zend_objects_is_destructor_called(zend_object_handle handle TSRMLS_DC)
+ZEND_API int zend_objects_is_destructor_called(zend_object_handle handle TSRMLS_DC) /* {{{ */
{
if (EG(objects_store).object_buckets[handle].valid) {
return EG(objects_store).object_buckets[handle].destructor_called;
}
return 1;
}
+/* }}} */
/*
* Add a reference to an objects store entry given the object handle.
*/
-ZEND_API void zend_objects_store_add_ref_by_handle(zend_object_handle handle TSRMLS_DC)
+ZEND_API void zend_objects_store_add_ref_by_handle(zend_object_handle handle TSRMLS_DC) /* {{{ */
{
EG(objects_store).object_buckets[handle].bucket.obj.refcount++;
}
+/* }}} */
#define ZEND_OBJECTS_STORE_ADD_TO_FREE_LIST() \
EG(objects_store).object_buckets[handle].bucket.free_list.next = EG(objects_store).free_list_head; \
EG(objects_store).free_list_head = handle; \
EG(objects_store).object_buckets[handle].valid = 0;
-ZEND_API void zend_objects_store_del_ref(zval *zobject TSRMLS_DC)
+ZEND_API void zend_objects_store_del_ref(zval *zobject TSRMLS_DC) /* {{{ */
{
zend_object_handle handle;
zend_objects_store_del_ref_by_handle(handle TSRMLS_CC);
zobject->refcount--;
}
+/* }}} */
/*
* Delete a reference to an objects store entry given the object handle.
*/
-ZEND_API void zend_objects_store_del_ref_by_handle(zend_object_handle handle TSRMLS_DC)
+ZEND_API void zend_objects_store_del_ref_by_handle(zend_object_handle handle TSRMLS_DC) /* {{{ */
{
struct _store_object *obj;
int failure = 0;
zend_bailout();
}
}
+/* }}} */
-ZEND_API zend_object_value zend_objects_store_clone_obj(zval *zobject TSRMLS_DC)
+ZEND_API zend_object_value zend_objects_store_clone_obj(zval *zobject TSRMLS_DC) /* {{{ */
{
zend_object_value retval;
void *new_object;
return retval;
}
+/* }}} */
-ZEND_API void *zend_object_store_get_object(zval *zobject TSRMLS_DC)
+ZEND_API void *zend_object_store_get_object(zval *zobject TSRMLS_DC) /* {{{ */
{
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
return EG(objects_store).object_buckets[handle].bucket.obj.object;
}
+/* }}} */
/*
* Retrieve an entry from the objects store given the object handle.
*/
-ZEND_API void *zend_object_store_get_object_by_handle(zend_object_handle handle TSRMLS_DC)
+ZEND_API void *zend_object_store_get_object_by_handle(zend_object_handle handle TSRMLS_DC) /* {{{ */
{
return EG(objects_store).object_buckets[handle].bucket.obj.object;
}
+/* }}} */
/* zend_object_store_set_object:
* It is ONLY valid to call this function from within the constructor of an
* from the constructor function. You MUST NOT use this function for any other
* weird games, or call it at any other time after the object is constructed.
* */
-ZEND_API void zend_object_store_set_object(zval *zobject, void *object TSRMLS_DC)
+ZEND_API void zend_object_store_set_object(zval *zobject, void *object TSRMLS_DC) /* {{{ */
{
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
EG(objects_store).object_buckets[handle].bucket.obj.object = object;
}
-
+/* }}} */
/* Called when the ctor was terminated by an exception */
-ZEND_API void zend_object_store_ctor_failed(zval *zobject TSRMLS_DC)
+ZEND_API void zend_object_store_ctor_failed(zval *zobject TSRMLS_DC) /* {{{ */
{
zend_object_handle handle = Z_OBJ_HANDLE_P(zobject);
EG(objects_store).object_buckets[handle].destructor_called = 1;
}
-
+/* }}} */
/* Proxy objects workings */
typedef struct _zend_proxy_object {
static zend_object_handlers zend_object_proxy_handlers;
-ZEND_API void zend_objects_proxy_free_storage(zend_proxy_object *object TSRMLS_DC)
+ZEND_API void zend_objects_proxy_free_storage(zend_proxy_object *object TSRMLS_DC) /* {{{ */
{
zval_ptr_dtor(&object->object);
zval_ptr_dtor(&object->property);
efree(object);
}
+/* }}} */
-ZEND_API void zend_objects_proxy_clone(zend_proxy_object *object, zend_proxy_object **object_clone TSRMLS_DC)
+ZEND_API void zend_objects_proxy_clone(zend_proxy_object *object, zend_proxy_object **object_clone TSRMLS_DC) /* {{{ */
{
*object_clone = emalloc(sizeof(zend_proxy_object));
(*object_clone)->object = object->object;
zval_add_ref(&(*object_clone)->property);
zval_add_ref(&(*object_clone)->object);
}
+/* }}} */
-ZEND_API zval *zend_object_create_proxy(zval *object, zval *member TSRMLS_DC)
+ZEND_API zval *zend_object_create_proxy(zval *object, zval *member TSRMLS_DC) /* {{{ */
{
zend_proxy_object *pobj = emalloc(sizeof(zend_proxy_object));
zval *retval;
return retval;
}
+/* }}} */
-ZEND_API void zend_object_proxy_set(zval **property, zval *value TSRMLS_DC)
+ZEND_API void zend_object_proxy_set(zval **property, zval *value TSRMLS_DC) /* {{{ */
{
zend_proxy_object *probj = zend_object_store_get_object(*property TSRMLS_CC);
zend_error(E_WARNING, "Cannot write property of object - no write handler defined");
}
}
+/* }}} */
-ZEND_API zval* zend_object_proxy_get(zval *property TSRMLS_DC)
+ZEND_API zval* zend_object_proxy_get(zval *property TSRMLS_DC) /* {{{ */
{
zend_proxy_object *probj = zend_object_store_get_object(property TSRMLS_CC);
return NULL;
}
+/* }}} */
-ZEND_API zend_object_handlers *zend_get_std_object_handlers()
+ZEND_API zend_object_handlers *zend_get_std_object_handlers() /* {{{ */
{
return &std_object_handlers;
}
+/* }}} */
static zend_object_handlers zend_object_proxy_handlers = {
ZEND_OBJECTS_STORE_HANDLERS,
NULL, /* count_elements */
};
-
/*
* Local variables:
* tab-width: 4
extern int zend_spprintf(char **message, int max_len, char *format, ...);
-static void zend_extension_op_array_ctor_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
+static void zend_extension_op_array_ctor_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC) /* {{{ */
{
if (extension->op_array_ctor) {
extension->op_array_ctor(op_array);
}
}
+/* }}} */
-static void zend_extension_op_array_dtor_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
+static void zend_extension_op_array_dtor_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC) /* {{{ */
{
if (extension->op_array_dtor) {
extension->op_array_dtor(op_array);
}
}
+/* }}} */
-static void op_array_alloc_ops(zend_op_array *op_array)
+static void op_array_alloc_ops(zend_op_array *op_array) /* {{{ */
{
op_array->opcodes = erealloc(op_array->opcodes, (op_array->size)*sizeof(zend_op));
}
+/* }}} */
-void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size TSRMLS_DC)
+void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size TSRMLS_DC) /* {{{ */
{
op_array->type = type;
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_ctor_handler, op_array TSRMLS_CC);
}
+/* }}} */
-ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC)
+ZEND_API void destroy_zend_function(zend_function *function TSRMLS_DC) /* {{{ */
{
switch (function->type) {
case ZEND_USER_FUNCTION:
break;
}
}
+/* }}} */
-ZEND_API void zend_function_dtor(zend_function *function)
+ZEND_API void zend_function_dtor(zend_function *function) /* {{{ */
{
TSRMLS_FETCH();
destroy_zend_function(function TSRMLS_CC);
}
+/* }}} */
-ZEND_API void zend_u_function_dtor(zend_function *function)
+ZEND_API void zend_u_function_dtor(zend_function *function) /* {{{ */
{
TSRMLS_FETCH();
}
}
}
+/* }}} */
-static void zend_cleanup_op_array_data(zend_op_array *op_array)
+static void zend_cleanup_op_array_data(zend_op_array *op_array) /* {{{ */
{
if (op_array->static_variables) {
zend_hash_clean(op_array->static_variables);
}
}
+/* }}} */
-ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC)
+ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC) /* {{{ */
{
if (function->type == ZEND_USER_FUNCTION) {
zend_cleanup_op_array_data((zend_op_array *) function);
return ZEND_HASH_APPLY_STOP;
}
}
+/* }}} */
-ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC)
+ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC) /* {{{ */
{
if (function->type == ZEND_USER_FUNCTION) {
zend_cleanup_op_array_data((zend_op_array *) function);
}
return 0;
}
+/* }}} */
-ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC)
+ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC) /* {{{ */
{
if ((*pce)->type == ZEND_USER_CLASS) {
/* Clean all parts that can contain run-time data */
}
return 0;
}
+/* }}} */
-ZEND_API void destroy_zend_class(zend_class_entry **pce)
+ZEND_API void destroy_zend_class(zend_class_entry **pce) /* {{{ */
{
zend_class_entry *ce = *pce;
break;
}
}
+/* }}} */
-void zend_class_add_ref(zend_class_entry **ce)
+void zend_class_add_ref(zend_class_entry **ce) /* {{{ */
{
(*ce)->refcount++;
}
+/* }}} */
-ZEND_API void destroy_op_array(zend_op_array *op_array TSRMLS_DC)
+ZEND_API void destroy_op_array(zend_op_array *op_array TSRMLS_DC) /* {{{ */
{
zend_op *opline = op_array->opcodes;
zend_op *end = op_array->opcodes+op_array->last;
efree(op_array->arg_info);
}
}
+/* }}} */
-void init_op(zend_op *op TSRMLS_DC)
+void init_op(zend_op *op TSRMLS_DC) /* {{{ */
{
memset(op, 0, sizeof(zend_op));
op->lineno = CG(zend_lineno);
SET_UNUSED(op->result);
}
+/* }}} */
-zend_op *get_next_op(zend_op_array *op_array TSRMLS_DC)
+zend_op *get_next_op(zend_op_array *op_array TSRMLS_DC) /* {{{ */
{
zend_uint next_op_num = op_array->last++;
zend_op *next_op;
return next_op;
}
+/* }}} */
-int get_next_op_number(zend_op_array *op_array)
+int get_next_op_number(zend_op_array *op_array) /* {{{ */
{
return op_array->last;
}
+/* }}} */
-zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array)
+zend_brk_cont_element *get_next_brk_cont_element(zend_op_array *op_array) /* {{{ */
{
op_array->last_brk_cont++;
op_array->brk_cont_array = erealloc(op_array->brk_cont_array, sizeof(zend_brk_cont_element)*op_array->last_brk_cont);
return &op_array->brk_cont_array[op_array->last_brk_cont-1];
}
+/* }}} */
-static void zend_update_extended_info(zend_op_array *op_array TSRMLS_DC)
+static void zend_update_extended_info(zend_op_array *op_array TSRMLS_DC) /* {{{ */
{
zend_op *opline = op_array->opcodes, *end=opline+op_array->last;
opline++;
}
}
+/* }}} */
-static void zend_extension_op_array_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
+static void zend_extension_op_array_handler(zend_extension *extension, zend_op_array *op_array TSRMLS_DC) /* {{{ */
{
if (extension->op_array_handler) {
extension->op_array_handler(op_array);
}
}
+/* }}} */
-int pass_two(zend_op_array *op_array TSRMLS_DC)
+int pass_two(zend_op_array *op_array TSRMLS_DC) /* {{{ */
{
zend_op *opline, *end;
op_array->done_pass_two = 1;
return 0;
}
+/* }}} */
-int print_class(zend_class_entry *class_entry TSRMLS_DC)
+int print_class(zend_class_entry *class_entry TSRMLS_DC) /* {{{ */
{
char *tmp;
efree(tmp);
return 0;
}
+/* }}} */
-ZEND_API unary_op_type get_unary_op(int opcode)
+ZEND_API unary_op_type get_unary_op(int opcode) /* {{{ */
{
switch (opcode) {
case ZEND_BW_NOT:
break;
}
}
+/* }}} */
-ZEND_API void *get_binary_op(int opcode)
+ZEND_API void *get_binary_op(int opcode) /* {{{ */
{
switch (opcode) {
case ZEND_ADD:
break;
}
}
+/* }}} */
/*
* Local variables:
#define zend_tolower(c) tolower(c)
#endif
-ZEND_API int zend_atoi(const char *str, int str_len)
+ZEND_API int zend_atoi(const char *str, int str_len) /* {{{ */
{
int retval;
}
return retval;
}
+/* }}} */
-
-ZEND_API double zend_string_to_double(const char *number, zend_uint length)
+ZEND_API double zend_string_to_double(const char *number, zend_uint length) /* {{{ */
{
double divisor = 10.0;
double result = 0.0;
}
return result;
}
+/* }}} */
-
-ZEND_API int convert_scalar_to_number(zval *op TSRMLS_DC)
+ZEND_API int convert_scalar_to_number(zval *op TSRMLS_DC) /* {{{ */
{
switch (Z_TYPE_P(op)) {
case IS_STRING:
return SUCCESS;
}
+/* }}} */
+/* {{{ zendi_convert_scalar_to_number */
#define zendi_convert_scalar_to_number(op, holder, result) \
if (op==result) { \
if (Z_TYPE_P(op) != IS_LONG) { \
} \
}
+/* }}} */
+
+/* {{{ DVAL_TO_LVAL */
#ifdef _WIN64
# define DVAL_TO_LVAL(d, l) \
if ((d) > LONG_MAX) { \
(l) = (long) (d); \
}
#endif
+/* }}} */
+/* {{{ zendi_convert_to_long */
#define zendi_convert_to_long(op, holder, result) \
if (op == result) { \
convert_to_long(op); \
(op) = &(holder); \
}
+/* }}} */
+/* {{{ zendi_convert_to_boolean */
#define zendi_convert_to_boolean(op, holder, result) \
if (op==result) { \
convert_to_boolean(op); \
(op) = &(holder); \
}
+/* }}} */
+/* {{{ convert_object_to_type */
#define convert_object_to_type(op, ctype, conv_func) \
if (Z_OBJ_HT_P(op)->cast_object) { \
zval dst; \
} \
}
+/* }}} */
-ZEND_API int convert_to_long(zval *op)
+ZEND_API int convert_to_long(zval *op) /* {{{ */
{
return convert_to_long_base(op, 10);
}
+/* }}} */
-
-ZEND_API int convert_to_long_base(zval *op, int base)
+ZEND_API int convert_to_long_base(zval *op, int base) /* {{{ */
{
long tmp;
Z_TYPE_P(op) = IS_LONG;
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int convert_to_double(zval *op)
+ZEND_API int convert_to_double(zval *op) /* {{{ */
{
double tmp;
Z_TYPE_P(op) = IS_DOUBLE;
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int convert_to_null(zval *op)
+ZEND_API int convert_to_null(zval *op) /* {{{ */
{
if (Z_TYPE_P(op) == IS_OBJECT) {
if (Z_OBJ_HT_P(op)->cast_object) {
Z_TYPE_P(op) = IS_NULL;
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int convert_to_boolean(zval *op)
+ZEND_API int convert_to_boolean(zval *op) /* {{{ */
{
int tmp;
Z_TYPE_P(op) = IS_BOOL;
return SUCCESS;
}
+/* }}} */
#define NUM_BUF_SIZE 512
/* rewrite of ap_php_conv_10 for UChar support */
-static UChar* zend_u_format_long(long lnum, UChar *result_end, int *result_len)
+static UChar* zend_u_format_long(long lnum, UChar *result_end, int *result_len) /* {{{ */
{
UChar *p = result_end;
unsigned long magnitude;
*result_len = result_end - p - 1;
return p;
}
+/* }}} */
#define NDIG 320
/* rewrite of ap_php_cvt for UChar support */
-static UChar* zend_u_format_double(double arg, int ndigits, int *decpt, int *sign, int eflag, UChar *buf)
+static UChar* zend_u_format_double(double arg, int ndigits, int *decpt, int *sign, int eflag, UChar *buf) /* {{{ */
{
register int r2;
int mvl;
*p = 0;
return (buf);
}
+/* }}} */
/* rewrite of ap_php_gcvt for UChar support */
-static UChar* zend_u_format_gdouble(double dnum, int ndigit, UChar *result)
+static UChar* zend_u_format_gdouble(double dnum, int ndigit, UChar *result) /* {{{ */
{
int sign, decpt;
register UChar *p1, *p2;
*p2 = 0;
return (result);
}
+/* }}} */
-ZEND_API int _convert_to_unicode(zval *op TSRMLS_DC ZEND_FILE_LINE_DC)
+ZEND_API int _convert_to_unicode(zval *op TSRMLS_DC ZEND_FILE_LINE_DC) /* {{{ */
{
return _convert_to_unicode_with_converter(op, ZEND_U_CONVERTER(UG(runtime_encoding_conv)) TSRMLS_CC ZEND_FILE_LINE_CC);
}
+/* }}} */
-ZEND_API int _convert_to_unicode_with_converter(zval *op, UConverter *conv TSRMLS_DC ZEND_FILE_LINE_DC)
+ZEND_API int _convert_to_unicode_with_converter(zval *op, UConverter *conv TSRMLS_DC ZEND_FILE_LINE_DC) /* {{{ */
{
switch (Z_TYPE_P(op)) {
case IS_NULL:
Z_TYPE_P(op) = IS_UNICODE;
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int _convert_to_string(zval *op ZEND_FILE_LINE_DC)
+ZEND_API int _convert_to_string(zval *op ZEND_FILE_LINE_DC) /* {{{ */
{
TSRMLS_FETCH();
return _convert_to_string_with_converter(op, ZEND_U_CONVERTER(UG(runtime_encoding_conv)) TSRMLS_CC ZEND_FILE_LINE_CC);
}
+/* }}} */
-ZEND_API int _convert_to_string_with_converter(zval *op, UConverter *conv TSRMLS_DC ZEND_FILE_LINE_DC)
+ZEND_API int _convert_to_string_with_converter(zval *op, UConverter *conv TSRMLS_DC ZEND_FILE_LINE_DC) /* {{{ */
{
long lval;
double dval;
Z_TYPE_P(op) = IS_STRING;
return SUCCESS;
}
+/* }}} */
-
-static int convert_scalar_to_array(zval *op, int type TSRMLS_DC)
+static int convert_scalar_to_array(zval *op, int type TSRMLS_DC) /* {{{ */
{
zval *entry;
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int convert_to_array(zval *op)
+ZEND_API int convert_to_array(zval *op) /* {{{ */
{
TSRMLS_FETCH();
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int convert_to_object(zval *op)
+ZEND_API int convert_to_object(zval *op) /* {{{ */
{
TSRMLS_FETCH();
switch (Z_TYPE_P(op)) {
return SUCCESS;
}
+/* }}} */
-ZEND_API void multi_convert_to_long_ex(int argc, ...)
+ZEND_API void multi_convert_to_long_ex(int argc, ...) /* {{{ */
{
zval **arg;
va_list ap;
va_end(ap);
}
+/* }}} */
-ZEND_API void multi_convert_to_double_ex(int argc, ...)
+ZEND_API void multi_convert_to_double_ex(int argc, ...) /* {{{ */
{
zval **arg;
va_list ap;
va_end(ap);
}
+/* }}} */
-ZEND_API void multi_convert_to_string_ex(int argc, ...)
+ZEND_API void multi_convert_to_string_ex(int argc, ...) /* {{{ */
{
zval **arg;
va_list ap;
va_end(ap);
}
+/* }}} */
-ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
zend_error(E_ERROR, "Unsupported operand types");
return FAILURE; /* unknown datatype */
}
+/* }}} */
-
-ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
zend_error(E_ERROR, "Unsupported operand types");
return FAILURE; /* unknown datatype */
}
+/* }}} */
-
-ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
zend_error(E_ERROR, "Unsupported operand types");
return FAILURE; /* unknown datatype */
}
+/* }}} */
-ZEND_API int div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
zend_error(E_ERROR, "Unsupported operand types");
return FAILURE; /* unknown datatype */
}
+/* }}} */
-
-ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
Z_LVAL_P(result) = Z_LVAL_P(op1) % Z_LVAL_P(op2);
return SUCCESS;
}
+/* }}} */
-
-
-ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
Z_LVAL_P(result) = Z_LVAL_P(op1) ^ Z_LVAL_P(op2);
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int boolean_not_function(zval *result, zval *op1 TSRMLS_DC)
+ZEND_API int boolean_not_function(zval *result, zval *op1 TSRMLS_DC) /* {{{ */
{
zval op1_copy;
Z_LVAL_P(result) = !Z_LVAL_P(op1);
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int bitwise_not_function(zval *result, zval *op1 TSRMLS_DC)
+ZEND_API int bitwise_not_function(zval *result, zval *op1 TSRMLS_DC) /* {{{ */
{
zval op1_copy = *op1;
zend_error(E_ERROR, "Unsupported operand types");
return FAILURE; /* unknown datatype */
}
+/* }}} */
-
-ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
Z_LVAL_P(result) = Z_LVAL_P(op1) | Z_LVAL_P(op2);
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
Z_LVAL_P(result) = Z_LVAL_P(op1) & Z_LVAL_P(op2);
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
Z_LVAL_P(result) = Z_LVAL_P(op1) ^ Z_LVAL_P(op2);
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
Z_TYPE_P(result) = IS_LONG;
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
Z_TYPE_P(result) = IS_LONG;
return SUCCESS;
}
-
+/* }}} */
/* must support result==op1 */
-ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2)
+ZEND_API int add_char_to_string(zval *result, zval *op1, zval *op2) /* {{{ */
{
if (Z_TYPE_P(op1) == IS_UNICODE) {
UChar32 codepoint = (UChar32) Z_LVAL_P(op2);
}
return SUCCESS;
}
-
+/* }}} */
/* must support result==op1 */
-ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2)
+ZEND_API int add_string_to_string(zval *result, zval *op1, zval *op2) /* {{{ */
{
assert(Z_TYPE_P(op1) == Z_TYPE_P(op2));
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
int use_copy1 = 0, use_copy2 = 0;
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
int use_copy1, use_copy2;
}
return SUCCESS;
}
+/* }}} */
-ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
int use_copy1, use_copy2;
return SUCCESS;
}
+/* }}} */
-ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
return SUCCESS;
}
+/* }}} */
-
-static inline void zend_free_obj_get_result(zval *op)
+static inline void zend_free_obj_get_result(zval *op) /* {{{ */
{
if (op) {
if (op->refcount == 0) {
}
}
}
+/* }}} */
#define COMPARE_RETURN_AND_FREE(retval) \
zend_free_obj_get_result(op1_free); \
zend_free_obj_get_result(op2_free); \
return retval;
-ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
zval *op1_free, *op2_free;
ZVAL_BOOL(result, 0);
COMPARE_RETURN_AND_FREE(FAILURE);
}
+/* }}} */
-
-static int hash_zval_identical_function(const zval **z1, const zval **z2)
+static int hash_zval_identical_function(const zval **z1, const zval **z2) /* {{{ */
{
zval result;
TSRMLS_FETCH();
}
return !Z_LVAL(result);
}
+/* }}} */
-
-ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
Z_TYPE_P(result) = IS_BOOL;
if (Z_TYPE_P(op1) != Z_TYPE_P(op2)) {
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
Z_TYPE_P(result) = IS_BOOL;
if (is_identical_function(result, op1, op2 TSRMLS_CC) == FAILURE) {
Z_LVAL_P(result) = !Z_LVAL_P(result);
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int is_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
if (compare_function(result, op1, op2 TSRMLS_CC) == FAILURE) {
return FAILURE;
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
if (compare_function(result, op1, op2 TSRMLS_CC) == FAILURE) {
return FAILURE;
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
if (compare_function(result, op1, op2 TSRMLS_CC) == FAILURE) {
return FAILURE;
zend_error(E_ERROR, "Unsupported operand types");
return FAILURE;
}
+/* }}} */
-
-ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
if (compare_function(result, op1, op2 TSRMLS_CC) == FAILURE) {
return FAILURE;
zend_error(E_ERROR, "Unsupported operand types");
return FAILURE;
}
+/* }}} */
-
-ZEND_API zend_bool instanceof_function_ex(zend_class_entry *instance_ce, zend_class_entry *ce, zend_bool interfaces_only TSRMLS_DC)
+ZEND_API zend_bool instanceof_function_ex(zend_class_entry *instance_ce, zend_class_entry *ce, zend_bool interfaces_only TSRMLS_DC) /* {{{ */
{
zend_uint i;
return 0;
}
+/* }}} */
-ZEND_API zend_bool instanceof_function(zend_class_entry *instance_ce, zend_class_entry *ce TSRMLS_DC)
+ZEND_API zend_bool instanceof_function(zend_class_entry *instance_ce, zend_class_entry *ce TSRMLS_DC) /* {{{ */
{
return instanceof_function_ex(instance_ce, ce, 0 TSRMLS_CC);
}
+/* }}} */
#define LOWER_CASE 1
#define UPPER_CASE 2
#define NUMERIC 3
-
-static void increment_string(zval *str)
+static void increment_string(zval *str) /* {{{ */
{
int carry=0;
int pos=Z_STRLEN_P(str)-1;
Z_STRVAL_P(str) = t;
}
}
+/* }}} */
-static void increment_unicode(zval *str)
+static void increment_unicode(zval *str) /* {{{ */
{
int carry=0;
int pos=Z_USTRLEN_P(str)-1;
Z_USTRVAL_P(str) = t;
}
}
+/* }}} */
-ZEND_API int increment_function(zval *op1)
+ZEND_API int increment_function(zval *op1) /* {{{ */
{
switch (Z_TYPE_P(op1)) {
case IS_LONG:
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int decrement_function(zval *op1)
+ZEND_API int decrement_function(zval *op1) /* {{{ */
{
long lval;
double dval;
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int zval_is_true(zval *op)
+ZEND_API int zval_is_true(zval *op) /* {{{ */
{
convert_to_boolean(op);
return (Z_LVAL_P(op) ? 1 : 0);
}
+/* }}} */
#ifdef ZEND_USE_TOLOWER_L
-ZEND_API void zend_update_current_locale()
+ZEND_API void zend_update_current_locale() /* {{{ */
{
current_locale = _get_current_locale();
}
+/* }}} */
#endif
-ZEND_API char *zend_str_tolower_copy(char *dest, const char *source, unsigned int length)
+ZEND_API char *zend_str_tolower_copy(char *dest, const char *source, unsigned int length) /* {{{ */
{
register unsigned char *str = (unsigned char*)source;
register unsigned char *result = (unsigned char*)dest;
return dest;
}
+/* }}} */
-ZEND_API char *zend_str_tolower_dup(const char *source, unsigned int length)
+ZEND_API char *zend_str_tolower_dup(const char *source, unsigned int length) /* {{{ */
{
return zend_str_tolower_copy((char *)emalloc(length+1), source, length);
}
+/* }}} */
-ZEND_API zstr zend_u_str_tolower_copy(zend_uchar type, zstr dest, zstr source, unsigned int length)
+ZEND_API zstr zend_u_str_tolower_copy(zend_uchar type, zstr dest, zstr source, unsigned int length) /* {{{ */
{
if (type == IS_UNICODE) {
register UChar *str = source.u;
return ret;
}
}
+/* }}} */
-ZEND_API zstr zend_u_str_tolower_dup(zend_uchar type, zstr source, unsigned int length)
+ZEND_API zstr zend_u_str_tolower_dup(zend_uchar type, zstr source, unsigned int length) /* {{{ */
{
zstr ret;
}
return ret;
}
+/* }}} */
-ZEND_API void zend_str_tolower(char *str, unsigned int length)
+ZEND_API void zend_str_tolower(char *str, unsigned int length) /* {{{ */
{
register unsigned char *p = (unsigned char*)str;
register unsigned char *end = p + length;
p++;
}
}
+/* }}} */
-ZEND_API void zend_u_str_tolower(zend_uchar type, zstr str, unsigned int length) {
+ZEND_API void zend_u_str_tolower(zend_uchar type, zstr str, unsigned int length) /* {{{ */
+{
if (type == IS_UNICODE) {
register UChar *p = str.u;
register UChar *end = p + length;
zend_str_tolower(str.s, length);
}
}
+/* }}} */
-ZEND_API zstr zend_u_str_case_fold(zend_uchar type, zstr source, unsigned int length, zend_bool normalize, unsigned int *new_len)
+ZEND_API zstr zend_u_str_case_fold(zend_uchar type, zstr source, unsigned int length, zend_bool normalize, unsigned int *new_len) /* {{{ */
{
zstr ret;
}
return ret;
}
+/* }}} */
-ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2)
+ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2) /* {{{ */
{
int retval;
return retval;
}
}
+/* }}} */
-
-ZEND_API int zend_u_binary_strcmp(UChar *s1, int len1, UChar *s2, int len2)
+ZEND_API int zend_u_binary_strcmp(UChar *s1, int len1, UChar *s2, int len2) /* {{{ */
{
int result = u_strCompare(s1, len1, s2, len2, 1);
return ZEND_NORMALIZE_BOOL(result);
}
+/* }}} */
-
-ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint length)
+ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint length) /* {{{ */
{
int retval;
return retval;
}
}
+/* }}} */
-
-ZEND_API int zend_u_binary_strncmp(UChar *s1, int len1, UChar *s2, int len2, uint length)
+ZEND_API int zend_u_binary_strncmp(UChar *s1, int len1, UChar *s2, int len2, uint length) /* {{{ */
{
int32_t off1 = 0, off2 = 0;
UChar32 c1, c2;
return 0;
}
+/* }}} */
-
-ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2)
+ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2) /* {{{ */
{
int len;
int c1, c2;
return len1 - len2;
}
+/* }}} */
-
-ZEND_API int zend_u_binary_strcasecmp(UChar *s1, int len1, UChar *s2, int len2)
+ZEND_API int zend_u_binary_strcasecmp(UChar *s1, int len1, UChar *s2, int len2) /* {{{ */
{
UErrorCode status = U_ZERO_ERROR;
int result = u_strCaseCompare(s1, len1, s2, len2, U_COMPARE_CODE_POINT_ORDER, &status);
return ZEND_NORMALIZE_BOOL(result);
}
+/* }}} */
-
-ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, uint length)
+ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, uint length) /* {{{ */
{
int len;
int c1, c2;
return MIN(length, len1) - MIN(length, len2);
}
-
+/* }}} */
/*
* Because we do not know UChar offsets for the passed-in limit of the number of
* codepoints to compare, we take a hit upfront by iterating over both strings
* until we find them. Then we can simply use u_strCaseCompare().
*/
-ZEND_API int zend_u_binary_strncasecmp(UChar *s1, int len1, UChar *s2, int len2, uint length)
+ZEND_API int zend_u_binary_strncasecmp(UChar *s1, int len1, UChar *s2, int len2, uint length) /* {{{ */
{
UErrorCode status = U_ZERO_ERROR;
int32_t off1 = 0, off2 = 0;
result = u_strCaseCompare(s1, off1, s2, off2, U_COMPARE_CODE_POINT_ORDER, &status);
return ZEND_NORMALIZE_BOOL(result);
}
+/* }}} */
-
-ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2)
+ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2) /* {{{ */
{
return zend_binary_strcmp(Z_STRVAL_P(s1), Z_STRLEN_P(s1), Z_STRVAL_P(s2), Z_STRLEN_P(s2));
}
+/* }}} */
-
-ZEND_API int zend_u_binary_zval_strcmp(zval *s1, zval *s2)
+ZEND_API int zend_u_binary_zval_strcmp(zval *s1, zval *s2) /* {{{ */
{
return zend_u_binary_strcmp(Z_USTRVAL_P(s1), Z_USTRLEN_P(s1), Z_USTRVAL_P(s2), Z_USTRLEN_P(s2));
}
+/* }}} */
-
-ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3)
+ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3) /* {{{ */
{
return zend_binary_strncmp(Z_STRVAL_P(s1), Z_STRLEN_P(s1), Z_STRVAL_P(s2), Z_STRLEN_P(s2), Z_LVAL_P(s3));
}
+/* }}} */
-
-ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2)
+ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2) /* {{{ */
{
return zend_binary_strcasecmp(Z_STRVAL_P(s1), Z_STRLEN_P(s1), Z_STRVAL_P(s2), Z_STRLEN_P(s2));
}
+/* }}} */
-
-ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3)
+ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3) /* {{{ */
{
return zend_binary_strncasecmp(Z_STRVAL_P(s1), Z_STRLEN_P(s1), Z_STRVAL_P(s2), Z_STRLEN_P(s2), Z_LVAL_P(s3));
}
+/* }}} */
-
-ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
+ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2) /* {{{ */
{
int ret1, ret2;
long lval1, lval2;
}
return;
}
+/* }}} */
-
-ZEND_API void zendi_u_smart_strcmp(zval *result, zval *s1, zval *s2)
+ZEND_API void zendi_u_smart_strcmp(zval *result, zval *s1, zval *s2) /* {{{ */
{
int ret1, ret2;
long lval1, lval2;
}
return;
}
+/* }}} */
-
-static int hash_zval_compare_function(const zval **z1, const zval **z2 TSRMLS_DC)
+static int hash_zval_compare_function(const zval **z1, const zval **z2 TSRMLS_DC) /* {{{ */
{
zval result;
}
return Z_LVAL(result);
}
+/* }}} */
-ZEND_API int zend_compare_symbol_tables_i(HashTable *ht1, HashTable *ht2 TSRMLS_DC)
+ZEND_API int zend_compare_symbol_tables_i(HashTable *ht1, HashTable *ht2 TSRMLS_DC) /* {{{ */
{
return zend_hash_compare(ht1, ht2, (compare_func_t) hash_zval_compare_function, 0 TSRMLS_CC);
}
+/* }}} */
-
-
-ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2 TSRMLS_DC)
+ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2 TSRMLS_DC) /* {{{ */
{
Z_TYPE_P(result) = IS_LONG;
Z_LVAL_P(result) = zend_hash_compare(ht1, ht2, (compare_func_t) hash_zval_compare_function, 0 TSRMLS_CC);
}
+/* }}} */
-
-ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2 TSRMLS_DC)
+ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2 TSRMLS_DC) /* {{{ */
{
zend_compare_symbol_tables(result, Z_ARRVAL_P(a1), Z_ARRVAL_P(a2) TSRMLS_CC);
}
+/* }}} */
-
-ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2 TSRMLS_DC)
+ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2 TSRMLS_DC) /* {{{ */
{
Z_TYPE_P(result) = IS_LONG;
Z_LVAL_P(result) = Z_OBJ_HT_P(o1)->compare_objects(o1, o2 TSRMLS_CC);
}
}
+/* }}} */
-ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC)
+ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC) /* {{{ */
{
TSRMLS_FETCH();
op->value.str.len = zend_spprintf(&op->value.str.val, 0, "%.*G", (int) EG(precision), (double)op->value.dval);
}
+/* }}} */
/*
* Local variables:
# include <stdarg.h>
#endif
-ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack)
+ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack) /* {{{ */
{
stack->top_element = stack->elements = (void **) emalloc(sizeof(void *)*PTR_STACK_BLOCK_SIZE);
stack->max = PTR_STACK_BLOCK_SIZE;
stack->top = 0;
}
+/* }}} */
-
-ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...)
+ZEND_API void zend_ptr_stack_n_push(zend_ptr_stack *stack, int count, ...) /* {{{ */
{
va_list ptr;
void *elem;
}
va_end(ptr);
}
+/* }}} */
-
-ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...)
+ZEND_API void zend_ptr_stack_n_pop(zend_ptr_stack *stack, int count, ...) /* {{{ */
{
va_list ptr;
void **elem;
}
va_end(ptr);
}
+/* }}} */
-
-
-ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack)
+ZEND_API void zend_ptr_stack_destroy(zend_ptr_stack *stack) /* {{{ */
{
if (stack->elements) {
efree(stack->elements);
}
}
+/* }}} */
-
-ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *))
+ZEND_API void zend_ptr_stack_apply(zend_ptr_stack *stack, void (*func)(void *)) /* {{{ */
{
int i = stack->top;
func(stack->elements[i]);
}
}
+/* }}} */
-
-ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements)
+ZEND_API void zend_ptr_stack_clean(zend_ptr_stack *stack, void (*func)(void *), zend_bool free_elements) /* {{{ */
{
zend_ptr_stack_apply(stack, func);
if (free_elements) {
stack->top = 0;
stack->top_element = stack->elements;
}
+/* }}} */
-
-ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack)
+ZEND_API int zend_ptr_stack_num_elements(zend_ptr_stack *stack) /* {{{ */
{
return stack->top;
}
+/* }}} */
/*
* Local variables:
/* $Id$ */
#include "zend.h"
-
#include <limits.h>
#define QSORT_STACK_SIZE (sizeof(size_t) * CHAR_BIT)
-static void _zend_qsort_swap(void *a, void *b, size_t siz)
+static void _zend_qsort_swap(void *a, void *b, size_t siz) /* {{{ */
{
register char *tmp_a_char;
register char *tmp_b_char;
*tmp_b_char++ = t_c;
}
}
+/* }}} */
-ZEND_API void zend_qsort(void *base, size_t nmemb, size_t siz, compare_func_t compare TSRMLS_DC)
+ZEND_API void zend_qsort(void *base, size_t nmemb, size_t siz, compare_func_t compare TSRMLS_DC) /* {{{ */
{
void *begin_stack[QSORT_STACK_SIZE];
void *end_stack[QSORT_STACK_SIZE];
}
}
}
+/* }}} */
/*
* Local Variables:
/* $Id$ */
#include <stdio.h>
-
#include "zend.h"
#ifdef HAVE_STDARG_H
#endif
#if ZEND_BROKEN_SPRINTF
-int zend_sprintf(char *buffer, const char *format, ...)
+int zend_sprintf(char *buffer, const char *format, ...) /* {{{ */
{
va_list args;
return strlen(buffer);
}
+/* }}} */
#endif
/*
#include "zend.h"
#include "zend_stack.h"
-ZEND_API int zend_stack_init(zend_stack *stack)
+ZEND_API int zend_stack_init(zend_stack *stack) /* {{{ */
{
stack->top = 0;
stack->elements = (void **) emalloc(sizeof(void **) * STACK_BLOCK_SIZE);
return SUCCESS;
}
}
+/* }}} */
-ZEND_API int zend_stack_push(zend_stack *stack, void *element, int size)
+ZEND_API int zend_stack_push(zend_stack *stack, void *element, int size) /* {{{ */
{
if (stack->top >= stack->max) { /* we need to allocate more memory */
stack->elements = (void **) erealloc(stack->elements,
memcpy(stack->elements[stack->top], element, size);
return stack->top++;
}
+/* }}} */
-
-ZEND_API int zend_stack_top(zend_stack *stack, void **element)
+ZEND_API int zend_stack_top(zend_stack *stack, void **element) /* {{{ */
{
if (stack->top > 0) {
*element = stack->elements[stack->top - 1];
return FAILURE;
}
}
+/* }}} */
-
-ZEND_API int zend_stack_del_top(zend_stack *stack)
+ZEND_API int zend_stack_del_top(zend_stack *stack) /* {{{ */
{
if (stack->top > 0) {
efree(stack->elements[--stack->top]);
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API int zend_stack_int_top(zend_stack *stack)
+ZEND_API int zend_stack_int_top(zend_stack *stack) /* {{{ */
{
int *e;
return *e;
}
}
+/* }}} */
-
-ZEND_API int zend_stack_is_empty(zend_stack *stack)
+ZEND_API int zend_stack_is_empty(zend_stack *stack) /* {{{ */
{
if (stack->top == 0) {
return 1;
return 0;
}
}
+/* }}} */
-
-ZEND_API int zend_stack_destroy(zend_stack *stack)
+ZEND_API int zend_stack_destroy(zend_stack *stack) /* {{{ */
{
register int i;
}
return SUCCESS;
}
+/* }}} */
-
-ZEND_API void **zend_stack_base(zend_stack *stack)
+ZEND_API void **zend_stack_base(zend_stack *stack) /* {{{ */
{
return stack->elements;
}
+/* }}} */
-
-ZEND_API int zend_stack_count(zend_stack *stack)
+ZEND_API int zend_stack_count(zend_stack *stack) /* {{{ */
{
return stack->top;
}
+/* }}} */
-
-ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element))
+ZEND_API void zend_stack_apply(zend_stack *stack, int type, int (*apply_function)(void *element)) /* {{{ */
{
int i;
break;
}
}
+/* }}} */
-
-ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg)
+ZEND_API void zend_stack_apply_with_argument(zend_stack *stack, int type, int (*apply_function)(void *element, void *arg), void *arg) /* {{{ */
{
int i;
break;
}
}
+/* }}} */
/*
* Local variables:
/* Not checking emalloc() and erealloc() return values as they are supposed to bailout */
-inline static void block_init(Block *block, zend_uint block_size)
+inline static void block_init(Block *block, zend_uint block_size) /* {{{ */
{
block->pos = block->bp = (char *) emalloc(block_size);
block->end = block->bp + block_size;
}
+/* }}} */
-inline static char *block_allocate(Block *block, zend_uint size)
+inline static char *block_allocate(Block *block, zend_uint size) /* {{{ */
{
char *retval = block->pos;
if ((block->pos += size) >= block->end) {
}
return retval;
}
+/* }}} */
-inline static void block_destroy(Block *block)
+inline static void block_destroy(Block *block) /* {{{ */
{
efree(block->bp);
}
+/* }}} */
-void static_allocator_init(StaticAllocator *sa)
+void static_allocator_init(StaticAllocator *sa) /* {{{ */
{
sa->Blocks = (Block *) emalloc(sizeof(Block));
block_init(sa->Blocks, ALLOCATOR_BLOCK_SIZE);
sa->num_blocks = 1;
sa->current_block = 0;
}
+/* }}} */
-char *static_allocator_allocate(StaticAllocator *sa, zend_uint size)
+char *static_allocator_allocate(StaticAllocator *sa, zend_uint size) /* {{{ */
{
char *retval;
retval = block_allocate(&sa->Blocks[sa->current_block], size);
return retval;
}
+/* }}} */
-void static_allocator_destroy(StaticAllocator *sa)
+void static_allocator_destroy(StaticAllocator *sa) /* {{{ */
{
zend_uint i;
}
efree(sa->Blocks);
}
+/* }}} */
/*
* Local variables:
ZEND_DLIMPORT int isatty(int fd);
-static size_t zend_stream_stdio_reader(void *handle, char *buf, size_t len TSRMLS_DC)
+static size_t zend_stream_stdio_reader(void *handle, char *buf, size_t len TSRMLS_DC) /* {{{ */
{
return fread(buf, 1, len, (FILE*)handle);
}
+/* }}} */
-static void zend_stream_stdio_closer(void *handle TSRMLS_DC)
+static void zend_stream_stdio_closer(void *handle TSRMLS_DC) /* {{{ */
{
if ((FILE*)handle != stdin)
fclose((FILE*)handle);
}
+/* }}} */
-static long zend_stream_stdio_fteller(void *handle TSRMLS_DC)
+static long zend_stream_stdio_fteller(void *handle TSRMLS_DC) /* {{{ */
{
return ftell((FILE*) handle);
}
+/* }}} */
-
-ZEND_API int zend_stream_open(const char *filename, zend_file_handle *handle TSRMLS_DC)
+ZEND_API int zend_stream_open(const char *filename, zend_file_handle *handle TSRMLS_DC) /* {{{ */
{
if (zend_stream_open_function) {
return zend_stream_open_function(filename, handle TSRMLS_CC);
return (handle->handle.fp) ? SUCCESS : FAILURE;
}
+/* }}} */
-ZEND_API int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC)
+ZEND_API int zend_stream_fixup(zend_file_handle *file_handle TSRMLS_DC) /* {{{ */
{
switch (file_handle->type) {
case ZEND_HANDLE_FILENAME:
}
return SUCCESS;
}
+/* }}} */
-ZEND_API size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC)
+ZEND_API size_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC) /* {{{ */
{
if (file_handle->handle.stream.interactive) {
int c = '*';
}
return file_handle->handle.stream.reader(file_handle->handle.stream.handle, buf, len TSRMLS_CC);
}
+/* }}} */
-ZEND_API int zend_stream_getc(zend_file_handle *file_handle TSRMLS_DC)
+ZEND_API int zend_stream_getc(zend_file_handle *file_handle TSRMLS_DC) /* {{{ */
{
char buf;
}
return EOF;
}
+/* }}} */
-ZEND_API int zend_stream_ferror(zend_file_handle *file_handle TSRMLS_DC)
+ZEND_API int zend_stream_ferror(zend_file_handle *file_handle TSRMLS_DC) /* {{{ */
{
return 0;
}
+/* }}} */
-ZEND_API long zend_stream_ftell(zend_file_handle *file_handle TSRMLS_DC)
+ZEND_API long zend_stream_ftell(zend_file_handle *file_handle TSRMLS_DC) /* {{{ */
{
return file_handle->handle.stream.fteller(file_handle->handle.stream.handle TSRMLS_CC);
}
+/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
return 1;
}
/* }}} */
+
ZEND_API int zend_shutdown_strtod(void) /* {{{ */
{
destroy_freelist();
#include "zend_ts_hash.h"
/* ts management functions */
-static void begin_read(TsHashTable *ht)
+static void begin_read(TsHashTable *ht) /* {{{ */
{
#ifdef ZTS
tsrm_mutex_lock(ht->mx_reader);
tsrm_mutex_unlock(ht->mx_reader);
#endif
}
+/* }}} */
-static void end_read(TsHashTable *ht)
+static void end_read(TsHashTable *ht) /* {{{ */
{
#ifdef ZTS
tsrm_mutex_lock(ht->mx_reader);
tsrm_mutex_unlock(ht->mx_reader);
#endif
}
+/* }}} */
-static void begin_write(TsHashTable *ht)
+static void begin_write(TsHashTable *ht) /* {{{ */
{
#ifdef ZTS
tsrm_mutex_lock(ht->mx_writer);
#endif
}
+/* }}} */
-static void end_write(TsHashTable *ht)
+static void end_write(TsHashTable *ht) /* {{{ */
{
#ifdef ZTS
tsrm_mutex_unlock(ht->mx_writer);
#endif
}
+/* }}} */
/* delegates */
-ZEND_API int _zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
+ZEND_API int _zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC) /* {{{ */
{
#ifdef ZTS
ht->mx_reader = tsrm_mutex_alloc();
#endif
return _zend_hash_init(TS_HASH(ht), nSize, pHashFunction, pDestructor, persistent ZEND_FILE_LINE_RELAY_CC);
}
+/* }}} */
-ZEND_API int _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
+ZEND_API int _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC) /* {{{ */
{
#ifdef ZTS
ht->mx_reader = tsrm_mutex_alloc();
#endif
return _zend_hash_init_ex(TS_HASH(ht), nSize, pHashFunction, pDestructor, persistent, bApplyProtection ZEND_FILE_LINE_RELAY_CC);
}
+/* }}} */
-ZEND_API void zend_ts_hash_destroy(TsHashTable *ht)
+ZEND_API void zend_ts_hash_destroy(TsHashTable *ht) /* {{{ */
{
begin_write(ht);
zend_hash_destroy(TS_HASH(ht));
tsrm_mutex_free(ht->mx_writer);
#endif
}
+/* }}} */
-ZEND_API void zend_ts_hash_clean(TsHashTable *ht)
+ZEND_API void zend_ts_hash_clean(TsHashTable *ht) /* {{{ */
{
ht->reader = 0;
begin_write(ht);
zend_hash_clean(TS_HASH(ht));
end_write(ht);
}
+/* }}} */
-ZEND_API int _zend_ts_hash_add_or_update(TsHashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
+ZEND_API int _zend_ts_hash_add_or_update(TsHashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API int _zend_ts_hash_quick_add_or_update(TsHashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
+ZEND_API int _zend_ts_hash_quick_add_or_update(TsHashTable *ht, char *arKey, uint nKeyLength, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API int _zend_ts_hash_index_update_or_next_insert(TsHashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC)
+ZEND_API int _zend_ts_hash_index_update_or_next_insert(TsHashTable *ht, ulong h, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API int zend_ts_hash_add_empty_element(TsHashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_ts_hash_add_empty_element(TsHashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht)
+ZEND_API void zend_ts_hash_graceful_destroy(TsHashTable *ht) /* {{{ */
{
begin_write(ht);
zend_hash_graceful_destroy(TS_HASH(ht));
tsrm_mutex_free(ht->mx_reader);
#endif
}
+/* }}} */
-ZEND_API void zend_ts_hash_apply(TsHashTable *ht, apply_func_t apply_func TSRMLS_DC)
+ZEND_API void zend_ts_hash_apply(TsHashTable *ht, apply_func_t apply_func TSRMLS_DC) /* {{{ */
{
begin_write(ht);
zend_hash_apply(TS_HASH(ht), apply_func TSRMLS_CC);
end_write(ht);
}
+/* }}} */
-ZEND_API void zend_ts_hash_apply_with_argument(TsHashTable *ht, apply_func_arg_t apply_func, void *argument TSRMLS_DC)
+ZEND_API void zend_ts_hash_apply_with_argument(TsHashTable *ht, apply_func_arg_t apply_func, void *argument TSRMLS_DC) /* {{{ */
{
begin_write(ht);
zend_hash_apply_with_argument(TS_HASH(ht), apply_func, argument TSRMLS_CC);
end_write(ht);
}
+/* }}} */
-ZEND_API void zend_ts_hash_apply_with_arguments(TsHashTable *ht, apply_func_args_t apply_func, int num_args, ...)
+ZEND_API void zend_ts_hash_apply_with_arguments(TsHashTable *ht, apply_func_args_t apply_func, int num_args, ...) /* {{{ */
{
va_list args;
end_write(ht);
va_end(args);
}
+/* }}} */
-ZEND_API void zend_ts_hash_reverse_apply(TsHashTable *ht, apply_func_t apply_func TSRMLS_DC)
+ZEND_API void zend_ts_hash_reverse_apply(TsHashTable *ht, apply_func_t apply_func TSRMLS_DC) /* {{{ */
{
begin_write(ht);
zend_hash_reverse_apply(TS_HASH(ht), apply_func TSRMLS_CC);
end_write(ht);
}
+/* }}} */
-ZEND_API int zend_ts_hash_del_key_or_index(TsHashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag)
+ZEND_API int zend_ts_hash_del_key_or_index(TsHashTable *ht, char *arKey, uint nKeyLength, ulong h, int flag) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API ulong zend_ts_get_hash_value(TsHashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API ulong zend_ts_get_hash_value(TsHashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
ulong retval;
return retval;
}
+/* }}} */
-ZEND_API int zend_ts_hash_find(TsHashTable *ht, char *arKey, uint nKeyLength, void **pData)
+ZEND_API int zend_ts_hash_find(TsHashTable *ht, char *arKey, uint nKeyLength, void **pData) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API int zend_ts_hash_quick_find(TsHashTable *ht, char *arKey, uint nKeyLength, ulong h, void **pData)
+ZEND_API int zend_ts_hash_quick_find(TsHashTable *ht, char *arKey, uint nKeyLength, ulong h, void **pData) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API int zend_ts_hash_index_find(TsHashTable *ht, ulong h, void **pData)
+ZEND_API int zend_ts_hash_index_find(TsHashTable *ht, ulong h, void **pData) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API int zend_ts_hash_exists(TsHashTable *ht, char *arKey, uint nKeyLength)
+ZEND_API int zend_ts_hash_exists(TsHashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API int zend_ts_hash_index_exists(TsHashTable *ht, ulong h)
+ZEND_API int zend_ts_hash_index_exists(TsHashTable *ht, ulong h) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size)
+ZEND_API void zend_ts_hash_copy(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size) /* {{{ */
{
begin_read(source);
begin_write(target);
end_write(target);
end_read(source);
}
+/* }}} */
-ZEND_API void zend_ts_hash_merge(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite)
+ZEND_API void zend_ts_hash_merge(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, void *tmp, uint size, int overwrite) /* {{{ */
{
begin_read(source);
begin_write(target);
end_write(target);
end_read(source);
}
+/* }}} */
-ZEND_API void zend_ts_hash_merge_ex(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, uint size, merge_checker_func_t pMergeSource, void *pParam)
+ZEND_API void zend_ts_hash_merge_ex(TsHashTable *target, TsHashTable *source, copy_ctor_func_t pCopyConstructor, uint size, merge_checker_func_t pMergeSource, void *pParam) /* {{{ */
{
begin_read(source);
begin_write(target);
end_write(target);
end_read(source);
}
+/* }}} */
-ZEND_API int zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber TSRMLS_DC)
+ZEND_API int zend_ts_hash_sort(TsHashTable *ht, sort_func_t sort_func, compare_func_t compare_func, int renumber TSRMLS_DC) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC)
+ZEND_API int zend_ts_hash_compare(TsHashTable *ht1, TsHashTable *ht2, compare_func_t compar, zend_bool ordered TSRMLS_DC) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API int zend_ts_hash_minmax(TsHashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC)
+ZEND_API int zend_ts_hash_minmax(TsHashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API int zend_ts_hash_num_elements(TsHashTable *ht)
+ZEND_API int zend_ts_hash_num_elements(TsHashTable *ht) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
-ZEND_API int zend_ts_hash_rehash(TsHashTable *ht)
+ZEND_API int zend_ts_hash_rehash(TsHashTable *ht) /* {{{ */
{
int retval;
return retval;
}
+/* }}} */
#if ZEND_DEBUG
-void zend_ts_hash_display_pListTail(TsHashTable *ht)
+void zend_ts_hash_display_pListTail(TsHashTable *ht) /* {{{ */
{
begin_read(ht);
zend_hash_display_pListTail(TS_HASH(ht));
end_read(ht);
}
+/* }}} */
-void zend_ts_hash_display(TsHashTable *ht)
+void zend_ts_hash_display(TsHashTable *ht) /* {{{ */
{
begin_read(ht);
zend_hash_display(TS_HASH(ht));
end_read(ht);
}
+/* }}} */
#endif
/*
}
/* }}} */
-zend_collator* zend_collator_create(UCollator *coll)
+zend_collator* zend_collator_create(UCollator *coll) /* {{{ */
{
zend_collator *zcoll = NULL;
return zcoll;
}
+/* }}} */
-void zend_collator_destroy(zend_collator *zcoll)
+void zend_collator_destroy(zend_collator *zcoll) /* {{{ */
{
zcoll->refcount--;
if (zcoll->refcount == 0) {
efree(zcoll);
}
}
-
+/* }}} */
/*
* Local variables:
#include "zend_constants.h"
#include "zend_list.h"
-
-ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC)
+ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC) /* {{{ */
{
switch (Z_TYPE_P(zvalue) & ~IS_CONSTANT_INDEX) {
case IS_CONSTANT: {
break;
}
}
+/* }}} */
-
-ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC)
+ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC) /* {{{ */
{
switch (Z_TYPE_P(zvalue) & ~IS_CONSTANT_INDEX) {
case IS_CONSTANT: {
break;
}
}
+/* }}} */
-
-ZEND_API void zval_add_ref(zval **p)
+ZEND_API void zval_add_ref(zval **p) /* {{{ */
{
(*p)->refcount++;
}
+/* }}} */
-
-ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
+ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC) /* {{{ */
{
switch (Z_TYPE_P(zvalue)) {
case IS_RESOURCE: {
break;
}
}
+/* }}} */
-ZEND_API int zend_print_variable(zval *var)
+ZEND_API int zend_print_variable(zval *var) /* {{{ */
{
return zend_print_zval(var, 0);
}
-
+/* }}} */
#if ZEND_DEBUG
-ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue)
+ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue) /* {{{ */
{
zval_copy_ctor(zvalue);
}
+/* }}} */
-
-ZEND_API void _zval_dtor_wrapper(zval *zvalue)
+ZEND_API void _zval_dtor_wrapper(zval *zvalue) /* {{{ */
{
zval_dtor(zvalue);
}
+/* }}} */
-
-ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue)
+ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue) /* {{{ */
{
zval_internal_dtor(zvalue);
}
+/* }}} */
-
-ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr)
+ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr) /* {{{ */
{
zval_ptr_dtor(zval_ptr);
}
+/* }}} */
-
-ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zval_ptr)
+ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zval_ptr) /* {{{ */
{
zval_internal_ptr_dtor(zval_ptr);
}
+/* }}} */
#endif
/*