}
+ZEND_API inline int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS))
+{
+ zend_error(E_WARNING, "add_assoc_function() is no longer supported");
+ return FAILURE;
+}
+
+
ZEND_API inline int add_assoc_long(zval *arg, char *key, long n)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
}
+ZEND_API inline int add_assoc_bool(zval *arg, char *key, int b)
+{
+ zval *tmp = (zval *) emalloc(sizeof(zval));
+
+ tmp->type = IS_BOOL;
+ tmp->value.lval = b;
+ INIT_PZVAL(tmp);
+ return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
+}
+
+
+ZEND_API inline int add_assoc_resource(zval *arg, char *key, int r)
+{
+ zval *tmp = (zval *) emalloc(sizeof(zval));
+
+ tmp->type = IS_RESOURCE;
+ tmp->value.lval = r;
+ INIT_PZVAL(tmp);
+ return zend_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(zval *), NULL);
+}
+
+
ZEND_API inline int add_assoc_double(zval *arg, char *key, double d)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
}
-ZEND_API inline int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS))
+ZEND_API inline int add_index_long(zval *arg, uint index, long n)
{
- zend_error(E_WARNING, "add_assoc_function() is no longer supported");
- return FAILURE;
+ zval *tmp = (zval *) emalloc(sizeof(zval));
+
+ tmp->type = IS_LONG;
+ tmp->value.lval = n;
+ INIT_PZVAL(tmp);
+ return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
-ZEND_API inline int add_index_long(zval *arg, uint index, long n)
+ZEND_API inline int add_index_bool(zval *arg, uint index, int b)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
- tmp->type = IS_LONG;
- tmp->value.lval = n;
+ tmp->type = IS_BOOL;
+ tmp->value.lval = b;
+ INIT_PZVAL(tmp);
+ return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
+}
+
+
+ZEND_API inline int add_index_resource(zval *arg, uint index, int r)
+{
+ zval *tmp = (zval *) emalloc(sizeof(zval));
+
+ tmp->type = IS_RESOURCE;
+ tmp->value.lval = r;
INIT_PZVAL(tmp);
return zend_hash_index_update(arg->value.ht, index, (void *) &tmp, sizeof(zval *),NULL);
}
}
+ZEND_API inline int add_next_index_bool(zval *arg, int b)
+{
+ zval *tmp = (zval *) emalloc(sizeof(zval));
+
+ tmp->type = IS_BOOL;
+ tmp->value.lval = b;
+ INIT_PZVAL(tmp);
+ return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
+}
+
+
+ZEND_API inline int add_next_index_resource(zval *arg, int r)
+{
+ zval *tmp = (zval *) emalloc(sizeof(zval));
+
+ tmp->type = IS_RESOURCE;
+ tmp->value.lval = r;
+ INIT_PZVAL(tmp);
+ return zend_hash_next_index_insert(arg->value.ht, &tmp, sizeof(zval *), NULL);
+}
+
+
ZEND_API inline int add_next_index_double(zval *arg, double d)
{
zval *tmp = (zval *) emalloc(sizeof(zval));
ZEND_API int array_init(zval *arg);
ZEND_API int object_init(zval *arg);
ZEND_API int object_init_ex(zval *arg, zend_class_entry *ce);
+
+/* no longer supported */
+ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
+
ZEND_API int add_assoc_long(zval *arg, char *key, long n);
+ZEND_API int add_assoc_bool(zval *arg, char *key, int b);
+ZEND_API int add_assoc_resource(zval *arg, char *key, int r);
ZEND_API int add_assoc_double(zval *arg, char *key, double d);
ZEND_API int add_assoc_string(zval *arg, char *key, char *str, int duplicate);
ZEND_API int add_assoc_stringl(zval *arg, char *key, char *str, uint length, int duplicate);
-ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
+
ZEND_API int add_index_long(zval *arg, uint idx, long n);
+ZEND_API int add_index_bool(zval *arg, uint idx, int b);
+ZEND_API int add_index_resource(zval *arg, uint idx, int r);
ZEND_API int add_index_double(zval *arg, uint idx, double d);
ZEND_API int add_index_string(zval *arg, uint idx, char *str, int duplicate);
ZEND_API int add_index_stringl(zval *arg, uint idx, char *str, uint length, int duplicate);
+
ZEND_API int add_next_index_long(zval *arg, long n);
+ZEND_API int add_next_index_bool(zval *arg, int b);
+ZEND_API int add_next_index_resource(zval *arg, int r);
ZEND_API int add_next_index_double(zval *arg, double d);
ZEND_API int add_next_index_string(zval *arg, char *str, int duplicate);
ZEND_API int add_next_index_stringl(zval *arg, char *str, uint length, int duplicate);
-ZEND_API int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate);
-ZEND_API int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate);
ZEND_API int add_get_index_long(zval *arg, uint idx, long l, void **dest);
ZEND_API int add_get_index_double(zval *arg, uint idx, double d, void **dest);
+ZEND_API int add_get_assoc_string(zval *arg, char *key, char *str, void **dest, int duplicate);
+ZEND_API int add_get_assoc_stringl(zval *arg, char *key, char *str, uint length, void **dest, int duplicate);
ZEND_API int add_get_index_string(zval *arg, uint idx, char *str, void **dest, int duplicate);
ZEND_API int add_get_index_stringl(zval *arg, uint idx, char *str, uint length, void **dest, int duplicate);
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval, int param_count, zval *params[]);
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval, int param_count, zval **params[], int no_separation);
-
ZEND_API int add_property_long(zval *arg, char *key, long l);
ZEND_API int add_property_resource(zval *arg, char *key, long r);
ZEND_API int add_property_double(zval *arg, char *key, double d);