diff options
author | Josh Haberman <jhaberman@gmail.com> | 2016-07-20 22:07:36 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2016-07-21 11:37:54 -0700 |
commit | ff7f68ae9fcf4f4e3bdef3c8c372c7ae91b7720b (patch) | |
tree | e63582ff6cb9457f0b3156b8c03f226a42eab45d /ruby/ext/google/protobuf_c/protobuf.h | |
parent | 30d8416c1cf69c7e349811b38a91dbc810fc66bd (diff) | |
download | protobuf-ff7f68ae9fcf4f4e3bdef3c8c372c7ae91b7720b.tar.gz protobuf-ff7f68ae9fcf4f4e3bdef3c8c372c7ae91b7720b.tar.bz2 protobuf-ff7f68ae9fcf4f4e3bdef3c8c372c7ae91b7720b.zip |
Ruby: encode and freeze strings when the are assigned or decoded.
Diffstat (limited to 'ruby/ext/google/protobuf_c/protobuf.h')
-rw-r--r-- | ruby/ext/google/protobuf_c/protobuf.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ruby/ext/google/protobuf_c/protobuf.h b/ruby/ext/google/protobuf_c/protobuf.h index 2834c894..08b8d516 100644 --- a/ruby/ext/google/protobuf_c/protobuf.h +++ b/ruby/ext/google/protobuf_c/protobuf.h @@ -313,7 +313,7 @@ void native_slot_dup(upb_fieldtype_t type, void* to, void* from); void native_slot_deep_copy(upb_fieldtype_t type, void* to, void* from); bool native_slot_eq(upb_fieldtype_t type, void* mem1, void* mem2); -void native_slot_validate_string_encoding(upb_fieldtype_t type, VALUE value); +VALUE native_slot_encode_and_freeze_string(upb_fieldtype_t type, VALUE value); void native_slot_check_int_range_precision(upb_fieldtype_t type, VALUE value); extern rb_encoding* kRubyStringUtf8Encoding; @@ -366,6 +366,7 @@ RepeatedField* ruby_to_RepeatedField(VALUE value); VALUE RepeatedField_each(VALUE _self); VALUE RepeatedField_index(int argc, VALUE* argv, VALUE _self); void* RepeatedField_index_native(VALUE _self, int index); +int RepeatedField_size(VALUE _self); VALUE RepeatedField_index_set(VALUE _self, VALUE _index, VALUE val); void RepeatedField_reserve(RepeatedField* self, int new_size); VALUE RepeatedField_push(VALUE _self, VALUE val); |