summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_API.c8
-rw-r--r--Zend/zend_API.h18
-rw-r--r--ext/ingres_ii/ii.c4
-rw-r--r--ext/mysql/php_mysql.c4
-rw-r--r--ext/pgsql/pgsql.c4
-rw-r--r--ext/standard/scanf.c2
6 files changed, 23 insertions, 17 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 2877f51a00..02d21904ac 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -237,7 +237,7 @@ ZEND_API inline int add_assoc_long_ex(zval *arg, char *key, uint key_len, long n
return zend_hash_update(Z_ARRVAL_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
-ZEND_API inline int add_assoc_unset_ex(zval *arg, char *key, uint key_len)
+ZEND_API inline int add_assoc_null_ex(zval *arg, char *key, uint key_len)
{
zval *tmp;
@@ -317,7 +317,7 @@ ZEND_API inline int add_index_long(zval *arg, uint index, long n)
}
-ZEND_API inline int add_index_unset(zval *arg, uint index)
+ZEND_API inline int add_index_null(zval *arg, uint index)
{
zval *tmp;
@@ -399,7 +399,7 @@ ZEND_API inline int add_next_index_long(zval *arg, long n)
}
-ZEND_API inline int add_next_index_unset(zval *arg)
+ZEND_API inline int add_next_index_null(zval *arg)
{
zval *tmp;
@@ -557,7 +557,7 @@ ZEND_API inline int add_property_bool_ex(zval *arg, char *key, uint key_len, int
return zend_hash_update(Z_OBJPROP_P(arg), key, key_len, (void *) &tmp, sizeof(zval *), NULL);
}
-ZEND_API inline int add_property_unset_ex(zval *arg, char *key, uint key_len)
+ZEND_API inline int add_property_null_ex(zval *arg, char *key, uint key_len)
{
zval *tmp;
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 2a390f6bb5..4759026eb7 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -147,7 +147,7 @@ ZEND_API int _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC);
ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
ZEND_API int add_assoc_long_ex(zval *arg, char *key, uint key_len, long n);
-ZEND_API int add_assoc_unset_ex(zval *arg, char *key, uint key_len);
+ZEND_API int add_assoc_null_ex(zval *arg, char *key, uint key_len);
ZEND_API int add_assoc_bool_ex(zval *arg, char *key, uint key_len, int b);
ZEND_API int add_assoc_resource_ex(zval *arg, char *key, uint key_len, int r);
ZEND_API int add_assoc_double_ex(zval *arg, char *key, uint key_len, double d);
@@ -156,7 +156,7 @@ ZEND_API int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str,
ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value);
#define add_assoc_long(__arg, __key, __n) add_assoc_long_ex(__arg, __key, strlen(__key)+1, __n)
-#define add_assoc_unset(__arg, __key) add_assoc_unset_ex(__arg, __key, strlen(__key) + 1)
+#define add_assoc_null(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key) + 1)
#define add_assoc_bool(__arg, __key, __b) add_assoc_bool_ex(__arg, __key, strlen(__key)+1, __b)
#define add_assoc_resource(__arg, __key, __r) add_assoc_resource_ex(__arg, __key, strlen(__key)+1, __r)
#define add_assoc_double(__arg, __key, __d) add_assoc_double_ex(__arg, __key, strlen(__key)+1, __d)
@@ -164,8 +164,14 @@ ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value);
#define add_assoc_stringl(__arg, __key, __str, __length, __duplicate) add_assoc_stringl_ex(__arg, __key, strlen(__key)+1, __str, __length, __duplicate)
#define add_assoc_zval(__arg, __key, __value) add_assoc_zval_ex(__arg, __key, strlen(__key)+1, __value)
+/* unset() functions are only suported for legacy modules and null() functions should be used */
+#define add_assoc_unset(__arg, __key) add_assoc_null_ex(__arg, __key, strlen(__key) + 1)
+#define add_index_unset(__arg, __key) add_index_null(__arg, __key)
+#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, uint idx, long n);
-ZEND_API int add_index_unset(zval *arg, uint idx);
+ZEND_API int add_index_null(zval *arg, uint idx);
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);
@@ -174,7 +180,7 @@ ZEND_API int add_index_stringl(zval *arg, uint idx, char *str, uint length, int
ZEND_API int add_index_zval(zval *arg, uint index, zval *value);
ZEND_API int add_next_index_long(zval *arg, long n);
-ZEND_API int add_next_index_unset(zval *arg);
+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, int r);
ZEND_API int add_next_index_double(zval *arg, double d);
@@ -194,7 +200,7 @@ ZEND_API int add_get_index_string(zval *arg, uint idx, char *str, void **dest, i
ZEND_API int add_get_index_stringl(zval *arg, uint idx, char *str, uint length, void **dest, int duplicate);
ZEND_API int add_property_long_ex(zval *arg, char *key, uint key_len, long l);
-ZEND_API int add_property_unset_ex(zval *arg, char *key, uint key_len);
+ZEND_API int add_property_null_ex(zval *arg, char *key, uint key_len);
ZEND_API int add_property_bool_ex(zval *arg, char *key, uint key_len, int b);
ZEND_API int add_property_resource_ex(zval *arg, char *key, uint key_len, long r);
ZEND_API int add_property_double_ex(zval *arg, char *key, uint key_len, double d);
@@ -203,7 +209,7 @@ ZEND_API int add_property_stringl_ex(zval *arg, char *key, uint key_len, char *
ZEND_API int add_property_zval_ex(zval *arg, char *key, uint key_len, zval *value);
#define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key)+1, __n)
-#define add_property_unset(__arg, __key) add_property_unset_ex(__arg, __key, strlen(__key) + 1)
+#define add_property_null(__arg, __key) add_property_null_ex(__arg, __key, strlen(__key) + 1)
#define add_property_bool(__arg, __key, __b) add_property_bool_ex(__arg, __key, strlen(__key)+1, __b)
#define add_property_resource(__arg, __key, __r) add_property_resource_ex(__arg, __key, strlen(__key)+1, __r)
#define add_property_double(__arg, __key, __d) add_property_double_ex(__arg, __key, strlen(__key)+1, __d)
diff --git a/ext/ingres_ii/ii.c b/ext/ingres_ii/ii.c
index 48dc87300a..2ed8187076 100644
--- a/ext/ingres_ii/ii.c
+++ b/ext/ingres_ii/ii.c
@@ -1065,10 +1065,10 @@ static void php_ii_fetch(INTERNAL_FUNCTION_PARAMETERS, II_LINK *ii_link, int res
if(columnData[k-1].dv_null) { /* NULL value ? */
if(result_type & II_NUM) {
- add_index_unset(return_value, i+k-1);
+ add_index_null(return_value, i+k-1);
}
if(result_type & II_ASSOC) {
- add_assoc_unset(return_value, php_ii_field_name(ii_link, i+k-1));
+ add_assoc_null(return_value, php_ii_field_name(ii_link, i+k-1));
}
} else { /* non NULL value */
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index db8ff01f7f..0acac78eb3 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -1425,9 +1425,9 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
} else {
/* NULL value. */
if (result_type & MYSQL_NUM)
- add_index_unset(return_value, i);
+ add_index_null(return_value, i);
else
- add_assoc_unset(return_value, mysql_field->name);
+ add_assoc_null(return_value, mysql_field->name);
}
}
}
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 4962ca92bc..5ee40eebaf 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -1049,11 +1049,11 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
for (i = 0, num_fields = PQnfields(pgsql_result); i<num_fields; i++) {
if (PQgetisnull(pgsql_result, Z_LVAL_PP(row), i)) {
if (result_type & PGSQL_NUM) {
- add_index_unset(return_value, i);
+ add_index_null(return_value, i);
}
if (result_type & PGSQL_ASSOC) {
field_name = PQfname(pgsql_result, i);
- add_assoc_unset(return_value, field_name);
+ add_assoc_null(return_value, field_name);
}
} else {
element = PQgetvalue(pgsql_result, Z_LVAL_PP(row), i);
diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c
index 38466e0007..22d6df0497 100644
--- a/ext/standard/scanf.c
+++ b/ext/standard/scanf.c
@@ -663,7 +663,7 @@ PHPAPI int php_sscanf_internal( char *string,char *format,
return FAILURE;
}
for (i = 0; i < totalVars; i++) {
- if (add_next_index_unset(*return_value) == FAILURE) {
+ if (add_next_index_null(*return_value) == FAILURE) {
scan_set_error_return(0, return_value);
return FAILURE;
}