diff options
author | Harald Radi <phanto@php.net> | 2002-06-21 10:35:33 +0000 |
---|---|---|
committer | Harald Radi <phanto@php.net> | 2002-06-21 10:35:33 +0000 |
commit | 5dbd205bf761512b333868e13c477e1b53e31954 (patch) | |
tree | 2e33741d813343b7f4e4b299dd96a3ff9dafb0d9 | |
parent | ed1b5c0388a8fb8e736e3eca42db38e3fb30b2ae (diff) | |
download | php-git-5dbd205bf761512b333868e13c477e1b53e31954.tar.gz |
removed CONST_EFREE_PERSISTENT so that andi can commit his patch
# second try
-rw-r--r-- | ext/com/COM.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ext/com/COM.c b/ext/com/COM.c index cbf9594e1c..cb315d35bc 100644 --- a/ext/com/COM.c +++ b/ext/com/COM.c @@ -2194,7 +2194,7 @@ PHPAPI int php_COM_load_typelib(ITypeLib *TypeLib, int mode TSRMLS_DC) while (SUCCEEDED(TypeInfo->lpVtbl->GetVarDesc(TypeInfo, j, &pVarDesc))) { BSTR bstr_ids; zend_constant c; - zval exists, results; + zval exists, results, value; char *const_name; TypeInfo->lpVtbl->GetNames(TypeInfo, pVarDesc->memid, &bstr_ids, 1, &NameCount); @@ -2220,10 +2220,17 @@ PHPAPI int php_COM_load_typelib(ITypeLib *TypeLib, int mode TSRMLS_DC) continue; } - php_variant_to_pval(pVarDesc->lpvarValue, &c.value, codepage TSRMLS_CC); - c.flags = mode; + php_variant_to_pval(pVarDesc->lpvarValue, &value, codepage TSRMLS_CC); + /* we only import enumerations (=int) */ + if (value.type == IS_LONG) { + c.flags = mode; + c.value.type = IS_LONG; + c.value.value.lval = value.value.lval; + c.module_number = 0; /* the module number is not available here */ - zend_register_constant(&c TSRMLS_CC); + zend_register_constant(&c TSRMLS_CC); + } + efree(value); j++; } |