aboutsummaryrefslogtreecommitdiff
path: root/php/ext/google/protobuf/storage.c
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2016-12-08 11:16:49 -0800
committerGitHub <noreply@github.com>2016-12-08 11:16:49 -0800
commit46ae90dc5e145b12fffa7e053a908a9f3e066286 (patch)
treee15e50f9a986bd64cd4413b135382a305701437f /php/ext/google/protobuf/storage.c
parent631f4618a7b84cdc91949229a11a8abe5dfc4a34 (diff)
downloadprotobuf-46ae90dc5e145b12fffa7e053a908a9f3e066286.tar.gz
protobuf-46ae90dc5e145b12fffa7e053a908a9f3e066286.tar.bz2
protobuf-46ae90dc5e145b12fffa7e053a908a9f3e066286.zip
Make php generated code conform to PSR-4. (#2435)
1. Generate single file for each message. 2. Lazily initiate metadata.
Diffstat (limited to 'php/ext/google/protobuf/storage.c')
-rw-r--r--php/ext/google/protobuf/storage.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/php/ext/google/protobuf/storage.c b/php/ext/google/protobuf/storage.c
index 1d25a91b..8a2b3a22 100644
--- a/php/ext/google/protobuf/storage.c
+++ b/php/ext/google/protobuf/storage.c
@@ -458,8 +458,8 @@ void free_layout(MessageLayout* layout) {
FREE(layout);
}
-void layout_init(MessageLayout* layout, void* storage, zval** properties_table
- TSRMLS_DC) {
+void layout_init(MessageLayout* layout, void* storage,
+ zval** properties_table TSRMLS_DC) {
int i;
upb_msg_field_iter it;
for (upb_msg_field_begin(&it, layout->msgdef), i = 0; !upb_msg_field_done(&it);
@@ -479,8 +479,8 @@ void layout_init(MessageLayout* layout, void* storage, zval** properties_table
DEREF(memory, zval**) = property_ptr;
} else if (upb_fielddef_label(field) == UPB_LABEL_REPEATED) {
zval_ptr_dtor(property_ptr);
- repeated_field_create_with_type(repeated_field_type, field, property_ptr
- TSRMLS_CC);
+ repeated_field_create_with_type(repeated_field_type, field,
+ property_ptr TSRMLS_CC);
DEREF(memory, zval**) = property_ptr;
} else {
native_slot_init(upb_fielddef_type(field), memory, property_ptr);