This commit is contained in:
Anatol Belski 2018-07-26 13:58:08 +02:00
parent f374e93762
commit 6059ecee3a

View File

@ -207,9 +207,8 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepa
/* register the constant */ /* register the constant */
php_com_zval_from_variant(&value, pVarDesc->lpvarValue, codepage); php_com_zval_from_variant(&value, pVarDesc->lpvarValue, codepage);
if (Z_TYPE(value) == IS_LONG) { if (Z_TYPE(value) == IS_LONG) {
c.flags = mode; ZEND_CONSTANT_SET_FLAGS(&c, mode, 0);
ZVAL_LONG(&c.value, Z_LVAL(value)); ZVAL_LONG(&c.value, Z_LVAL(value));
c.module_number = 0;
zend_register_constant(&c); zend_register_constant(&c);
} }
ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc); ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc);