Skip to content

Commit e69c939

Browse files
authored
Extern declare protobuf_globals (#6946)
1 parent ab5b61b commit e69c939

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

php/ext/google/protobuf/protobuf.c

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ static PHP_RSHUTDOWN_FUNCTION(protobuf);
3939
static PHP_MINIT_FUNCTION(protobuf);
4040
static PHP_MSHUTDOWN_FUNCTION(protobuf);
4141

42+
ZEND_DECLARE_MODULE_GLOBALS(protobuf)
43+
4244
// Global map from upb {msg,enum}defs to wrapper Descriptor/EnumDescriptor
4345
// instances.
4446
static HashTable* upb_def_to_php_obj_map;

php/ext/google/protobuf/protobuf.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ ZEND_BEGIN_MODULE_GLOBALS(protobuf)
689689
zend_bool keep_descriptor_pool_after_request;
690690
ZEND_END_MODULE_GLOBALS(protobuf)
691691

692-
ZEND_DECLARE_MODULE_GLOBALS(protobuf)
692+
ZEND_EXTERN_MODULE_GLOBALS(protobuf)
693693

694694
#ifdef ZTS
695695
#define PROTOBUF_G(v) TSRMG(protobuf_globals_id, zend_protobuf_globals *, v)

0 commit comments

Comments
 (0)