]> granicus.if.org Git - php/commitdiff
fix build
authorFrank M. Kromann <fmk@php.net>
Sat, 29 Apr 2006 18:45:29 +0000 (18:45 +0000)
committerFrank M. Kromann <fmk@php.net>
Sat, 29 Apr 2006 18:45:29 +0000 (18:45 +0000)
ext/com_dotnet/com_handlers.c
ext/com_dotnet/com_saproxy.c
ext/com_dotnet/com_typeinfo.c
ext/com_dotnet/php_com_dotnet_internal.h

index 06ca1f120bf2088bcc8d7f74743f44d0bbc980d6..e96ac49d9d963086569228e3a69ccbbe05f57452 100644 (file)
@@ -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;
index 8cc0c5e64b66dd2abed60768a9eea94ace3ff227..35a93fbe62be40d39f36d4013e3fe9bc58f8159c 100644 (file)
@@ -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;
 }
index 6e57eafeb961edc6a322d6fce0bd3d07be6d9878..fd76fa639a874d450e078fd7e570e946a4325776 100644 (file)
@@ -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;
                                }
index 2cd0c2b960cabd602809c119e98c30356a766eff..db7dede22f8ff59cc702041cbab900021cac39d4 100644 (file)
@@ -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)