summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/php_com_dotnet_internal.h
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2019-07-01 10:18:19 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2019-07-08 10:31:36 +0200
commit98b6330ab45732dcb16bb714d66ca1d987531406 (patch)
tree422c9a771bc0ec4a2d73efa6c3f79fe3e840d91c /ext/com_dotnet/php_com_dotnet_internal.h
parenta39ea91753c5d131ff802ee394ee23ce2f37d7f4 (diff)
downloadphp-git-98b6330ab45732dcb16bb714d66ca1d987531406.tar.gz
Fix TsHashTable related race conditions
Although TsHashTable and the according API are supposed to easily make a HashTable thread-safe, they do not; for instance, there can be race conditions between finding and updating entries. We therefore avoid the usage of TsHashTable in favor of a HashTable with our own mutex management. The patch has been provided by krakjoe@php.net; I only did some minor fixes and tweaks.
Diffstat (limited to 'ext/com_dotnet/php_com_dotnet_internal.h')
-rw-r--r--ext/com_dotnet/php_com_dotnet_internal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/com_dotnet/php_com_dotnet_internal.h b/ext/com_dotnet/php_com_dotnet_internal.h
index e41b7ffdd1..676d2f9330 100644
--- a/ext/com_dotnet/php_com_dotnet_internal.h
+++ b/ext/com_dotnet/php_com_dotnet_internal.h
@@ -27,8 +27,6 @@
#include <dispex.h>
#include "win32/winutil.h"
-#include "zend_ts_hash.h"
-
typedef struct _php_com_dotnet_object {
zend_object zo;
@@ -70,7 +68,6 @@ static inline int php_com_is_valid_object(zval *zv)
} while(0)
/* com_extension.c */
-TsHashTable php_com_typelibraries;
zend_class_entry *php_com_variant_class_entry, *php_com_exception_class_entry, *php_com_saproxy_class_entry;
/* com_handlers.c */
@@ -175,6 +172,9 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode,
void php_com_typelibrary_dtor(zval *pDest);
ITypeInfo *php_com_locate_typeinfo(char *typelibname, php_com_dotnet_object *obj, char *dispname, int sink);
int php_com_process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int printdef, GUID *guid, int codepage);
+ITypeLib *php_com_cache_typelib(ITypeLib* TL, char *cache_key, zend_long cache_key_len);
+PHP_MINIT_FUNCTION(com_typeinfo);
+PHP_MSHUTDOWN_FUNCTION(com_typeinfo);
/* com_iterator.c */
zend_object_iterator *php_com_iter_get(zend_class_entry *ce, zval *object, int by_ref);