diff options
author | Chris Fallin <cfallin@google.com> | 2015-05-19 15:33:48 -0700 |
---|---|---|
committer | Chris Fallin <cfallin@google.com> | 2015-05-19 16:19:00 -0700 |
commit | 231886f6327b7cad480b96d08595f45b3526cb4a (patch) | |
tree | a20711cf778f1f0d516d4648991a997963fe24f9 /ruby/ext/google/protobuf_c/storage.c | |
parent | a8b38c598d7f65b281a72809b28117afdb760931 (diff) | |
download | protobuf-231886f6327b7cad480b96d08595f45b3526cb4a.tar.gz protobuf-231886f6327b7cad480b96d08595f45b3526cb4a.tar.bz2 protobuf-231886f6327b7cad480b96d08595f45b3526cb4a.zip |
Ruby C extension speedup: don't re-intern constant string needlessly.
Also fixed lines with > 80 char length.
Diffstat (limited to 'ruby/ext/google/protobuf_c/storage.c')
-rw-r--r-- | ruby/ext/google/protobuf_c/storage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ruby/ext/google/protobuf_c/storage.c b/ruby/ext/google/protobuf_c/storage.c index 2ad8bd74..c4cdc9cc 100644 --- a/ruby/ext/google/protobuf_c/storage.c +++ b/ruby/ext/google/protobuf_c/storage.c @@ -415,7 +415,8 @@ MessageLayout* create_layout(const upb_msgdef* msgdef) { // Align current offset up to |size| granularity. off = align_up_to(off, field_size); layout->fields[upb_fielddef_index(field)].offset = off; - layout->fields[upb_fielddef_index(field)].case_offset = MESSAGE_FIELD_NO_CASE; + layout->fields[upb_fielddef_index(field)].case_offset = + MESSAGE_FIELD_NO_CASE; off += field_size; } |