aboutsummaryrefslogtreecommitdiff
path: root/ruby/ext/google/protobuf_c/protobuf.h
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2017-08-23 22:03:18 -0700
committerBo Yang <teboring@google.com>2017-09-13 14:27:52 -0700
commitc1dd8e85a1314a7bcb2059b842c6830d854fbefa (patch)
tree24b15fc50665a56b9c658c31623a9fddcdde38bf /ruby/ext/google/protobuf_c/protobuf.h
parent8741da3e45876f8c55ca062a08726f542f646423 (diff)
downloadprotobuf-c1dd8e85a1314a7bcb2059b842c6830d854fbefa.tar.gz
protobuf-c1dd8e85a1314a7bcb2059b842c6830d854fbefa.tar.bz2
protobuf-c1dd8e85a1314a7bcb2059b842c6830d854fbefa.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.h5
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;