From fd879bff4e3b57ccd055fe4417405a6f2c04df5f Mon Sep 17 00:00:00 2001 From: "Frank M. Kromann" Date: Sat, 29 Apr 2006 18:45:29 +0000 Subject: [PATCH] fix build --- ext/com_dotnet/com_handlers.c | 8 ++++---- ext/com_dotnet/com_saproxy.c | 2 +- ext/com_dotnet/com_typeinfo.c | 6 +++--- ext/com_dotnet/php_com_dotnet_internal.h | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index 06ca1f120b..e96ac49d9d 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -246,7 +246,7 @@ static void function_dtor(void *pDest) { zend_internal_function *f = (zend_internal_function*)pDest; - efree(f->function_name); + efree(f->function_name.s); if (f->arg_info) { efree(f->arg_info); } @@ -284,7 +284,7 @@ static union _zend_function *com_method_get(zval **object_ptr, char *name, int l f.arg_info = NULL; f.scope = obj->ce; f.fn_flags = 0; - f.function_name = estrndup(name, len); + f.function_name.s = estrndup(name, len); f.handler = PHP_FN(com_method_handler); fptr = &f; @@ -417,7 +417,7 @@ static union _zend_function *com_constructor_get(zval *object TSRMLS_DC) f.handler = ZEND_FN(fn); \ return (union _zend_function*)&f; - switch (obj->ce->name[0]) { + switch (obj->ce->name.s[0]) { #if HAVE_MSCOREE_H case 'd': POPULATE_CTOR(d, com_dotnet_create_instance); @@ -447,7 +447,7 @@ static int com_class_name_get(zval *object, char **class_name, zend_uint *class_ php_com_dotnet_object *obj; obj = CDNO_FETCH(object); - *class_name = estrndup(obj->ce->name, obj->ce->name_length); + *class_name = estrndup(obj->ce->name.s, obj->ce->name_length); *class_name_len = obj->ce->name_length; return 0; diff --git a/ext/com_dotnet/com_saproxy.c b/ext/com_dotnet/com_saproxy.c index 8cc0c5e64b..35a93fbe62 100644 --- a/ext/com_dotnet/com_saproxy.c +++ b/ext/com_dotnet/com_saproxy.c @@ -347,7 +347,7 @@ static zend_class_entry *saproxy_class_entry_get(zval *object TSRMLS_DC) static int saproxy_class_name_get(zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC) { - *class_name = estrndup(php_com_saproxy_class_entry->name, php_com_saproxy_class_entry->name_length); + *class_name = estrndup(php_com_saproxy_class_entry->name.s, php_com_saproxy_class_entry->name_length); *class_name_len = php_com_saproxy_class_entry->name_length; return 0; } diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c index 6e57eafeb9..fd76fa639a 100644 --- a/ext/com_dotnet/com_typeinfo.c +++ b/ext/com_dotnet/com_typeinfo.c @@ -185,17 +185,17 @@ PHPAPI int php_com_import_typelib(ITypeLib *TL, int mode, int codepage TSRMLS_DC } const_name = php_com_olestring_to_string(bstr_ids, &c.name_len, codepage TSRMLS_CC); - c.name = zend_strndup(const_name, c.name_len); + c.name.s = zend_strndup(const_name, c.name_len); efree(const_name); c.name_len++; /* include NUL */ SysFreeString(bstr_ids); /* sanity check for the case where the constant is already defined */ - if (zend_get_constant(c.name, c.name_len - 1, &exists TSRMLS_CC)) { + if (zend_get_constant(c.name.s, c.name_len - 1, &exists TSRMLS_CC)) { if (COMG(autoreg_verbose) && !compare_function(&results, &c.value, &exists TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Type library constant %s is already defined", c.name); } - free(c.name); + free(c.name.s); ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc); continue; } diff --git a/ext/com_dotnet/php_com_dotnet_internal.h b/ext/com_dotnet/php_com_dotnet_internal.h index 2cd0c2b960..db7dede22f 100644 --- a/ext/com_dotnet/php_com_dotnet_internal.h +++ b/ext/com_dotnet/php_com_dotnet_internal.h @@ -56,9 +56,9 @@ typedef struct _php_com_dotnet_object { static inline int php_com_is_valid_object(zval *zv TSRMLS_DC) { zend_class_entry *ce = Z_OBJCE_P(zv); - return strcmp("com", ce->name) == 0 || - strcmp("dotnet", ce->name) == 0 || - strcmp("variant", ce->name) == 0; + return strcmp("com", ce->name.s) == 0 || + strcmp("dotnet", ce->name.s) == 0 || + strcmp("variant", ce->name.s) == 0; } #define CDNO_FETCH(zv) (php_com_dotnet_object*)zend_object_store_get_object(zv TSRMLS_CC) -- 2.40.0