summaryrefslogtreecommitdiff
path: root/ext/com_dotnet
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2004-10-09 13:08:16 +0000
committerWez Furlong <wez@php.net>2004-10-09 13:08:16 +0000
commit9bffcfb407ba515906e616407a5fd133957e2394 (patch)
treef458781828134fa091542a55491797feafb0d245 /ext/com_dotnet
parenta86095fe07bb396b8940ce6b3840c0df303d5912 (diff)
downloadphp-git-9bffcfb407ba515906e616407a5fd133957e2394.tar.gz
Fix crash bug.
# how the f*** did this work in the first place!?
Diffstat (limited to 'ext/com_dotnet')
-rw-r--r--ext/com_dotnet/com_typeinfo.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c
index ed521d1233..9a10376d0b 100644
--- a/ext/com_dotnet/com_typeinfo.c
+++ b/ext/com_dotnet/com_typeinfo.c
@@ -227,34 +227,35 @@ void php_com_typelibrary_dtor(void *pDest)
PHPAPI ITypeLib *php_com_load_typelib_via_cache(char *search_string,
int codepage, int *cached TSRMLS_DC)
{
- ITypeLib **TL;
+ ITypeLib **TLp;
+ ITypeLib *TL;
char *name_dup;
int l;
l = strlen(search_string);
if (zend_ts_hash_find(&php_com_typelibraries, search_string, l+1,
- (void**)&TL) == SUCCESS) {
+ (void**)&TLp) == SUCCESS) {
*cached = 1;
/* add a reference for the caller */
- ITypeLib_AddRef(*TL);
- return *TL;
+ ITypeLib_AddRef(*TLp);
+ return *TLp;
}
*cached = 0;
name_dup = estrndup(search_string, l);
- *TL = php_com_load_typelib(name_dup, codepage TSRMLS_CC);
+ TL = php_com_load_typelib(name_dup, codepage TSRMLS_CC);
efree(name_dup);
- if (*TL) {
+ if (TL) {
if (SUCCESS == zend_ts_hash_update(&php_com_typelibraries,
- search_string, l+1, (void*)*TL, sizeof(ITypeLib*), NULL)) {
+ search_string, l+1, (void*)TL, sizeof(ITypeLib*), NULL)) {
/* add a reference for the hash table */
- ITypeLib_AddRef(*TL);
+ ITypeLib_AddRef(TL);
}
}
- return *TL;
+ return TL;
}
ITypeInfo *php_com_locate_typeinfo(char *typelibname, php_com_dotnet_object *obj, char *dispname, int sink TSRMLS_DC)