File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed
Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -38,18 +38,10 @@ typedef struct {
3838 DWORD engine_thread ;
3939 LONG refcount ;
4040 php_stream * stream ;
41- zend_resource * res ;
4241} php_istream ;
4342
44- static int le_istream ;
4543static void istream_destructor (php_istream * stm );
4644
47- static void istream_dtor (zend_resource * rsrc )
48- {
49- php_istream * stm = (php_istream * )rsrc -> ptr ;
50- istream_destructor (stm );
51- }
52-
5345#define FETCH_STM () \
5446 php_istream *stm = (php_istream*)This; \
5547 if (GetCurrentThreadId() != stm->engine_thread) \
@@ -93,8 +85,7 @@ static ULONG STDMETHODCALLTYPE stm_release(IStream *This)
9385 ret = InterlockedDecrement (& stm -> refcount );
9486 if (ret == 0 ) {
9587 /* destroy it */
96- if (stm -> res )
97- zend_list_delete (stm -> res );
88+ istream_destructor (stm );
9889 }
9990 return ret ;
10091}
@@ -271,7 +262,6 @@ PHP_COM_DOTNET_API IStream *php_com_wrapper_export_stream(php_stream *stream)
271262 stm -> stream = stream ;
272263
273264 GC_ADDREF (stream -> res );
274- stm -> res = zend_register_resource (stm , le_istream );
275265
276266 return (IStream * )stm ;
277267}
@@ -722,7 +712,4 @@ void php_com_persist_minit(INIT_FUNC_ARGS)
722712 helper_ce = register_class_COMPersistHelper ();
723713 helper_ce -> create_object = helper_new ;
724714 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 );
728715}
You can’t perform that action at this time.
0 commit comments