[Wine-patches] [eter-2.1 1/2] Revert "oleaut32: Keep buffer in a bucket for smaller buffers if accurate bucket is full. (eterbug #8330)"

Dmitry Timoshkov dtimoshkov на etersoft.ru
Чт Фев 14 12:07:11 MSK 2013


This reverts commit 1b4b54ae44e3f0107079a3e9fdafd0eddd743b5a.
---
 dlls/oleaut32/oleaut.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c
index 2874b1c..250a812 100644
--- a/dlls/oleaut32/oleaut.c
+++ b/dlls/oleaut32/oleaut.c
@@ -259,17 +259,7 @@ void WINAPI SysFreeString(BSTR str)
     if(cache_entry) {
         EnterCriticalSection(&cs_bstr_cache);
 
-        if(cache_entry->cnt == sizeof(cache_entry->buf)/sizeof(*cache_entry->buf)) {
-            if(cache_entry > bstr_cache) {
-                cache_entry--;
-                if(cache_entry->cnt == sizeof(cache_entry->buf)/sizeof(*cache_entry->buf))
-                    cache_entry = NULL;
-            }else {
-                cache_entry = NULL;
-            }
-        }
-
-        if(cache_entry) {
+        if(cache_entry->cnt < sizeof(cache_entry->buf)/sizeof(*cache_entry->buf)) {
             cache_entry->buf[(cache_entry->head+cache_entry->cnt)%((sizeof(cache_entry->buf)/sizeof(*cache_entry->buf)))] = bstr;
             cache_entry->cnt++;
 
-- 
1.8.1.3



Подробная информация о списке рассылки Wine-patches