diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2017-08-23 22:03:18 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2017-08-30 11:38:04 -0700 |
commit | d6152dd51c833bae79208ee8c03bd6a1d21fe632 (patch) | |
tree | 8a35303a817236f4dcb74ef0fc32e871e5aad524 /ruby/ext/google/protobuf_c/protobuf.h | |
parent | 364060bb51d172811395420026688409bcc7c74e (diff) | |
download | protobuf-d6152dd51c833bae79208ee8c03bd6a1d21fe632.tar.gz protobuf-d6152dd51c833bae79208ee8c03bd6a1d21fe632.tar.bz2 protobuf-d6152dd51c833bae79208ee8c03bd6a1d21fe632.zip |
Move parse frame array to the Map object
This makes the frame stack per-parser, and per-thread. Fixes #3250
Diffstat (limited to 'ruby/ext/google/protobuf_c/protobuf.h')
-rw-r--r-- | ruby/ext/google/protobuf_c/protobuf.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ruby/ext/google/protobuf_c/protobuf.h b/ruby/ext/google/protobuf_c/protobuf.h index 520e9d9b..8fd1bc64 100644 --- a/ruby/ext/google/protobuf_c/protobuf.h +++ b/ruby/ext/google/protobuf_c/protobuf.h @@ -166,8 +166,6 @@ extern VALUE cBuilder; extern VALUE cError; extern VALUE cParseError; -extern VALUE map_parse_frames; - // We forward-declare all of the Ruby method implementations here because we // sometimes call the methods directly across .c files, rather than going // through Ruby's method dispatching (e.g. during message parse). It's cleaner @@ -397,6 +395,7 @@ typedef struct { upb_fieldtype_t key_type; upb_fieldtype_t value_type; VALUE value_type_class; + VALUE parse_frames; upb_strtable table; } Map; @@ -405,6 +404,8 @@ void Map_free(void* self); VALUE Map_alloc(VALUE klass); VALUE Map_init(int argc, VALUE* argv, VALUE self); void Map_register(VALUE module); +VALUE Map_push_frame(VALUE self, VALUE val); +VALUE Map_pop_frame(VALUE self); extern const rb_data_type_t Map_type; extern VALUE cMap; |