Skip to content

Commit ee02e4b

Browse files
authored
Fix violation of the one definition rule in ext/com_dotnet (GH-15327)
The definition of the class entries in the internal header file is not correct, since that file is included several times, and even the comment above the definition hints at com_extension.c where the actual definition is. We fix this by declaring these variables as `extern`.
1 parent d98c4b6 commit ee02e4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/com_dotnet/php_com_dotnet_internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static inline bool php_com_is_valid_object(zval *zv)
6666
} while(0)
6767

6868
/* com_extension.c */
69-
zend_class_entry *php_com_variant_class_entry, *php_com_exception_class_entry, *php_com_saproxy_class_entry;
69+
extern zend_class_entry *php_com_variant_class_entry, *php_com_exception_class_entry, *php_com_saproxy_class_entry;
7070

7171
/* com_handlers.c */
7272
zend_object* php_com_object_new(zend_class_entry *ce);

0 commit comments

Comments
 (0)