Skip to content

Commit fd879bf

Browse files
committed
fix build
1 parent eb7d107 commit fd879bf

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

ext/com_dotnet/com_handlers.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static void function_dtor(void *pDest)
246246
{
247247
zend_internal_function *f = (zend_internal_function*)pDest;
248248

249-
efree(f->function_name);
249+
efree(f->function_name.s);
250250
if (f->arg_info) {
251251
efree(f->arg_info);
252252
}
@@ -284,7 +284,7 @@ static union _zend_function *com_method_get(zval **object_ptr, char *name, int l
284284
f.arg_info = NULL;
285285
f.scope = obj->ce;
286286
f.fn_flags = 0;
287-
f.function_name = estrndup(name, len);
287+
f.function_name.s = estrndup(name, len);
288288
f.handler = PHP_FN(com_method_handler);
289289

290290
fptr = &f;
@@ -417,7 +417,7 @@ static union _zend_function *com_constructor_get(zval *object TSRMLS_DC)
417417
f.handler = ZEND_FN(fn); \
418418
return (union _zend_function*)&f;
419419

420-
switch (obj->ce->name[0]) {
420+
switch (obj->ce->name.s[0]) {
421421
#if HAVE_MSCOREE_H
422422
case 'd':
423423
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_
447447
php_com_dotnet_object *obj;
448448
obj = CDNO_FETCH(object);
449449

450-
*class_name = estrndup(obj->ce->name, obj->ce->name_length);
450+
*class_name = estrndup(obj->ce->name.s, obj->ce->name_length);
451451
*class_name_len = obj->ce->name_length;
452452

453453
return 0;

ext/com_dotnet/com_saproxy.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ static zend_class_entry *saproxy_class_entry_get(zval *object TSRMLS_DC)
347347

348348
static int saproxy_class_name_get(zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC)
349349
{
350-
*class_name = estrndup(php_com_saproxy_class_entry->name, php_com_saproxy_class_entry->name_length);
350+
*class_name = estrndup(php_com_saproxy_class_entry->name.s, php_com_saproxy_class_entry->name_length);
351351
*class_name_len = php_com_saproxy_class_entry->name_length;
352352
return 0;
353353
}

ext/com_dotnet/com_typeinfo.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,17 @@ PHPAPI int php_com_import_typelib(ITypeLib *TL, int mode, int codepage TSRMLS_DC
185185
}
186186

187187
const_name = php_com_olestring_to_string(bstr_ids, &c.name_len, codepage TSRMLS_CC);
188-
c.name = zend_strndup(const_name, c.name_len);
188+
c.name.s = zend_strndup(const_name, c.name_len);
189189
efree(const_name);
190190
c.name_len++; /* include NUL */
191191
SysFreeString(bstr_ids);
192192

193193
/* sanity check for the case where the constant is already defined */
194-
if (zend_get_constant(c.name, c.name_len - 1, &exists TSRMLS_CC)) {
194+
if (zend_get_constant(c.name.s, c.name_len - 1, &exists TSRMLS_CC)) {
195195
if (COMG(autoreg_verbose) && !compare_function(&results, &c.value, &exists TSRMLS_CC)) {
196196
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Type library constant %s is already defined", c.name);
197197
}
198-
free(c.name);
198+
free(c.name.s);
199199
ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc);
200200
continue;
201201
}

ext/com_dotnet/php_com_dotnet_internal.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ typedef struct _php_com_dotnet_object {
5656
static inline int php_com_is_valid_object(zval *zv TSRMLS_DC)
5757
{
5858
zend_class_entry *ce = Z_OBJCE_P(zv);
59-
return strcmp("com", ce->name) == 0 ||
60-
strcmp("dotnet", ce->name) == 0 ||
61-
strcmp("variant", ce->name) == 0;
59+
return strcmp("com", ce->name.s) == 0 ||
60+
strcmp("dotnet", ce->name.s) == 0 ||
61+
strcmp("variant", ce->name.s) == 0;
6262
}
6363

6464
#define CDNO_FETCH(zv) (php_com_dotnet_object*)zend_object_store_get_object(zv TSRMLS_CC)

0 commit comments

Comments
 (0)