kalle Thu, 23 Sep 2010 04:50:26 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=303710
Log: There are a few cases where we can save a TSRMLS_FETCH() call here Changed paths: U php/php-src/trunk/ext/com_dotnet/com_persist.c Modified: php/php-src/trunk/ext/com_dotnet/com_persist.c =================================================================== --- php/php-src/trunk/ext/com_dotnet/com_persist.c 2010-09-23 04:41:14 UTC (rev 303709) +++ php/php-src/trunk/ext/com_dotnet/com_persist.c 2010-09-23 04:50:26 UTC (rev 303710) @@ -58,13 +58,18 @@ TSRMLS_FETCH(); \ if (GetCurrentThreadId() != stm->engine_thread) \ return RPC_E_WRONG_THREAD; + +#define FETCH_STM_EX() \ + php_istream *stm = (php_istream*)This; \ + if (GetCurrentThreadId() != stm->engine_thread) \ + return RPC_E_WRONG_THREAD; static HRESULT STDMETHODCALLTYPE stm_queryinterface( IStream *This, /* [in] */ REFIID riid, /* [iid_is][out] */ void **ppvObject) { - FETCH_STM(); + FETCH_STM_EX(); if (IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IStream, riid)) { @@ -79,7 +84,7 @@ static ULONG STDMETHODCALLTYPE stm_addref(IStream *This) { - FETCH_STM(); + FETCH_STM_EX(); return InterlockedIncrement(&stm->refcount); } @@ -184,7 +189,7 @@ static HRESULT STDMETHODCALLTYPE stm_copy_to(IStream *This, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten) { - FETCH_STM(); + FETCH_STM_EX(); return E_NOTIMPL; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php