summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_list.c37
-rw-r--r--Zend/zend_list.h3
2 files changed, 3 insertions, 37 deletions
diff --git a/Zend/zend_list.c b/Zend/zend_list.c
index feffc63458..8a800a0729 100644
--- a/Zend/zend_list.c
+++ b/Zend/zend_list.c
@@ -31,7 +31,7 @@ ZEND_API int le_index_ptr;
static HashTable list_destructors;
-static inline int zend_list_do_insert(HashTable *list, void *ptr, int type, zend_bool valid)
+static inline int zend_list_do_insert(HashTable *list, void *ptr, int type)
{
int index;
zend_rsrc_list_entry le;
@@ -43,7 +43,6 @@ static inline int zend_list_do_insert(HashTable *list, void *ptr, int type, zend
le.ptr=ptr;
le.type=type;
le.refcount=1;
- le.valid = valid;
zend_hash_index_update(list, index, (void *) &le, sizeof(zend_rsrc_list_entry), NULL);
return index;
}
@@ -84,7 +83,7 @@ ZEND_API int zend_list_insert(void *ptr, int type)
{
ELS_FETCH();
- return zend_list_do_insert(&EG(regular_list), ptr, type, 1);
+ return zend_list_do_insert(&EG(regular_list), ptr, type);
}
@@ -92,7 +91,7 @@ ZEND_API int zend_plist_insert(void *ptr, int type)
{
ELS_FETCH();
- return zend_list_do_insert(&EG(persistent_list), ptr, type, 1);
+ return zend_list_do_insert(&EG(persistent_list), ptr, type);
}
@@ -127,20 +126,6 @@ ZEND_API int zend_plist_delete(int id)
}
-ZEND_API int zend_list_convert_to_number(int id)
-{
- zend_rsrc_list_entry *le;
- ELS_FETCH();
-
- if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS
- && le->valid) {
- return id;
- }
- return 0;
-}
-
-
-
ZEND_API void *zend_list_find(int id, int *type)
{
ELS_FETCH();
@@ -172,22 +157,6 @@ ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int r
}
-ZEND_API int zend_register_false_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
-{
- int rsrc_id;
- ELS_FETCH();
-
- rsrc_id = zend_list_do_insert(&EG(regular_list), rsrc_pointer, rsrc_type, 0);
-
- if (rsrc_result) {
- rsrc_result->value.lval = rsrc_id;
- rsrc_result->type = IS_RESOURCE;
- }
-
- return rsrc_id;
-}
-
-
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...)
{
int id;
diff --git a/Zend/zend_list.h b/Zend/zend_list.h
index 736a99bd86..4d9c3fb825 100644
--- a/Zend/zend_list.h
+++ b/Zend/zend_list.h
@@ -32,7 +32,6 @@ typedef struct _zend_rsrc_list_entry {
void *ptr;
int type;
int refcount;
- zend_bool valid;
} zend_rsrc_list_entry;
typedef void (*rsrc_dtor_func_t)(zend_rsrc_list_entry *rsrc);
@@ -79,12 +78,10 @@ ZEND_API int zend_plist_insert(void *ptr, int type);
ZEND_API int zend_list_addref(int id);
ZEND_API int zend_list_delete(int id);
ZEND_API int zend_plist_delete(int id);
-ZEND_API int zend_list_convert_to_number(int id);
ZEND_API void *zend_list_find(int id, int *type);
ZEND_API void *zend_plist_find(int id, int *type);
ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
-ZEND_API int zend_register_false_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
ZEND_API void *zend_fetch_resource(zval **passed_id, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...);
ZEND_API char *zend_rsrc_list_get_rsrc_type(int resource);