cvs: php4 /ext/com COM.c
| From: | Harald Radi | Date: | Fri, 21 Jun 2002 10:35:33 +0000 |
| Subject: | cvs: php4 /ext/com COM.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12432@lists.php.net to get a copy of this message | ||
phanto Fri Jun 21 06:35:33 2002 EDT
Modified files:
/php4/ext/com COM.c
Log:
removed CONST_EFREE_PERSISTENT so that andi can commit his patch
# second try
Index: php4/ext/com/COM.c
diff -u php4/ext/com/COM.c:1.81 php4/ext/com/COM.c:1.82
--- php4/ext/com/COM.c:1.81 Fri Jun 21 06:02:26 2002
+++ php4/ext/com/COM.c Fri Jun 21 06:35:33 2002
@@ -18,7 +18,7 @@
| Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: COM.c,v 1.81 2002/06/21 10:02:26 phanto Exp $ */
+/* $Id: COM.c,v 1.82 2002/06/21 10:35:33 phanto Exp $ */
/*
* This module implements support for COM components that support the IDispatch
* interface. Both local (COM) and remote (DCOM) components can be accessed.
@@ -2194,7 +2194,7 @@
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 @@
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++;
}