aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/ext/google/protobuf/protobuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'php/ext/google/protobuf/protobuf.c')
-rw-r--r--php/ext/google/protobuf/protobuf.c46
1 files changed, 45 insertions, 1 deletions
diff --git a/php/ext/google/protobuf/protobuf.c b/php/ext/google/protobuf/protobuf.c
index 265d636e..da00302f 100644
--- a/php/ext/google/protobuf/protobuf.c
+++ b/php/ext/google/protobuf/protobuf.c
@@ -145,6 +145,21 @@ PHP_PROTO_HASHTABLE_VALUE get_proto_obj(const char* proto) {
}
// -----------------------------------------------------------------------------
+// Well Known Types.
+// -----------------------------------------------------------------------------
+
+bool is_inited_file_any;
+bool is_inited_file_api;
+bool is_inited_file_duration;
+bool is_inited_file_field_mask;
+bool is_inited_file_empty;
+bool is_inited_file_source_context;
+bool is_inited_file_struct;
+bool is_inited_file_timestamp;
+bool is_inited_file_type;
+bool is_inited_file_wrappers;
+
+// -----------------------------------------------------------------------------
// Reserved Name.
// -----------------------------------------------------------------------------
@@ -182,8 +197,15 @@ zend_function_entry protobuf_functions[] = {
ZEND_FE_END
};
+static const zend_module_dep protobuf_deps[] = {
+ ZEND_MOD_OPTIONAL("date")
+ ZEND_MOD_END
+};
+
zend_module_entry protobuf_module_entry = {
- STANDARD_MODULE_HEADER,
+ STANDARD_MODULE_HEADER_EX,
+ NULL,
+ protobuf_deps,
PHP_PROTOBUF_EXTNAME, // extension name
protobuf_functions, // function list
PHP_MINIT(protobuf), // process startup
@@ -243,6 +265,17 @@ static PHP_RINIT_FUNCTION(protobuf) {
generated_pool_php = NULL;
internal_generated_pool_php = NULL;
+ is_inited_file_any = false;
+ is_inited_file_api = false;
+ is_inited_file_duration = false;
+ is_inited_file_field_mask = false;
+ is_inited_file_empty = false;
+ is_inited_file_source_context = false;
+ is_inited_file_struct = false;
+ is_inited_file_timestamp = false;
+ is_inited_file_type = false;
+ is_inited_file_wrappers = false;
+
return 0;
}
@@ -281,6 +314,17 @@ static PHP_RSHUTDOWN_FUNCTION(protobuf) {
}
#endif
+ is_inited_file_any = true;
+ is_inited_file_api = true;
+ is_inited_file_duration = true;
+ is_inited_file_field_mask = true;
+ is_inited_file_empty = true;
+ is_inited_file_source_context = true;
+ is_inited_file_struct = true;
+ is_inited_file_timestamp = true;
+ is_inited_file_type = true;
+ is_inited_file_wrappers = true;
+
return 0;
}