File tree 1 file changed +1
-14
lines changed
1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -38,18 +38,10 @@ typedef struct {
38
38
DWORD engine_thread ;
39
39
LONG refcount ;
40
40
php_stream * stream ;
41
- zend_resource * res ;
42
41
} php_istream ;
43
42
44
- static int le_istream ;
45
43
static void istream_destructor (php_istream * stm );
46
44
47
- static void istream_dtor (zend_resource * rsrc )
48
- {
49
- php_istream * stm = (php_istream * )rsrc -> ptr ;
50
- istream_destructor (stm );
51
- }
52
-
53
45
#define FETCH_STM () \
54
46
php_istream *stm = (php_istream*)This; \
55
47
if (GetCurrentThreadId() != stm->engine_thread) \
@@ -93,8 +85,7 @@ static ULONG STDMETHODCALLTYPE stm_release(IStream *This)
93
85
ret = InterlockedDecrement (& stm -> refcount );
94
86
if (ret == 0 ) {
95
87
/* destroy it */
96
- if (stm -> res )
97
- zend_list_delete (stm -> res );
88
+ istream_destructor (stm );
98
89
}
99
90
return ret ;
100
91
}
@@ -271,7 +262,6 @@ PHP_COM_DOTNET_API IStream *php_com_wrapper_export_stream(php_stream *stream)
271
262
stm -> stream = stream ;
272
263
273
264
GC_ADDREF (stream -> res );
274
- stm -> res = zend_register_resource (stm , le_istream );
275
265
276
266
return (IStream * )stm ;
277
267
}
@@ -722,7 +712,4 @@ void php_com_persist_minit(INIT_FUNC_ARGS)
722
712
helper_ce = register_class_COMPersistHelper ();
723
713
helper_ce -> create_object = helper_new ;
724
714
helper_ce -> default_object_handlers = & helper_handlers ;
725
-
726
- le_istream = zend_register_list_destructors_ex (istream_dtor ,
727
- NULL , "com_dotnet_istream_wrapper" , module_number );
728
715
}
You can’t perform that action at this time.
0 commit comments