Skip to content

Instantly share code, notes, and snippets.

@morrisonlevi
Created December 27, 2014 00:01
Show Gist options
  • Save morrisonlevi/04e9e20f5addadd656c3 to your computer and use it in GitHub Desktop.
Save morrisonlevi/04e9e20f5addadd656c3 to your computer and use it in GitHub Desktop.
Some conversions from int to zend_status.
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 7e7cd06..838f400 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -43,7 +43,7 @@ static zend_module_entry **module_post_deactivate_handlers;
static zend_class_entry **class_cleanup_handlers;
/* this function doesn't check for too many parameters */
-ZEND_API int zend_get_parameters(int ht, int param_count, ...) /* {{{ */
+ZEND_API zend_status zend_get_parameters(int ht, int param_count, ...) /* {{{ */
{
int arg_count;
va_list ptr;
@@ -78,7 +78,7 @@ ZEND_API int zend_get_parameters(int ht, int param_count, ...) /* {{{ */
/* Zend-optimized Extended functions */
/* this function doesn't check for too many parameters */
-ZEND_API int zend_get_parameters_ex(int param_count, ...) /* {{{ */
+ZEND_API zend_status zend_get_parameters_ex(int param_count, ...) /* {{{ */
{
int arg_count;
va_list ptr;
@@ -103,7 +103,7 @@ ZEND_API int zend_get_parameters_ex(int param_count, ...) /* {{{ */
}
/* }}} */
-ZEND_API int _zend_get_parameters_array_ex(int param_count, zval *argument_array) /* {{{ */
+ZEND_API zend_status _zend_get_parameters_array_ex(int param_count, zval *argument_array) /* {{{ */
{
zval *param_ptr;
int arg_count;
@@ -125,7 +125,7 @@ ZEND_API int _zend_get_parameters_array_ex(int param_count, zval *argument_array
}
/* }}} */
-ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array) /* {{{ */
+ZEND_API zend_status zend_copy_parameters_array(int param_count, zval *argument_array) /* {{{ */
{
zval *param_ptr;
int arg_count;
@@ -194,7 +194,7 @@ ZEND_API char *zend_zval_type_name(const zval *arg) /* {{{ */
}
/* }}} */
-static int parse_arg_object_to_string(zval *arg, char **p, size_t *pl, int type) /* {{{ */
+static zend_status parse_arg_object_to_string(zval *arg, char **p, size_t *pl, int type) /* {{{ */
{
if (Z_OBJ_HANDLER_P(arg, cast_object)) {
zval obj;
@@ -235,7 +235,7 @@ static int parse_arg_object_to_string(zval *arg, char **p, size_t *pl, int type)
}
/* }}} */
-ZEND_API int parse_arg_object_to_str(zval *arg, zend_string **str, int type) /* {{{ */
+ZEND_API zend_status parse_arg_object_to_str(zval *arg, zend_string **str, int type) /* {{{ */
{
if (Z_OBJ_HANDLER_P(arg, cast_object)) {
zval obj;
@@ -778,7 +778,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons
}
/* }}} */
-static int zend_parse_arg(int arg_num, zval *arg, va_list *va, const char **spec, int quiet) /* {{{ */
+static zend_status zend_parse_arg(int arg_num, zval *arg, va_list *va, const char **spec, int quiet) /* {{{ */
{
const char *expected_type = NULL;
char *error = NULL;
@@ -809,10 +809,10 @@ static int zend_parse_arg(int arg_num, zval *arg, va_list *va, const char **spec
}
/* }}} */
-ZEND_API int zend_parse_parameter(int flags, int arg_num, zval *arg, const char *spec, ...)
+ZEND_API zend_status zend_parse_parameter(int flags, int arg_num, zval *arg, const char *spec, ...)
{
va_list va;
- int ret;
+ zend_status ret;
int quiet = flags & ZEND_PARSE_PARAMS_QUIET;
va_start(va, spec);
@@ -822,7 +822,7 @@ ZEND_API int zend_parse_parameter(int flags, int arg_num, zval *arg, const char
return ret;
}
-static int zend_parse_va_args(int num_args, const char *type_spec, va_list *va, int flags) /* {{{ */
+static zend_status zend_parse_va_args(int num_args, const char *type_spec, va_list *va, int flags) /* {{{ */
{
const char *spec_walk;
int c, i;
@@ -986,7 +986,7 @@ static int zend_parse_va_args(int num_args, const char *type_spec, va_list *va,
}\
}
-ZEND_API int zend_parse_parameters_ex(int flags, int num_args, const char *type_spec, ...) /* {{{ */
+ZEND_API zend_status zend_parse_parameters_ex(int flags, int num_args, const char *type_spec, ...) /* {{{ */
{
va_list va;
int retval;
@@ -1001,7 +1001,7 @@ ZEND_API int zend_parse_parameters_ex(int flags, int num_args, const char *type_
}
/* }}} */
-ZEND_API int zend_parse_parameters(int num_args, const char *type_spec, ...) /* {{{ */
+ZEND_API zend_status zend_parse_parameters(int num_args, const char *type_spec, ...) /* {{{ */
{
va_list va;
int retval;
@@ -1016,10 +1016,10 @@ ZEND_API int zend_parse_parameters(int num_args, const char *type_spec, ...) /*
}
/* }}} */
-ZEND_API int zend_parse_method_parameters(int num_args, zval *this_ptr, const char *type_spec, ...) /* {{{ */
+ZEND_API zend_status zend_parse_method_parameters(int num_args, zval *this_ptr, const char *type_spec, ...) /* {{{ */
{
va_list va;
- int retval;
+ zend_status retval;
const char *p = type_spec;
zval **object;
zend_class_entry *ce;
@@ -1057,10 +1057,10 @@ ZEND_API int zend_parse_method_parameters(int num_args, zval *this_ptr, const ch
}
/* }}} */
-ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args, zval *this_ptr, const char *type_spec, ...) /* {{{ */
+ZEND_API zend_status zend_parse_method_parameters_ex(int flags, int num_args, zval *this_ptr, const char *type_spec, ...) /* {{{ */
{
va_list va;
- int retval;
+ zend_status retval;
const char *p = type_spec;
zval **object;
zend_class_entry *ce;
@@ -1099,7 +1099,7 @@ ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args, zval *this
/* }}} */
/* Argument parsing API -- andrei */
-ZEND_API int _array_init(zval *arg, uint size ZEND_FILE_LINE_DC) /* {{{ */
+ZEND_API zend_status _array_init(zval *arg, uint size ZEND_FILE_LINE_DC) /* {{{ */
{
ZVAL_NEW_ARR(arg);
_zend_hash_init(Z_ARRVAL_P(arg), size, ZVAL_PTR_DTOR, 0 ZEND_FILE_LINE_RELAY_CC);
@@ -1296,7 +1296,7 @@ ZEND_API void object_properties_load(zend_object *object, HashTable *properties)
* class and all props being public. If only a subset is given or the class
* has protected members then you need to merge the properties separately by
* calling zend_merge_properties(). */
-ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type, HashTable *properties ZEND_FILE_LINE_DC) /* {{{ */
+ZEND_API zend_status _object_and_properties_init(zval *arg, zend_class_entry *class_type, HashTable *properties ZEND_FILE_LINE_DC) /* {{{ */
{
if (class_type->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
char *what = (class_type->ce_flags & ZEND_ACC_INTERFACE) ? "interface"
@@ -1321,26 +1321,26 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type
}
/* }}} */
-ZEND_API int _object_init_ex(zval *arg, zend_class_entry *class_type ZEND_FILE_LINE_DC) /* {{{ */
+ZEND_API zend_status _object_init_ex(zval *arg, zend_class_entry *class_type ZEND_FILE_LINE_DC) /* {{{ */
{
return _object_and_properties_init(arg, class_type, 0 ZEND_FILE_LINE_RELAY_CC);
}
/* }}} */
-ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC) /* {{{ */
+ZEND_API zend_status _object_init(zval *arg ZEND_FILE_LINE_DC) /* {{{ */
{
return _object_init_ex(arg, zend_standard_class_def ZEND_FILE_LINE_RELAY_CC);
}
/* }}} */
-ZEND_API int add_assoc_function(zval *arg, const char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS)) /* {{{ */
+ZEND_API zend_status add_assoc_function(zval *arg, const char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS)) /* {{{ */
{
zend_error(E_WARNING, "add_assoc_function() is no longer supported");
return FAILURE;
}
/* }}} */
-ZEND_API int add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n) /* {{{ */
+ZEND_API zend_status add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n) /* {{{ */
{
zval *ret, tmp;
@@ -1350,7 +1350,7 @@ ZEND_API int add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_
}
/* }}} */
-ZEND_API int add_assoc_null_ex(zval *arg, const char *key, size_t key_len) /* {{{ */
+ZEND_API zend_status add_assoc_null_ex(zval *arg, const char *key, size_t key_len) /* {{{ */
{
zval *ret, tmp;
@@ -1360,7 +1360,7 @@ ZEND_API int add_assoc_null_ex(zval *arg, const char *key, size_t key_len) /* {{
}
/* }}} */
-ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b) /* {{{ */
+ZEND_API zend_status add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b) /* {{{ */
{
zval *ret, tmp;
@@ -1370,7 +1370,7 @@ ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b
}
/* }}} */
-ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r) /* {{{ */
+ZEND_API zend_status add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r) /* {{{ */
{
zval *ret, tmp;
@@ -1380,7 +1380,7 @@ ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, z
}
/* }}} */
-ZEND_API int add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d) /* {{{ */
+ZEND_API zend_status add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d) /* {{{ */
{
zval *ret, tmp;
@@ -1390,7 +1390,7 @@ ZEND_API int add_assoc_double_ex(zval *arg, const char *key, size_t key_len, dou
}
/* }}} */
-ZEND_API int add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str) /* {{{ */
+ZEND_API zend_status add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str) /* {{{ */
{
zval *ret, tmp;
@@ -1400,7 +1400,7 @@ ZEND_API int add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_s
}
/* }}} */
-ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, char *str) /* {{{ */
+ZEND_API zend_status add_assoc_string_ex(zval *arg, const char *key, size_t key_len, char *str) /* {{{ */
{
zval *ret, tmp;
@@ -1410,7 +1410,7 @@ ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, cha
}
/* }}} */
-ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, char *str, size_t length) /* {{{ */
+ZEND_API zend_status add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, char *str, size_t length) /* {{{ */
{
zval *ret, tmp;
@@ -1420,7 +1420,7 @@ ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, ch
}
/* }}} */
-ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */
+ZEND_API zend_status add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */
{
zval *ret;
@@ -1429,7 +1429,7 @@ ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval
}
/* }}} */
-ZEND_API int add_index_long(zval *arg, zend_ulong index, zend_long n) /* {{{ */
+ZEND_API zend_status add_index_long(zval *arg, zend_ulong index, zend_long n) /* {{{ */
{
zval tmp;
@@ -1438,7 +1438,7 @@ ZEND_API int add_index_long(zval *arg, zend_ulong index, zend_long n) /* {{{ */
}
/* }}} */
-ZEND_API int add_index_null(zval *arg, zend_ulong index) /* {{{ */
+ZEND_API zend_status add_index_null(zval *arg, zend_ulong index) /* {{{ */
{
zval tmp;
@@ -1447,7 +1447,7 @@ ZEND_API int add_index_null(zval *arg, zend_ulong index) /* {{{ */
}
/* }}} */
-ZEND_API int add_index_bool(zval *arg, zend_ulong index, int b) /* {{{ */
+ZEND_API zend_status add_index_bool(zval *arg, zend_ulong index, int b) /* {{{ */
{
zval tmp;
@@ -1456,7 +1456,7 @@ ZEND_API int add_index_bool(zval *arg, zend_ulong index, int b) /* {{{ */
}
/* }}} */
-ZEND_API int add_index_resource(zval *arg, zend_ulong index, zend_resource *r) /* {{{ */
+ZEND_API zend_status add_index_resource(zval *arg, zend_ulong index, zend_resource *r) /* {{{ */
{
zval tmp;
@@ -1465,7 +1465,7 @@ ZEND_API int add_index_resource(zval *arg, zend_ulong index, zend_resource *r) /
}
/* }}} */
-ZEND_API int add_index_double(zval *arg, zend_ulong index, double d) /* {{{ */
+ZEND_API zend_status add_index_double(zval *arg, zend_ulong index, double d) /* {{{ */
{
zval tmp;
@@ -1474,7 +1474,7 @@ ZEND_API int add_index_double(zval *arg, zend_ulong index, double d) /* {{{ */
}
/* }}} */
-ZEND_API int add_index_str(zval *arg, zend_ulong index, zend_string *str) /* {{{ */
+ZEND_API zend_status add_index_str(zval *arg, zend_ulong index, zend_string *str) /* {{{ */
{
zval tmp;
@@ -1483,7 +1483,7 @@ ZEND_API int add_index_str(zval *arg, zend_ulong index, zend_string *str) /* {{{
}
/* }}} */
-ZEND_API int add_index_string(zval *arg, zend_ulong index, const char *str) /* {{{ */
+ZEND_API zend_status add_index_string(zval *arg, zend_ulong index, const char *str) /* {{{ */
{
zval tmp;
@@ -1492,7 +1492,7 @@ ZEND_API int add_index_string(zval *arg, zend_ulong index, const char *str) /* {
}
/* }}} */
-ZEND_API int add_index_stringl(zval *arg, zend_ulong index, const char *str, size_t length) /* {{{ */
+ZEND_API zend_status add_index_stringl(zval *arg, zend_ulong index, const char *str, size_t length) /* {{{ */
{
zval tmp;
@@ -1501,13 +1501,13 @@ ZEND_API int add_index_stringl(zval *arg, zend_ulong index, const char *str, siz
}
/* }}} */
-ZEND_API int add_index_zval(zval *arg, zend_ulong index, zval *value) /* {{{ */
+ZEND_API zend_status add_index_zval(zval *arg, zend_ulong index, zval *value) /* {{{ */
{
return zend_hash_index_update(Z_ARRVAL_P(arg), index, value) ? SUCCESS : FAILURE;
}
/* }}} */
-ZEND_API int add_next_index_long(zval *arg, zend_long n) /* {{{ */
+ZEND_API zend_status add_next_index_long(zval *arg, zend_long n) /* {{{ */
{
zval tmp;
@@ -1516,7 +1516,7 @@ ZEND_API int add_next_index_long(zval *arg, zend_long n) /* {{{ */
}
/* }}} */
-ZEND_API int add_next_index_null(zval *arg) /* {{{ */
+ZEND_API zend_status add_next_index_null(zval *arg) /* {{{ */
{
zval tmp;
@@ -1525,7 +1525,7 @@ ZEND_API int add_next_index_null(zval *arg) /* {{{ */
}
/* }}} */
-ZEND_API int add_next_index_bool(zval *arg, int b) /* {{{ */
+ZEND_API zend_status add_next_index_bool(zval *arg, int b) /* {{{ */
{
zval tmp;
@@ -1534,7 +1534,7 @@ ZEND_API int add_next_index_bool(zval *arg, int b) /* {{{ */
}
/* }}} */
-ZEND_API int add_next_index_resource(zval *arg, zend_resource *r) /* {{{ */
+ZEND_API zend_status add_next_index_resource(zval *arg, zend_resource *r) /* {{{ */
{
zval tmp;
@@ -1543,7 +1543,7 @@ ZEND_API int add_next_index_resource(zval *arg, zend_resource *r) /* {{{ */
}
/* }}} */
-ZEND_API int add_next_index_double(zval *arg, double d) /* {{{ */
+ZEND_API zend_status add_next_index_double(zval *arg, double d) /* {{{ */
{
zval tmp;
@@ -1552,7 +1552,7 @@ ZEND_API int add_next_index_double(zval *arg, double d) /* {{{ */
}
/* }}} */
-ZEND_API int add_next_index_str(zval *arg, zend_string *str) /* {{{ */
+ZEND_API zend_status add_next_index_str(zval *arg, zend_string *str) /* {{{ */
{
zval tmp;
@@ -1561,7 +1561,7 @@ ZEND_API int add_next_index_str(zval *arg, zend_string *str) /* {{{ */
}
/* }}} */
-ZEND_API int add_next_index_string(zval *arg, const char *str) /* {{{ */
+ZEND_API zend_status add_next_index_string(zval *arg, const char *str) /* {{{ */
{
zval tmp;
@@ -1570,7 +1570,7 @@ ZEND_API int add_next_index_string(zval *arg, const char *str) /* {{{ */
}
/* }}} */
-ZEND_API int add_next_index_stringl(zval *arg, const char *str, size_t length) /* {{{ */
+ZEND_API zend_status add_next_index_stringl(zval *arg, const char *str, size_t length) /* {{{ */
{
zval tmp;
@@ -1579,7 +1579,7 @@ ZEND_API int add_next_index_stringl(zval *arg, const char *str, size_t length) /
}
/* }}} */
-ZEND_API int add_next_index_zval(zval *arg, zval *value) /* {{{ */
+ZEND_API zend_status add_next_index_zval(zval *arg, zval *value) /* {{{ */
{
return zend_hash_next_index_insert(Z_ARRVAL_P(arg), value) ? SUCCESS : FAILURE;
}
@@ -1650,7 +1650,7 @@ ZEND_API zval *add_get_index_stringl(zval *arg, zend_ulong index, const char *st
}
/* }}} */
-ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */
+ZEND_API zend_status array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */
{
zval *result;
@@ -1693,7 +1693,7 @@ ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */
}
/* }}} */
-ZEND_API int add_property_long_ex(zval *arg, const char *key, size_t key_len, zend_long n) /* {{{ */
+ZEND_API zend_status add_property_long_ex(zval *arg, const char *key, size_t key_len, zend_long n) /* {{{ */
{
zval tmp;
zval z_key;
@@ -1707,7 +1707,7 @@ ZEND_API int add_property_long_ex(zval *arg, const char *key, size_t key_len, ze
}
/* }}} */
-ZEND_API int add_property_bool_ex(zval *arg, const char *key, size_t key_len, zend_long b) /* {{{ */
+ZEND_API zend_status add_property_bool_ex(zval *arg, const char *key, size_t key_len, zend_long b) /* {{{ */
{
zval tmp;
zval z_key;
@@ -1721,7 +1721,7 @@ ZEND_API int add_property_bool_ex(zval *arg, const char *key, size_t key_len, ze
}
/* }}} */
-ZEND_API int add_property_null_ex(zval *arg, const char *key, size_t key_len) /* {{{ */
+ZEND_API zend_status add_property_null_ex(zval *arg, const char *key, size_t key_len) /* {{{ */
{
zval tmp;
zval z_key;
@@ -1735,7 +1735,7 @@ ZEND_API int add_property_null_ex(zval *arg, const char *key, size_t key_len) /*
}
/* }}} */
-ZEND_API int add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r) /* {{{ */
+ZEND_API zend_status add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r) /* {{{ */
{
zval tmp;
zval z_key;
@@ -1749,7 +1749,7 @@ ZEND_API int add_property_resource_ex(zval *arg, const char *key, size_t key_len
}
/* }}} */
-ZEND_API int add_property_double_ex(zval *arg, const char *key, size_t key_len, double d) /* {{{ */
+ZEND_API zend_status add_property_double_ex(zval *arg, const char *key, size_t key_len, double d) /* {{{ */
{
zval tmp;
zval z_key;
@@ -1763,7 +1763,7 @@ ZEND_API int add_property_double_ex(zval *arg, const char *key, size_t key_len,
}
/* }}} */
-ZEND_API int add_property_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str) /* {{{ */
+ZEND_API zend_status add_property_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str) /* {{{ */
{
zval tmp;
zval z_key;
@@ -1777,7 +1777,7 @@ ZEND_API int add_property_str_ex(zval *arg, const char *key, size_t key_len, zen
}
/* }}} */
-ZEND_API int add_property_string_ex(zval *arg, const char *key, size_t key_len, const char *str) /* {{{ */
+ZEND_API zend_status add_property_string_ex(zval *arg, const char *key, size_t key_len, const char *str) /* {{{ */
{
zval tmp;
zval z_key;
@@ -1791,7 +1791,7 @@ ZEND_API int add_property_string_ex(zval *arg, const char *key, size_t key_len,
}
/* }}} */
-ZEND_API int add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length) /* {{{ */
+ZEND_API zend_status add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length) /* {{{ */
{
zval tmp;
zval z_key;
@@ -1805,7 +1805,7 @@ ZEND_API int add_property_stringl_ex(zval *arg, const char *key, size_t key_len,
}
/* }}} */
-ZEND_API int add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */
+ZEND_API zend_status add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */
{
zval z_key;
@@ -1816,7 +1816,7 @@ ZEND_API int add_property_zval_ex(zval *arg, const char *key, size_t key_len, zv
}
/* }}} */
-ZEND_API int zend_startup_module_ex(zend_module_entry *module) /* {{{ */
+ZEND_API zend_status zend_startup_module_ex(zend_module_entry *module) /* {{{ */
{
size_t name_len;
zend_string *lcname;
@@ -1874,7 +1874,7 @@ ZEND_API int zend_startup_module_ex(zend_module_entry *module) /* {{{ */
}
/* }}} */
-static int zend_startup_module_zval(zval *zv) /* {{{ */
+static zend_status zend_startup_module_zval(zval *zv) /* {{{ */
{
zend_module_entry *module = Z_PTR_P(zv);
@@ -1986,7 +1986,7 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
}
/* }}} */
-ZEND_API int zend_startup_modules(void) /* {{{ */
+ZEND_API zend_status zend_startup_modules(void) /* {{{ */
{
zend_hash_sort(&module_registry, zend_sort_modules, NULL, 0);
zend_hash_apply(&module_registry, zend_startup_module_zval);
@@ -2135,7 +2135,7 @@ ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce,
/* }}} */
/* registers all functions in *library_functions in the function hash */
-ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_function_entry *functions, HashTable *function_table, int type) /* {{{ */
+ZEND_API zend_status zend_register_functions(zend_class_entry *scope, const zend_function_entry *functions, HashTable *function_table, int type) /* {{{ */
{
const zend_function_entry *ptr = functions;
zend_function function, *reg_function;
@@ -2442,7 +2442,7 @@ ZEND_API void zend_unregister_functions(const zend_function_entry *functions, in
}
/* }}} */
-ZEND_API int zend_startup_module(zend_module_entry *module) /* {{{ */
+ZEND_API zend_status zend_startup_module(zend_module_entry *module) /* {{{ */
{
if ((module = zend_register_internal_module(module)) != NULL && zend_startup_module_ex(module) == SUCCESS) {
return SUCCESS;
@@ -2451,7 +2451,7 @@ ZEND_API int zend_startup_module(zend_module_entry *module) /* {{{ */
}
/* }}} */
-ZEND_API int zend_get_module_started(const char *module_name) /* {{{ */
+ZEND_API zend_status zend_get_module_started(const char *module_name) /* {{{ */
{
zend_module_entry *module;
@@ -2703,7 +2703,7 @@ ZEND_API zend_class_entry *zend_register_internal_interface(zend_class_entry *or
}
/* }}} */
-ZEND_API int zend_register_class_alias_ex(const char *name, size_t name_len, zend_class_entry *ce) /* {{{ */
+ZEND_API zend_status zend_register_class_alias_ex(const char *name, size_t name_len, zend_class_entry *ce) /* {{{ */
{
zend_string *lcname;
@@ -2724,7 +2724,7 @@ ZEND_API int zend_register_class_alias_ex(const char *name, size_t name_len, zen
}
/* }}} */
-ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, int name_length, zend_bool is_ref, int num_symbol_tables, ...) /* {{{ */
+ZEND_API zend_status zend_set_hash_symbol(zval *symbol, const char *name, int name_length, zend_bool is_ref, int num_symbol_tables, ...) /* {{{ */
{
HashTable *symbol_table;
va_list symbol_table_list;
@@ -2758,7 +2758,7 @@ ZEND_API ZEND_FUNCTION(display_disabled_function)
}
/* }}} */
-ZEND_API int zend_disable_function(char *function_name, size_t function_name_length) /* {{{ */
+ZEND_API zend_status zend_disable_function(char *function_name, size_t function_name_length) /* {{{ */
{
zend_internal_function *func;
if ((func = zend_hash_str_find_ptr(CG(function_table), function_name, function_name_length))) {
@@ -2792,7 +2792,7 @@ static const zend_function_entry disabled_class_new[] = {
ZEND_FE_END
};
-ZEND_API int zend_disable_class(char *class_name, size_t class_name_length) /* {{{ */
+ZEND_API zend_status zend_disable_class(char *class_name, size_t class_name_length) /* {{{ */
{
zend_class_entry *disabled_class;
zend_string *key;
@@ -3397,7 +3397,7 @@ ZEND_API zend_bool zend_make_callable(zval *callable, zend_string **callable_nam
}
/* }}} */
-ZEND_API int zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_string **callable_name, char **error) /* {{{ */
+ZEND_API zend_status zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_string **callable_name, char **error) /* {{{ */
{
if (!zend_is_callable_ex(callable, NULL, check_flags, callable_name, fcc, error)) {
return FAILURE;
@@ -3451,7 +3451,7 @@ ZEND_API void zend_fcall_info_args_restore(zend_fcall_info *fci, int param_count
}
/* }}} */
-ZEND_API int zend_fcall_info_args_ex(zend_fcall_info *fci, zend_function *func, zval *args) /* {{{ */
+ZEND_API zend_status zend_fcall_info_args_ex(zend_fcall_info *fci, zend_function *func, zval *args) /* {{{ */
{
zval *arg, *params;
uint32_t n = 1;
@@ -3486,13 +3486,13 @@ ZEND_API int zend_fcall_info_args_ex(zend_fcall_info *fci, zend_function *func,
}
/* }}} */
-ZEND_API int zend_fcall_info_args(zend_fcall_info *fci, zval *args) /* {{{ */
+ZEND_API zend_status zend_fcall_info_args(zend_fcall_info *fci, zval *args) /* {{{ */
{
return zend_fcall_info_args_ex(fci, NULL, args);
}
/* }}} */
-ZEND_API int zend_fcall_info_argp(zend_fcall_info *fci, int argc, zval *argv) /* {{{ */
+ZEND_API zend_status zend_fcall_info_argp(zend_fcall_info *fci, int argc, zval *argv) /* {{{ */
{
int i;
@@ -3515,7 +3515,7 @@ ZEND_API int zend_fcall_info_argp(zend_fcall_info *fci, int argc, zval *argv) /*
}
/* }}} */
-ZEND_API int zend_fcall_info_argv(zend_fcall_info *fci, int argc, va_list *argv) /* {{{ */
+ZEND_API zend_status zend_fcall_info_argv(zend_fcall_info *fci, int argc, va_list *argv) /* {{{ */
{
int i;
zval *arg;
@@ -3540,7 +3540,7 @@ ZEND_API int zend_fcall_info_argv(zend_fcall_info *fci, int argc, va_list *argv)
}
/* }}} */
-ZEND_API int zend_fcall_info_argn(zend_fcall_info *fci, int argc, ...) /* {{{ */
+ZEND_API zend_status zend_fcall_info_argn(zend_fcall_info *fci, int argc, ...) /* {{{ */
{
int ret;
va_list argv;
@@ -3553,7 +3553,7 @@ ZEND_API int zend_fcall_info_argn(zend_fcall_info *fci, int argc, ...) /* {{{ */
}
/* }}} */
-ZEND_API int zend_fcall_info_call(zend_fcall_info *fci, zend_fcall_info_cache *fcc, zval *retval_ptr, zval *args) /* {{{ */
+ZEND_API zend_status zend_fcall_info_call(zend_fcall_info *fci, zend_fcall_info_cache *fcc, zval *retval_ptr, zval *args) /* {{{ */
{
zval retval, *org_params = NULL;
int result, org_count = 0;
@@ -3589,7 +3589,7 @@ ZEND_API const char *zend_get_module_version(const char *module_name) /* {{{ */
}
/* }}} */
-ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment) /* {{{ */
+ZEND_API zend_status zend_declare_property_ex(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment) /* {{{ */
{
zend_property_info *property_info, *property_info_ptr;
@@ -3667,16 +3667,16 @@ ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, z
}
/* }}} */
-ZEND_API int zend_declare_property(zend_class_entry *ce, const char *name, size_t name_length, zval *property, int access_type) /* {{{ */
+ZEND_API zend_status zend_declare_property(zend_class_entry *ce, const char *name, size_t name_length, zval *property, int access_type) /* {{{ */
{
zend_string *key = zend_string_init(name, name_length, ce->type & ZEND_INTERNAL_CLASS);
- int ret = zend_declare_property_ex(ce, key, property, access_type, NULL);
+ zend_status ret = zend_declare_property_ex(ce, key, property, access_type, NULL);
zend_string_release(key);
return ret;
}
/* }}} */
-ZEND_API int zend_declare_property_null(zend_class_entry *ce, const char *name, size_t name_length, int access_type) /* {{{ */
+ZEND_API zend_status zend_declare_property_null(zend_class_entry *ce, const char *name, size_t name_length, int access_type) /* {{{ */
{
zval property;
@@ -3685,7 +3685,7 @@ ZEND_API int zend_declare_property_null(zend_class_entry *ce, const char *name,
}
/* }}} */
-ZEND_API int zend_declare_property_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type) /* {{{ */
+ZEND_API zend_status zend_declare_property_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type) /* {{{ */
{
zval property;
@@ -3694,7 +3694,7 @@ ZEND_API int zend_declare_property_bool(zend_class_entry *ce, const char *name,
}
/* }}} */
-ZEND_API int zend_declare_property_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type) /* {{{ */
+ZEND_API zend_status zend_declare_property_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type) /* {{{ */
{
zval property;
@@ -3703,7 +3703,7 @@ ZEND_API int zend_declare_property_long(zend_class_entry *ce, const char *name,
}
/* }}} */
-ZEND_API int zend_declare_property_double(zend_class_entry *ce, const char *name, size_t name_length, double value, int access_type) /* {{{ */
+ZEND_API zend_status zend_declare_property_double(zend_class_entry *ce, const char *name, size_t name_length, double value, int access_type) /* {{{ */
{
zval property;
@@ -3712,7 +3712,7 @@ ZEND_API int zend_declare_property_double(zend_class_entry *ce, const char *name
}
/* }}} */
-ZEND_API int zend_declare_property_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value, int access_type) /* {{{ */
+ZEND_API zend_status zend_declare_property_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value, int access_type) /* {{{ */
{
zval property;
@@ -3721,7 +3721,7 @@ ZEND_API int zend_declare_property_string(zend_class_entry *ce, const char *name
}
/* }}} */
-ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_len, int access_type) /* {{{ */
+ZEND_API zend_status zend_declare_property_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_len, int access_type) /* {{{ */
{
zval property;
@@ -3730,7 +3730,7 @@ ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, const char *nam
}
/* }}} */
-ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value) /* {{{ */
+ZEND_API zend_status zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value) /* {{{ */
{
if (Z_CONSTANT_P(value)) {
ce->ce_flags &= ~ZEND_ACC_CONSTANTS_UPDATED;
@@ -3740,7 +3740,7 @@ ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name,
}
/* }}} */
-ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length) /* {{{ */
+ZEND_API zend_status zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length) /* {{{ */
{
zval constant;
@@ -3749,7 +3749,7 @@ ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, const char *
}
/* }}} */
-ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value) /* {{{ */
+ZEND_API zend_status zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value) /* {{{ */
{
zval constant;
@@ -3758,7 +3758,7 @@ ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, const char *
}
/* }}} */
-ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value) /* {{{ */
+ZEND_API zend_status zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value) /* {{{ */
{
zval constant;
@@ -3767,7 +3767,7 @@ ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, const char *
}
/* }}} */
-ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value) /* {{{ */
+ZEND_API zend_status zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value) /* {{{ */
{
zval constant;
@@ -3776,7 +3776,7 @@ ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, const char
}
/* }}} */
-ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length) /* {{{ */
+ZEND_API zend_status zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length) /* {{{ */
{
zval constant;
@@ -3785,7 +3785,7 @@ ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, const cha
}
/* }}} */
-ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value) /* {{{ */
+ZEND_API zend_status zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value) /* {{{ */
{
return zend_declare_class_constant_stringl(ce, name, name_length, value, strlen(value));
}
@@ -3874,7 +3874,7 @@ ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object
}
/* }}} */
-ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *name, size_t name_length, zval *value) /* {{{ */
+ZEND_API zend_status zend_update_static_property(zend_class_entry *scope, const char *name, size_t name_length, zval *value) /* {{{ */
{
zval *property;
zend_class_entry *old_scope = EG(scope);
@@ -3913,7 +3913,7 @@ ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *na
}
/* }}} */
-ZEND_API int zend_update_static_property_null(zend_class_entry *scope, const char *name, size_t name_length) /* {{{ */
+ZEND_API zend_status zend_update_static_property_null(zend_class_entry *scope, const char *name, size_t name_length) /* {{{ */
{
zval tmp;
@@ -3922,7 +3922,7 @@ ZEND_API int zend_update_static_property_null(zend_class_entry *scope, const cha
}
/* }}} */
-ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, const char *name, size_t name_length, zend_long value) /* {{{ */
+ZEND_API zend_status zend_update_static_property_bool(zend_class_entry *scope, const char *name, size_t name_length, zend_long value) /* {{{ */
{
zval tmp;
@@ -3931,7 +3931,7 @@ ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, const cha
}
/* }}} */
-ZEND_API int zend_update_static_property_long(zend_class_entry *scope, const char *name, size_t name_length, zend_long value) /* {{{ */
+ZEND_API zend_status zend_update_static_property_long(zend_class_entry *scope, const char *name, size_t name_length, zend_long value) /* {{{ */
{
zval tmp;
@@ -3940,7 +3940,7 @@ ZEND_API int zend_update_static_property_long(zend_class_entry *scope, const cha
}
/* }}} */
-ZEND_API int zend_update_static_property_double(zend_class_entry *scope, const char *name, size_t name_length, double value) /* {{{ */
+ZEND_API zend_status zend_update_static_property_double(zend_class_entry *scope, const char *name, size_t name_length, double value) /* {{{ */
{
zval tmp;
@@ -3949,7 +3949,7 @@ ZEND_API int zend_update_static_property_double(zend_class_entry *scope, const c
}
/* }}} */
-ZEND_API int zend_update_static_property_string(zend_class_entry *scope, const char *name, size_t name_length, const char *value) /* {{{ */
+ZEND_API zend_status zend_update_static_property_string(zend_class_entry *scope, const char *name, size_t name_length, const char *value) /* {{{ */
{
zval tmp;
@@ -3959,7 +3959,7 @@ ZEND_API int zend_update_static_property_string(zend_class_entry *scope, const c
}
/* }}} */
-ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, const char *name, size_t name_length, const char *value, size_t value_len) /* {{{ */
+ZEND_API zend_status zend_update_static_property_stringl(zend_class_entry *scope, const char *name, size_t name_length, const char *value, size_t value_len) /* {{{ */
{
zval tmp;
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 5f7b559..018ba34 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -232,12 +232,12 @@ typedef struct _zend_fcall_info_cache {
ZEND_API int zend_next_free_module(void);
BEGIN_EXTERN_C()
-ZEND_API int zend_get_parameters(int ht, int param_count, ...);
-ZEND_API ZEND_ATTRIBUTE_DEPRECATED int zend_get_parameters_ex(int param_count, ...);
-ZEND_API int _zend_get_parameters_array_ex(int param_count, zval *argument_array);
+ZEND_API zend_status zend_get_parameters(int ht, int param_count, ...);
+ZEND_API ZEND_ATTRIBUTE_DEPRECATED zend_status zend_get_parameters_ex(int param_count, ...);
+ZEND_API zend_status _zend_get_parameters_array_ex(int param_count, zval *argument_array);
/* internal function to efficiently copy parameters when executing __call() */
-ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array);
+ZEND_API zend_status zend_copy_parameters_array(int param_count, zval *argument_array);
#define zend_get_parameters_array(ht, param_count, argument_array) \
_zend_get_parameters_array_ex(param_count, argument_array)
@@ -249,24 +249,24 @@ ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array);
/* Parameter parsing API -- andrei */
#define ZEND_PARSE_PARAMS_QUIET (1<<1)
-ZEND_API int zend_parse_parameters(int num_args, const char *type_spec, ...);
-ZEND_API int zend_parse_parameters_ex(int flags, int num_args, const char *type_spec, ...);
+ZEND_API zend_status zend_parse_parameters(int num_args, const char *type_spec, ...);
+ZEND_API zend_status zend_parse_parameters_ex(int flags, int num_args, const char *type_spec, ...);
ZEND_API char *zend_zval_type_name(const zval *arg);
-ZEND_API int zend_parse_method_parameters(int num_args, zval *this_ptr, const char *type_spec, ...);
-ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args, zval *this_ptr, const char *type_spec, ...);
+ZEND_API zend_status zend_parse_method_parameters(int num_args, zval *this_ptr, const char *type_spec, ...);
+ZEND_API zend_status zend_parse_method_parameters_ex(int flags, int num_args, zval *this_ptr, const char *type_spec, ...);
-ZEND_API int zend_parse_parameter(int flags, int arg_num, zval *arg, const char *spec, ...);
+ZEND_API zend_status zend_parse_parameter(int flags, int arg_num, zval *arg, const char *spec, ...);
/* End of parameter parsing API -- andrei */
-ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_function_entry *functions, HashTable *function_table, int type);
+ZEND_API zend_status zend_register_functions(zend_class_entry *scope, const zend_function_entry *functions, HashTable *function_table, int type);
ZEND_API void zend_unregister_functions(const zend_function_entry *functions, int count, HashTable *function_table);
-ZEND_API int zend_startup_module(zend_module_entry *module_entry);
+ZEND_API zend_status zend_startup_module(zend_module_entry *module_entry);
ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *module_entry);
ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module);
-ZEND_API int zend_startup_module_ex(zend_module_entry *module);
-ZEND_API int zend_startup_modules(void);
+ZEND_API zend_status zend_startup_module_ex(zend_module_entry *module);
+ZEND_API zend_status zend_startup_modules(void);
ZEND_API void zend_collect_module_handlers(void);
ZEND_API void zend_destroy_modules(void);
ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, const zend_function *fptr, int error_type);
@@ -276,15 +276,15 @@ ZEND_API zend_class_entry *zend_register_internal_class_ex(zend_class_entry *cla
ZEND_API zend_class_entry *zend_register_internal_interface(zend_class_entry *orig_class_entry);
ZEND_API void zend_class_implements(zend_class_entry *class_entry, int num_interfaces, ...);
-ZEND_API int zend_register_class_alias_ex(const char *name, size_t name_len, zend_class_entry *ce);
+ZEND_API zend_status zend_register_class_alias_ex(const char *name, size_t name_len, zend_class_entry *ce);
#define zend_register_class_alias(name, ce) \
zend_register_class_alias_ex(name, sizeof(name)-1, ce)
#define zend_register_ns_class_alias(ns, name, ce) \
zend_register_class_alias_ex(ZEND_NS_NAME(ns, name), sizeof(ZEND_NS_NAME(ns, name))-1, ce)
-ZEND_API int zend_disable_function(char *function_name, size_t function_name_length);
-ZEND_API int zend_disable_class(char *class_name, size_t class_name_length);
+ZEND_API zend_status zend_disable_function(char *function_name, size_t function_name_length);
+ZEND_API zend_status zend_disable_class(char *class_name, size_t class_name_length);
ZEND_API void zend_wrong_param_count(void);
@@ -299,23 +299,23 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint
ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, zend_string **callable_name);
ZEND_API zend_bool zend_make_callable(zval *callable, zend_string **callable_name);
ZEND_API const char *zend_get_module_version(const char *module_name);
-ZEND_API int zend_get_module_started(const char *module_name);
-ZEND_API int zend_declare_property_ex(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment);
-ZEND_API int zend_declare_property(zend_class_entry *ce, const char *name, size_t name_length, zval *property, int access_type);
-ZEND_API int zend_declare_property_null(zend_class_entry *ce, const char *name, size_t name_length, int access_type);
-ZEND_API int zend_declare_property_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type);
-ZEND_API int zend_declare_property_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type);
-ZEND_API int zend_declare_property_double(zend_class_entry *ce, const char *name, size_t name_length, double value, int access_type);
-ZEND_API int zend_declare_property_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value, int access_type);
-ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_len, int access_type);
-
-ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value);
-ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length);
-ZEND_API int zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value);
-ZEND_API int zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value);
-ZEND_API int zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value);
-ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length);
-ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value);
+ZEND_API zend_status zend_get_module_started(const char *module_name);
+ZEND_API zend_status zend_declare_property_ex(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment);
+ZEND_API zend_status zend_declare_property(zend_class_entry *ce, const char *name, size_t name_length, zval *property, int access_type);
+ZEND_API zend_status zend_declare_property_null(zend_class_entry *ce, const char *name, size_t name_length, int access_type);
+ZEND_API zend_status zend_declare_property_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type);
+ZEND_API zend_status zend_declare_property_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value, int access_type);
+ZEND_API zend_status zend_declare_property_double(zend_class_entry *ce, const char *name, size_t name_length, double value, int access_type);
+ZEND_API zend_status zend_declare_property_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value, int access_type);
+ZEND_API zend_status zend_declare_property_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_len, int access_type);
+
+ZEND_API zend_status zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value);
+ZEND_API zend_status zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length);
+ZEND_API zend_status zend_declare_class_constant_long(zend_class_entry *ce, const char *name, size_t name_length, zend_long value);
+ZEND_API zend_status zend_declare_class_constant_bool(zend_class_entry *ce, const char *name, size_t name_length, zend_bool value);
+ZEND_API zend_status zend_declare_class_constant_double(zend_class_entry *ce, const char *name, size_t name_length, double value);
+ZEND_API zend_status zend_declare_class_constant_stringl(zend_class_entry *ce, const char *name, size_t name_length, const char *value, size_t value_length);
+ZEND_API zend_status zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value);
ZEND_API void zend_update_class_constants(zend_class_entry *class_type);
ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, const char *name, size_t name_length, zval *value);
@@ -327,13 +327,13 @@ ZEND_API void zend_update_property_str(zend_class_entry *scope, zval *object, co
ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, const char *name, size_t name_length, const char *value);
ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object, const char *name, size_t name_length, const char *value, size_t value_length);
-ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *name, size_t name_length, zval *value);
-ZEND_API int zend_update_static_property_null(zend_class_entry *scope, const char *name, size_t name_length);
-ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, const char *name, size_t name_length, zend_long value);
-ZEND_API int zend_update_static_property_long(zend_class_entry *scope, const char *name, size_t name_length, zend_long value);
-ZEND_API int zend_update_static_property_double(zend_class_entry *scope, const char *name, size_t name_length, double value);
-ZEND_API int zend_update_static_property_string(zend_class_entry *scope, const char *name, size_t name_length, const char *value);
-ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, const char *name, size_t name_length, const char *value, size_t value_length);
+ZEND_API zend_status zend_update_static_property(zend_class_entry *scope, const char *name, size_t name_length, zval *value);
+ZEND_API zend_status zend_update_static_property_null(zend_class_entry *scope, const char *name, size_t name_length);
+ZEND_API zend_status zend_update_static_property_bool(zend_class_entry *scope, const char *name, size_t name_length, zend_long value);
+ZEND_API zend_status zend_update_static_property_long(zend_class_entry *scope, const char *name, size_t name_length, zend_long value);
+ZEND_API zend_status zend_update_static_property_double(zend_class_entry *scope, const char *name, size_t name_length, double value);
+ZEND_API zend_status zend_update_static_property_string(zend_class_entry *scope, const char *name, size_t name_length, const char *value);
+ZEND_API zend_status zend_update_static_property_stringl(zend_class_entry *scope, const char *name, size_t name_length, const char *value, size_t value_length);
ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, const char *name, size_t name_length, zend_bool silent);
@@ -360,10 +360,10 @@ ZEND_API char *zend_get_type_by_const(int type);
#define object_init(arg) _object_init((arg) ZEND_FILE_LINE_CC)
#define object_init_ex(arg, ce) _object_init_ex((arg), (ce) ZEND_FILE_LINE_CC)
#define object_and_properties_init(arg, ce, properties) _object_and_properties_init((arg), (ce), (properties) ZEND_FILE_LINE_CC)
-ZEND_API int _array_init(zval *arg, uint size ZEND_FILE_LINE_DC);
-ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC);
-ZEND_API int _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC);
-ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *ce, HashTable *properties ZEND_FILE_LINE_DC);
+ZEND_API zend_status _array_init(zval *arg, uint size ZEND_FILE_LINE_DC);
+ZEND_API zend_status _object_init(zval *arg ZEND_FILE_LINE_DC);
+ZEND_API zend_status _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC);
+ZEND_API zend_status _object_and_properties_init(zval *arg, zend_class_entry *ce, HashTable *properties ZEND_FILE_LINE_DC);
ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type);
ZEND_API void object_properties_init_ex(zend_object *object, HashTable *properties);
ZEND_API void object_properties_load(zend_object *object, HashTable *properties);
@@ -371,17 +371,17 @@ ZEND_API void object_properties_load(zend_object *object, HashTable *properties)
ZEND_API void zend_merge_properties(zval *obj, HashTable *properties);
/* no longer supported */
-ZEND_API int add_assoc_function(zval *arg, const char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
-
-ZEND_API int add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n);
-ZEND_API int add_assoc_null_ex(zval *arg, const char *key, size_t key_len);
-ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b);
-ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r);
-ZEND_API int add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d);
-ZEND_API int add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str);
-ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, char *str);
-ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, char *str, size_t length);
-ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);
+ZEND_API zend_status add_assoc_function(zval *arg, const char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
+
+ZEND_API zend_status add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n);
+ZEND_API zend_status add_assoc_null_ex(zval *arg, const char *key, size_t key_len);
+ZEND_API zend_status add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b);
+ZEND_API zend_status add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r);
+ZEND_API zend_status add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d);
+ZEND_API zend_status add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str);
+ZEND_API zend_status add_assoc_string_ex(zval *arg, const char *key, size_t key_len, char *str);
+ZEND_API zend_status add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, char *str, size_t length);
+ZEND_API zend_status add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);
#define add_assoc_long(__arg, __key, __n) add_assoc_long_ex(__arg, __key, strlen(__key), __n)
#define add_assoc_null(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key))
@@ -399,25 +399,25 @@ ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval
#define add_next_index_unset(__arg) add_next_index_null(__arg)
#define add_property_unset(__arg, __key) add_property_null(__arg, __key)
-ZEND_API int add_index_long(zval *arg, zend_ulong idx, zend_long n);
-ZEND_API int add_index_null(zval *arg, zend_ulong idx);
-ZEND_API int add_index_bool(zval *arg, zend_ulong idx, int b);
-ZEND_API int add_index_resource(zval *arg, zend_ulong idx, zend_resource *r);
-ZEND_API int add_index_double(zval *arg, zend_ulong idx, double d);
-ZEND_API int add_index_str(zval *arg, zend_ulong idx, zend_string *str);
-ZEND_API int add_index_string(zval *arg, zend_ulong idx, const char *str);
-ZEND_API int add_index_stringl(zval *arg, zend_ulong idx, const char *str, size_t length);
-ZEND_API int add_index_zval(zval *arg, zend_ulong index, zval *value);
-
-ZEND_API int add_next_index_long(zval *arg, zend_long n);
-ZEND_API int add_next_index_null(zval *arg);
-ZEND_API int add_next_index_bool(zval *arg, int b);
-ZEND_API int add_next_index_resource(zval *arg, zend_resource *r);
-ZEND_API int add_next_index_double(zval *arg, double d);
-ZEND_API int add_next_index_str(zval *arg, zend_string *str);
-ZEND_API int add_next_index_string(zval *arg, const char *str);
-ZEND_API int add_next_index_stringl(zval *arg, const char *str, size_t length);
-ZEND_API int add_next_index_zval(zval *arg, zval *value);
+ZEND_API zend_status add_index_long(zval *arg, zend_ulong idx, zend_long n);
+ZEND_API zend_status add_index_null(zval *arg, zend_ulong idx);
+ZEND_API zend_status add_index_bool(zval *arg, zend_ulong idx, int b);
+ZEND_API zend_status add_index_resource(zval *arg, zend_ulong idx, zend_resource *r);
+ZEND_API zend_status add_index_double(zval *arg, zend_ulong idx, double d);
+ZEND_API zend_status add_index_str(zval *arg, zend_ulong idx, zend_string *str);
+ZEND_API zend_status add_index_string(zval *arg, zend_ulong idx, const char *str);
+ZEND_API zend_status add_index_stringl(zval *arg, zend_ulong idx, const char *str, size_t length);
+ZEND_API zend_status add_index_zval(zval *arg, zend_ulong index, zval *value);
+
+ZEND_API zend_status add_next_index_long(zval *arg, zend_long n);
+ZEND_API zend_status add_next_index_null(zval *arg);
+ZEND_API zend_status add_next_index_bool(zval *arg, int b);
+ZEND_API zend_status add_next_index_resource(zval *arg, zend_resource *r);
+ZEND_API zend_status add_next_index_double(zval *arg, double d);
+ZEND_API zend_status add_next_index_str(zval *arg, zend_string *str);
+ZEND_API zend_status add_next_index_string(zval *arg, const char *str);
+ZEND_API zend_status add_next_index_stringl(zval *arg, const char *str, size_t length);
+ZEND_API zend_status add_next_index_zval(zval *arg, zval *value);
ZEND_API zval *add_get_assoc_string_ex(zval *arg, const char *key, uint key_len, const char *str);
ZEND_API zval *add_get_assoc_stringl_ex(zval *arg, const char *key, uint key_len, const char *str, size_t length);
@@ -431,17 +431,17 @@ ZEND_API zval *add_get_index_str(zval *arg, zend_ulong index, zend_string *str);
ZEND_API zval *add_get_index_string(zval *arg, zend_ulong idx, const char *str);
ZEND_API zval *add_get_index_stringl(zval *arg, zend_ulong idx, const char *str, size_t length);
-ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value);
+ZEND_API zend_status array_set_zval_key(HashTable *ht, zval *key, zval *value);
-ZEND_API int add_property_long_ex(zval *arg, const char *key, size_t key_len, zend_long l);
-ZEND_API int add_property_null_ex(zval *arg, const char *key, size_t key_len);
-ZEND_API int add_property_bool_ex(zval *arg, const char *key, size_t key_len, zend_long b);
-ZEND_API int add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r);
-ZEND_API int add_property_double_ex(zval *arg, const char *key, size_t key_len, double d);
-ZEND_API int add_property_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str);
-ZEND_API int add_property_string_ex(zval *arg, const char *key, size_t key_len, const char *str);
-ZEND_API int add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length);
-ZEND_API int add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);
+ZEND_API zend_status add_property_long_ex(zval *arg, const char *key, size_t key_len, zend_long l);
+ZEND_API zend_status add_property_null_ex(zval *arg, const char *key, size_t key_len);
+ZEND_API zend_status add_property_bool_ex(zval *arg, const char *key, size_t key_len, zend_long b);
+ZEND_API zend_status add_property_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r);
+ZEND_API zend_status add_property_double_ex(zval *arg, const char *key, size_t key_len, double d);
+ZEND_API zend_status add_property_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str);
+ZEND_API zend_status add_property_string_ex(zval *arg, const char *key, size_t key_len, const char *str);
+ZEND_API zend_status add_property_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length);
+ZEND_API zend_status add_property_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);
#define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key), __n)
#define add_property_null(__arg, __key) add_property_null_ex(__arg, __key, strlen(__key))
@@ -454,8 +454,8 @@ ZEND_API int add_property_zval_ex(zval *arg, const char *key, size_t key_len, zv
#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key), __value)
-ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[]);
-ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation, zend_array *symbol_table);
+ZEND_API zend_status call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[]);
+ZEND_API zend_status call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation, zend_array *symbol_table);
ZEND_API extern const zend_fcall_info empty_fcall_info;
ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache;
@@ -470,7 +470,7 @@ ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache;
* The callable_name argument may be NULL.
* Set check_flags to IS_CALLABLE_STRICT for every new usage!
*/
-ZEND_API int zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_string **callable_name, char **error);
+ZEND_API zend_status zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_string **callable_name, char **error);
/** Clear arguments connected with zend_fcall_info *fci
* If free_mem is not zero then the params array gets free'd as well
@@ -489,43 +489,43 @@ ZEND_API void zend_fcall_info_args_restore(zend_fcall_info *fci, int param_count
/** Set or clear the arguments in the zend_call_info struct taking care of
* refcount. If args is NULL and arguments are set then those are cleared.
*/
-ZEND_API int zend_fcall_info_args(zend_fcall_info *fci, zval *args);
-ZEND_API int zend_fcall_info_args_ex(zend_fcall_info *fci, zend_function *func, zval *args);
+ZEND_API zend_status zend_fcall_info_args(zend_fcall_info *fci, zval *args);
+ZEND_API zend_status zend_fcall_info_args_ex(zend_fcall_info *fci, zend_function *func, zval *args);
/** Set arguments in the zend_fcall_info struct taking care of refcount.
* If argc is 0 the arguments which are set will be cleared, else pass
* a variable amount of zval** arguments.
*/
-ZEND_API int zend_fcall_info_argp(zend_fcall_info *fci, int argc, zval *argv);
+ZEND_API zend_status zend_fcall_info_argp(zend_fcall_info *fci, int argc, zval *argv);
/** Set arguments in the zend_fcall_info struct taking care of refcount.
* If argc is 0 the arguments which are set will be cleared, else pass
* a variable amount of zval** arguments.
*/
-ZEND_API int zend_fcall_info_argv(zend_fcall_info *fci, int argc, va_list *argv);
+ZEND_API zend_status zend_fcall_info_argv(zend_fcall_info *fci, int argc, va_list *argv);
/** Set arguments in the zend_fcall_info struct taking care of refcount.
* If argc is 0 the arguments which are set will be cleared, else pass
* a variable amount of zval** arguments.
*/
-ZEND_API int zend_fcall_info_argn(zend_fcall_info *fci, int argc, ...);
+ZEND_API zend_status zend_fcall_info_argn(zend_fcall_info *fci, int argc, ...);
/** Call a function using information created by zend_fcall_info_init()/args().
* If args is given then those replace the argument info in fci is temporarily.
*/
-ZEND_API int zend_fcall_info_call(zend_fcall_info *fci, zend_fcall_info_cache *fcc, zval *retval, zval *args);
+ZEND_API zend_status zend_fcall_info_call(zend_fcall_info *fci, zend_fcall_info_cache *fcc, zval *retval, zval *args);
-ZEND_API int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache);
+ZEND_API zend_status zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache);
-ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, int name_length, zend_bool is_ref, int num_symbol_tables, ...);
+ZEND_API zend_status zend_set_hash_symbol(zval *symbol, const char *name, int name_length, zend_bool is_ref, int num_symbol_tables, ...);
-ZEND_API int zend_delete_global_variable(zend_string *name);
+ZEND_API zend_status zend_delete_global_variable(zend_string *name);
ZEND_API zend_array *zend_rebuild_symbol_table(void);
ZEND_API void zend_attach_symbol_table(zend_execute_data *execute_data);
ZEND_API void zend_detach_symbol_table(zend_execute_data *execute_data);
-ZEND_API int zend_set_local_var(zend_string *name, zval *value, int force);
-ZEND_API int zend_set_local_var_str(const char *name, size_t len, zval *value, int force);
+ZEND_API zend_status zend_set_local_var(zend_string *name, zval *value, int force);
+ZEND_API zend_status zend_set_local_var_str(const char *name, size_t len, zval *value, int force);
ZEND_API zend_string *zend_find_alias_name(zend_class_entry *ce, zend_string *name);
ZEND_API zend_string *zend_resolve_method_name(zend_class_entry *ce, zend_function *f);
@@ -694,7 +694,7 @@ typedef enum _zend_expected_type {
Z_EXPECTED_LAST
} zend_expected_type;
-ZEND_API int parse_arg_object_to_str(zval *arg, zend_string **str, int type);
+ZEND_API zend_status parse_arg_object_to_str(zval *arg, zend_string **str, int type);
ZEND_API void zend_wrong_paramers_count_error(int num_args, int min_num_args, int max_num_args);
ZEND_API void zend_wrong_paramer_type_error(int num, zend_expected_type expected_type, zval *arg);
ZEND_API void zend_wrong_paramer_class_error(int num, char *name, zval *arg);
diff --git a/Zend/zend_types.h b/Zend/zend_types.h
index 28885db..aa54467 100644
--- a/Zend/zend_types.h
+++ b/Zend/zend_types.h
@@ -49,6 +49,7 @@ typedef enum {
SUCCESS = 0,
FAILURE = -1, /* this MUST stay a negative number, or it may affect functions! */
} ZEND_RESULT_CODE;
+typedef ZEND_RESULT_CODE zend_status;
#ifdef ZEND_ENABLE_ZVAL_LONG64
# ifdef ZEND_WIN32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment