Skip to content

Commit

Permalink
Extern declare protobuf_globals (#6946)
Browse files Browse the repository at this point in the history
  • Loading branch information
TeBoring committed Nov 27, 2019
1 parent ab5b61b commit e69c939
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions php/ext/google/protobuf/protobuf.c
Expand Up @@ -39,6 +39,8 @@ static PHP_RSHUTDOWN_FUNCTION(protobuf);
static PHP_MINIT_FUNCTION(protobuf);
static PHP_MSHUTDOWN_FUNCTION(protobuf);

ZEND_DECLARE_MODULE_GLOBALS(protobuf)

// Global map from upb {msg,enum}defs to wrapper Descriptor/EnumDescriptor
// instances.
static HashTable* upb_def_to_php_obj_map;
Expand Down
2 changes: 1 addition & 1 deletion php/ext/google/protobuf/protobuf.h
Expand Up @@ -689,7 +689,7 @@ ZEND_BEGIN_MODULE_GLOBALS(protobuf)
zend_bool keep_descriptor_pool_after_request;
ZEND_END_MODULE_GLOBALS(protobuf)

ZEND_DECLARE_MODULE_GLOBALS(protobuf)
ZEND_EXTERN_MODULE_GLOBALS(protobuf)

#ifdef ZTS
#define PROTOBUF_G(v) TSRMG(protobuf_globals_id, zend_protobuf_globals *, v)
Expand Down

0 comments on commit e69c939

Please sign in to comment.