ruby/ext/google/protobuf_c/protobuf.h
Go to the documentation of this file.
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2014 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 #ifndef __GOOGLE_PROTOBUF_RUBY_PROTOBUF_H__
32 #define __GOOGLE_PROTOBUF_RUBY_PROTOBUF_H__
33 
34 #include <ruby/ruby.h>
35 #include <ruby/vm.h>
36 #include <ruby/encoding.h>
37 
38 #include "upb.h"
39 
40 // Forward decls.
41 struct DescriptorPool;
42 struct Descriptor;
43 struct FileDescriptor;
44 struct FieldDescriptor;
45 struct EnumDescriptor;
46 struct MessageLayout;
47 struct MessageField;
48 struct MessageHeader;
50 struct EnumBuilderContext;
51 struct FileBuilderContext;
52 struct Builder;
53 
55 typedef struct Descriptor Descriptor;
61 typedef struct MessageField MessageField;
67 typedef struct Builder Builder;
68 
69 /*
70  It can be a bit confusing how the C structs defined below and the Ruby
71  objects interact and hold references to each other. First, a few principles:
72 
73  - Ruby's "TypedData" abstraction lets a Ruby VALUE hold a pointer to a C
74  struct (or arbitrary memory chunk), own it, and free it when collected.
75  Thus, each struct below will have a corresponding Ruby object
76  wrapping/owning it.
77 
78  - To get back from an underlying upb {msg,enum}def to the Ruby object, we
79  keep a global hashmap, accessed by get_def_obj/add_def_obj below.
80 
81  The in-memory structure is then something like:
82 
83  Ruby | upb
84  |
85  DescriptorPool ------------|-----------> upb_symtab____________________
86  | | (message types) \
87  | v \
88  Descriptor ---------------|-----------> upb_msgdef (enum types)|
89  |--> msgclass | | ^ |
90  | (dynamically built) | | | (submsg fields) |
91  |--> MessageLayout | | | /
92  |--------------------------|> decoder method| | /
93  \--------------------------|> serialize | | /
94  | handlers v | /
95  FieldDescriptor -----------|-----------> upb_fielddef /
96  | | /
97  | v (enum fields) /
98  EnumDescriptor ------------|-----------> upb_enumdef <----------'
99  |
100  |
101  ^ | \___/
102  `---------------|-----------------' (get_def_obj map)
103  */
104 
105 // -----------------------------------------------------------------------------
106 // Ruby class structure definitions.
107 // -----------------------------------------------------------------------------
108 
111 };
112 
113 struct Descriptor {
116  VALUE klass; // begins as nil
123 };
124 
127 };
128 
131 };
132 
135 };
136 
139  VALUE module; // begins as nil
140 };
141 
143  VALUE descriptor;
144  VALUE builder;
145 };
146 
148  VALUE descriptor;
149  VALUE builder;
150 };
151 
153  VALUE enumdesc;
154 };
155 
159  VALUE builder;
160 };
161 
162 struct Builder {
165  upb_def** defs; // used only while finalizing
166 };
167 
168 extern VALUE cDescriptorPool;
169 extern VALUE cDescriptor;
170 extern VALUE cFileDescriptor;
171 extern VALUE cFieldDescriptor;
172 extern VALUE cEnumDescriptor;
173 extern VALUE cMessageBuilderContext;
174 extern VALUE cOneofBuilderContext;
175 extern VALUE cEnumBuilderContext;
176 extern VALUE cFileBuilderContext;
177 extern VALUE cBuilder;
178 
179 extern VALUE cError;
180 extern VALUE cParseError;
181 extern VALUE cTypeError;
182 
183 // We forward-declare all of the Ruby method implementations here because we
184 // sometimes call the methods directly across .c files, rather than going
185 // through Ruby's method dispatching (e.g. during message parse). It's cleaner
186 // to keep the list of object methods together than to split them between
187 // static-in-file definitions and header declarations.
188 
189 void DescriptorPool_mark(void* _self);
190 void DescriptorPool_free(void* _self);
191 VALUE DescriptorPool_alloc(VALUE klass);
192 void DescriptorPool_register(VALUE module);
194 VALUE DescriptorPool_add(VALUE _self, VALUE def);
195 VALUE DescriptorPool_build(int argc, VALUE* argv, VALUE _self);
196 VALUE DescriptorPool_lookup(VALUE _self, VALUE name);
197 VALUE DescriptorPool_generated_pool(VALUE _self);
198 
199 extern VALUE generated_pool;
200 
201 void Descriptor_mark(void* _self);
202 void Descriptor_free(void* _self);
203 VALUE Descriptor_alloc(VALUE klass);
204 void Descriptor_register(VALUE module);
206 VALUE Descriptor_initialize(VALUE _self, VALUE file_descriptor_rb);
207 VALUE Descriptor_name(VALUE _self);
208 VALUE Descriptor_name_set(VALUE _self, VALUE str);
209 VALUE Descriptor_each(VALUE _self);
210 VALUE Descriptor_lookup(VALUE _self, VALUE name);
211 VALUE Descriptor_add_field(VALUE _self, VALUE obj);
212 VALUE Descriptor_add_oneof(VALUE _self, VALUE obj);
213 VALUE Descriptor_each_oneof(VALUE _self);
214 VALUE Descriptor_lookup_oneof(VALUE _self, VALUE name);
215 VALUE Descriptor_msgclass(VALUE _self);
216 VALUE Descriptor_file_descriptor(VALUE _self);
217 extern const rb_data_type_t _Descriptor_type;
218 
219 void FileDescriptor_mark(void* _self);
220 void FileDescriptor_free(void* _self);
221 VALUE FileDescriptor_alloc(VALUE klass);
222 void FileDescriptor_register(VALUE module);
224 VALUE FileDescriptor_initialize(int argc, VALUE* argv, VALUE _self);
225 VALUE FileDescriptor_name(VALUE _self);
226 VALUE FileDescriptor_syntax(VALUE _self);
227 VALUE FileDescriptor_syntax_set(VALUE _self, VALUE syntax);
228 
229 void FieldDescriptor_mark(void* _self);
230 void FieldDescriptor_free(void* _self);
231 VALUE FieldDescriptor_alloc(VALUE klass);
232 void FieldDescriptor_register(VALUE module);
234 VALUE FieldDescriptor_name(VALUE _self);
235 VALUE FieldDescriptor_name_set(VALUE _self, VALUE str);
236 VALUE FieldDescriptor_type(VALUE _self);
237 VALUE FieldDescriptor_type_set(VALUE _self, VALUE type);
238 VALUE FieldDescriptor_default(VALUE _self);
239 VALUE FieldDescriptor_default_set(VALUE _self, VALUE default_value);
240 VALUE FieldDescriptor_label(VALUE _self);
241 VALUE FieldDescriptor_label_set(VALUE _self, VALUE label);
242 VALUE FieldDescriptor_number(VALUE _self);
243 VALUE FieldDescriptor_number_set(VALUE _self, VALUE number);
244 VALUE FieldDescriptor_submsg_name(VALUE _self);
245 VALUE FieldDescriptor_submsg_name_set(VALUE _self, VALUE value);
246 VALUE FieldDescriptor_subtype(VALUE _self);
247 VALUE FieldDescriptor_has(VALUE _self, VALUE msg_rb);
248 VALUE FieldDescriptor_clear(VALUE _self, VALUE msg_rb);
249 VALUE FieldDescriptor_get(VALUE _self, VALUE msg_rb);
250 VALUE FieldDescriptor_set(VALUE _self, VALUE msg_rb, VALUE value);
253 
254 void OneofDescriptor_mark(void* _self);
255 void OneofDescriptor_free(void* _self);
256 VALUE OneofDescriptor_alloc(VALUE klass);
257 void OneofDescriptor_register(VALUE module);
259 VALUE OneofDescriptor_name(VALUE _self);
260 VALUE OneofDescriptor_name_set(VALUE _self, VALUE value);
261 VALUE OneofDescriptor_add_field(VALUE _self, VALUE field);
262 VALUE OneofDescriptor_each(VALUE _self, VALUE field);
263 
264 void EnumDescriptor_mark(void* _self);
265 void EnumDescriptor_free(void* _self);
266 VALUE EnumDescriptor_alloc(VALUE klass);
267 void EnumDescriptor_register(VALUE module);
269 VALUE EnumDescriptor_initialize(VALUE _self, VALUE file_descriptor_rb);
270 VALUE EnumDescriptor_file_descriptor(VALUE _self);
271 VALUE EnumDescriptor_name(VALUE _self);
272 VALUE EnumDescriptor_name_set(VALUE _self, VALUE str);
273 VALUE EnumDescriptor_add_value(VALUE _self, VALUE name, VALUE number);
274 VALUE EnumDescriptor_lookup_name(VALUE _self, VALUE name);
275 VALUE EnumDescriptor_lookup_value(VALUE _self, VALUE number);
276 VALUE EnumDescriptor_each(VALUE _self);
277 VALUE EnumDescriptor_enummodule(VALUE _self);
278 extern const rb_data_type_t _EnumDescriptor_type;
279 
280 void MessageBuilderContext_mark(void* _self);
281 void MessageBuilderContext_free(void* _self);
283 void MessageBuilderContext_register(VALUE module);
285 VALUE MessageBuilderContext_initialize(VALUE _self,
286  VALUE descriptor,
287  VALUE builder);
288 VALUE MessageBuilderContext_optional(int argc, VALUE* argv, VALUE _self);
289 VALUE MessageBuilderContext_required(int argc, VALUE* argv, VALUE _self);
290 VALUE MessageBuilderContext_repeated(int argc, VALUE* argv, VALUE _self);
291 VALUE MessageBuilderContext_map(int argc, VALUE* argv, VALUE _self);
292 VALUE MessageBuilderContext_oneof(VALUE _self, VALUE name);
293 
294 void OneofBuilderContext_mark(void* _self);
295 void OneofBuilderContext_free(void* _self);
296 VALUE OneofBuilderContext_alloc(VALUE klass);
297 void OneofBuilderContext_register(VALUE module);
299 VALUE OneofBuilderContext_initialize(VALUE _self,
300  VALUE descriptor,
301  VALUE builder);
302 VALUE OneofBuilderContext_optional(int argc, VALUE* argv, VALUE _self);
303 
304 void EnumBuilderContext_mark(void* _self);
305 void EnumBuilderContext_free(void* _self);
306 VALUE EnumBuilderContext_alloc(VALUE klass);
307 void EnumBuilderContext_register(VALUE module);
309 VALUE EnumBuilderContext_initialize(VALUE _self, VALUE enumdesc);
310 VALUE EnumBuilderContext_value(VALUE _self, VALUE name, VALUE number);
311 
312 void FileBuilderContext_mark(void* _self);
313 void FileBuilderContext_free(void* _self);
314 VALUE FileBuilderContext_alloc(VALUE klass);
315 void FileBuilderContext_register(VALUE module);
316 VALUE FileBuilderContext_initialize(VALUE _self, VALUE file_descriptor,
317  VALUE builder);
318 VALUE FileBuilderContext_add_message(VALUE _self, VALUE name);
319 VALUE FileBuilderContext_add_enum(VALUE _self, VALUE name);
320 VALUE FileBuilderContext_pending_descriptors(VALUE _self);
321 
322 void Builder_mark(void* _self);
323 void Builder_free(void* _self);
324 VALUE Builder_alloc(VALUE klass);
325 void Builder_register(VALUE module);
327 VALUE Builder_initialize(VALUE _self);
328 VALUE Builder_add_file(int argc, VALUE *argv, VALUE _self);
329 VALUE Builder_add_message(VALUE _self, VALUE name);
330 VALUE Builder_add_enum(VALUE _self, VALUE name);
331 VALUE Builder_finalize_to_pool(VALUE _self, VALUE pool_rb);
332 
333 // -----------------------------------------------------------------------------
334 // Native slot storage abstraction.
335 // -----------------------------------------------------------------------------
336 
337 #define NATIVE_SLOT_MAX_SIZE sizeof(uint64_t)
338 
340 void native_slot_set(const char* name,
342  VALUE type_class,
343  void* memory,
344  VALUE value);
345 // Atomically (with respect to Ruby VM calls) either update the value and set a
346 // oneof case, or do neither. If |case_memory| is null, then no case value is
347 // set.
348 void native_slot_set_value_and_case(const char* name,
350  VALUE type_class,
351  void* memory,
352  VALUE value,
353  uint32_t* case_memory,
354  uint32_t case_number);
356  VALUE type_class,
357  const void* memory);
358 void native_slot_init(upb_fieldtype_t type, void* memory);
359 void native_slot_mark(upb_fieldtype_t type, void* memory);
360 void native_slot_dup(upb_fieldtype_t type, void* to, void* from);
361 void native_slot_deep_copy(upb_fieldtype_t type, void* to, void* from);
362 bool native_slot_eq(upb_fieldtype_t type, void* mem1, void* mem2);
363 
366 
367 extern rb_encoding* kRubyStringUtf8Encoding;
368 extern rb_encoding* kRubyStringASCIIEncoding;
369 extern rb_encoding* kRubyString8bitEncoding;
370 
371 VALUE field_type_class(const upb_fielddef* field);
372 
373 #define MAP_KEY_FIELD 1
374 #define MAP_VALUE_FIELD 2
375 
376 // Oneof case slot value to indicate that no oneof case is set. The value `0` is
377 // safe because field numbers are used as case identifiers, and no field can
378 // have a number of 0.
379 #define ONEOF_CASE_NONE 0
380 
381 // These operate on a map field (i.e., a repeated field of submessages whose
382 // submessage type is a map-entry msgdef).
383 bool is_map_field(const upb_fielddef* field);
386 
387 // These operate on a map-entry msgdef.
390 
391 // -----------------------------------------------------------------------------
392 // Repeated field container type.
393 // -----------------------------------------------------------------------------
394 
395 typedef struct {
398  void* elements;
399  int size;
400  int capacity;
401 } RepeatedField;
402 
403 void RepeatedField_mark(void* self);
404 void RepeatedField_free(void* self);
405 VALUE RepeatedField_alloc(VALUE klass);
406 VALUE RepeatedField_init(int argc, VALUE* argv, VALUE self);
407 void RepeatedField_register(VALUE module);
408 
409 extern const rb_data_type_t RepeatedField_type;
410 extern VALUE cRepeatedField;
411 
413 
414 VALUE RepeatedField_each(VALUE _self);
415 VALUE RepeatedField_index(int argc, VALUE* argv, VALUE _self);
416 void* RepeatedField_index_native(VALUE _self, int index);
417 int RepeatedField_size(VALUE _self);
418 VALUE RepeatedField_index_set(VALUE _self, VALUE _index, VALUE val);
419 void RepeatedField_reserve(RepeatedField* self, int new_size);
420 VALUE RepeatedField_push(VALUE _self, VALUE val);
421 void RepeatedField_push_native(VALUE _self, void* data);
422 VALUE RepeatedField_pop_one(VALUE _self);
423 VALUE RepeatedField_insert(int argc, VALUE* argv, VALUE _self);
424 VALUE RepeatedField_replace(VALUE _self, VALUE list);
425 VALUE RepeatedField_clear(VALUE _self);
426 VALUE RepeatedField_length(VALUE _self);
427 VALUE RepeatedField_dup(VALUE _self);
428 VALUE RepeatedField_deep_copy(VALUE _self);
429 VALUE RepeatedField_to_ary(VALUE _self);
430 VALUE RepeatedField_eq(VALUE _self, VALUE _other);
431 VALUE RepeatedField_hash(VALUE _self);
432 VALUE RepeatedField_inspect(VALUE _self);
433 VALUE RepeatedField_plus(VALUE _self, VALUE list);
434 
435 // Defined in repeated_field.c; also used by Map.
437 
438 // -----------------------------------------------------------------------------
439 // Map container type.
440 // -----------------------------------------------------------------------------
441 
442 typedef struct {
446  VALUE parse_frame;
448 } Map;
449 
450 void Map_mark(void* self);
451 void Map_free(void* self);
452 VALUE Map_alloc(VALUE klass);
453 VALUE Map_init(int argc, VALUE* argv, VALUE self);
454 void Map_register(VALUE module);
455 VALUE Map_set_frame(VALUE self, VALUE val);
456 
457 extern const rb_data_type_t Map_type;
458 extern VALUE cMap;
459 
460 Map* ruby_to_Map(VALUE value);
461 
462 VALUE Map_each(VALUE _self);
463 VALUE Map_keys(VALUE _self);
464 VALUE Map_values(VALUE _self);
465 VALUE Map_index(VALUE _self, VALUE key);
466 VALUE Map_index_set(VALUE _self, VALUE key, VALUE value);
467 VALUE Map_has_key(VALUE _self, VALUE key);
468 VALUE Map_delete(VALUE _self, VALUE key);
469 VALUE Map_clear(VALUE _self);
470 VALUE Map_length(VALUE _self);
471 VALUE Map_dup(VALUE _self);
472 VALUE Map_deep_copy(VALUE _self);
473 VALUE Map_eq(VALUE _self, VALUE _other);
474 VALUE Map_hash(VALUE _self);
475 VALUE Map_to_h(VALUE _self);
476 VALUE Map_inspect(VALUE _self);
477 VALUE Map_merge(VALUE _self, VALUE hashmap);
478 VALUE Map_merge_into_self(VALUE _self, VALUE hashmap);
479 
480 typedef struct {
481  Map* self;
483 } Map_iter;
484 
485 void Map_begin(VALUE _self, Map_iter* iter);
486 void Map_next(Map_iter* iter);
487 bool Map_done(Map_iter* iter);
488 VALUE Map_iter_key(Map_iter* iter);
489 VALUE Map_iter_value(Map_iter* iter);
490 
491 // -----------------------------------------------------------------------------
492 // Message layout / storage.
493 // -----------------------------------------------------------------------------
494 
495 #define MESSAGE_FIELD_NO_CASE ((size_t)-1)
496 #define MESSAGE_FIELD_NO_HASBIT ((size_t)-1)
497 
498 struct MessageField {
499  size_t offset;
500  size_t case_offset; // for oneofs, a uint32. Else, MESSAGE_FIELD_NO_CASE.
501  size_t hasbit;
502 };
503 
504 struct MessageLayout {
505  const upb_msgdef* msgdef;
507  size_t size;
508 };
509 
513  const upb_fielddef* field);
516  const void* storage,
517  const upb_fielddef* field);
519  void* storage,
520  const upb_fielddef* field,
521  VALUE val);
523  const void* storage,
524  const upb_fielddef* field);
526  const void* storage,
527  const upb_fielddef* field);
528 void layout_init(MessageLayout* layout, void* storage);
529 void layout_mark(MessageLayout* layout, void* storage);
530 void layout_dup(MessageLayout* layout, void* to, void* from);
531 void layout_deep_copy(MessageLayout* layout, void* to, void* from);
532 VALUE layout_eq(MessageLayout* layout, void* msg1, void* msg2);
533 VALUE layout_hash(MessageLayout* layout, void* storage);
534 VALUE layout_inspect(MessageLayout* layout, void* storage);
535 
536 // -----------------------------------------------------------------------------
537 // Message class creation.
538 // -----------------------------------------------------------------------------
539 
540 // This should probably be factored into a common upb component.
541 
542 typedef struct {
544  upb_bytessink sink;
545  char *ptr;
546  size_t len, size;
547 } stringsink;
548 
549 void stringsink_uninit(stringsink *sink);
550 
552  Descriptor* descriptor; // kept alive by self.class.descriptor reference.
553  stringsink* unknown_fields; // store unknown fields in decoding.
554  // Data comes after this.
555 };
556 
557 extern rb_data_type_t Message_type;
558 
560 void* Message_data(void* msg);
561 void Message_mark(void* self);
562 void Message_free(void* self);
563 VALUE Message_alloc(VALUE klass);
564 VALUE Message_method_missing(int argc, VALUE* argv, VALUE _self);
565 VALUE Message_initialize(int argc, VALUE* argv, VALUE _self);
566 VALUE Message_dup(VALUE _self);
567 VALUE Message_deep_copy(VALUE _self);
568 VALUE Message_eq(VALUE _self, VALUE _other);
569 VALUE Message_hash(VALUE _self);
570 VALUE Message_inspect(VALUE _self);
571 VALUE Message_to_h(VALUE _self);
572 VALUE Message_index(VALUE _self, VALUE field_name);
573 VALUE Message_index_set(VALUE _self, VALUE field_name, VALUE value);
574 VALUE Message_descriptor(VALUE klass);
575 VALUE Message_decode(VALUE klass, VALUE data);
576 VALUE Message_encode(VALUE klass, VALUE msg_rb);
577 VALUE Message_decode_json(int argc, VALUE* argv, VALUE klass);
578 VALUE Message_encode_json(int argc, VALUE* argv, VALUE klass);
579 
580 VALUE Google_Protobuf_discard_unknown(VALUE self, VALUE msg_rb);
581 VALUE Google_Protobuf_deep_copy(VALUE self, VALUE obj);
582 
584 VALUE enum_lookup(VALUE self, VALUE number);
585 VALUE enum_resolve(VALUE self, VALUE sym);
586 
588  Descriptor* descriptor, const void *owner);
589 
590 // Maximum depth allowed during encoding, to avoid stack overflows due to
591 // cycles.
592 #define ENCODE_MAX_NESTING 63
593 
594 // -----------------------------------------------------------------------------
595 // Global map from upb {msg,enum}defs to wrapper Descriptor/EnumDescriptor
596 // instances.
597 // -----------------------------------------------------------------------------
598 void add_def_obj(const void* def, VALUE value);
599 VALUE get_def_obj(const void* def);
600 
601 // -----------------------------------------------------------------------------
602 // Utilities.
603 // -----------------------------------------------------------------------------
604 
605 void check_upb_status(const upb_status* status, const char* msg);
606 
607 #define CHECK_UPB(code, msg) do { \
608  upb_status status = UPB_STATUS_INIT; \
609  code; \
610  check_upb_status(&status, msg); \
611 } while (0)
612 
614 
615 #endif // __GOOGLE_PROTOBUF_RUBY_PROTOBUF_H__
RepeatedField_push_native
void RepeatedField_push_native(VALUE _self, void *data)
Definition: repeated_field.c:234
native_slot_dup
void native_slot_dup(upb_fieldtype_t type, void *to, void *from)
Definition: ruby/ext/google/protobuf_c/storage.c:358
Builder::pending_list
VALUE pending_list
Definition: ruby/ext/google/protobuf_c/protobuf.h:163
free_layout
void free_layout(MessageLayout *layout)
Definition: php/ext/google/protobuf/storage.c:750
Map_merge_into_self
VALUE Map_merge_into_self(VALUE _self, VALUE hashmap)
Definition: ruby/ext/google/protobuf_c/map.c:761
EnumDescriptor_file_descriptor
VALUE EnumDescriptor_file_descriptor(VALUE _self)
Definition: defs.c:1345
Map
struct Map Map
Definition: php/ext/google/protobuf/protobuf.h:648
cMessageBuilderContext
VALUE cMessageBuilderContext
msgdef
const upb_msgdef * msgdef
Definition: php/ext/google/protobuf/protobuf.h:799
RepeatedField
struct RepeatedField RepeatedField
Definition: php/ext/google/protobuf/protobuf.h:658
FileDescriptor_alloc
VALUE FileDescriptor_alloc(VALUE klass)
Definition: defs.c:527
create_layout
MessageLayout * create_layout(const upb_msgdef *msgdef)
Definition: php/ext/google/protobuf/storage.c:591
OneofDescriptor::oneofdef
const upb_oneofdef * oneofdef
Definition: ruby/ext/google/protobuf_c/protobuf.h:134
ruby_to_DescriptorPool
DescriptorPool * ruby_to_DescriptorPool(VALUE value)
cDescriptorPool
VALUE cDescriptorPool
Message_initialize
VALUE Message_initialize(int argc, VALUE *argv, VALUE _self)
Definition: ruby/ext/google/protobuf_c/message.c:474
name
GLuint const GLchar * name
Definition: glcorearb.h:3055
native_slot_get
VALUE native_slot_get(upb_fieldtype_t type, VALUE type_class, const void *memory)
Definition: ruby/ext/google/protobuf_c/storage.c:272
MessageLayout::size
size_t size
Definition: php/ext/google/protobuf/protobuf.h:930
OneofBuilderContext::builder
VALUE builder
Definition: ruby/ext/google/protobuf_c/protobuf.h:149
RepeatedField::elements
void * elements
Definition: ruby/ext/google/protobuf_c/protobuf.h:398
stringsink_uninit
void stringsink_uninit(stringsink *sink)
Definition: php/ext/google/protobuf/encode_decode.c:80
RepeatedField_mark
void RepeatedField_mark(void *self)
Definition: repeated_field.c:588
MessageBuilderContext_repeated
VALUE MessageBuilderContext_repeated(int argc, VALUE *argv, VALUE _self)
Definition: defs.c:1647
Map_has_key
VALUE Map_has_key(VALUE _self, VALUE key)
Definition: ruby/ext/google/protobuf_c/map.c:420
Descriptor_alloc
VALUE Descriptor_alloc(VALUE klass)
Definition: defs.c:273
Descriptor_mark
void Descriptor_mark(void *_self)
Definition: defs.c:228
Message_free
void Message_free(void *self)
Definition: ruby/ext/google/protobuf_c/message.c:46
Google_Protobuf_discard_unknown
VALUE Google_Protobuf_discard_unknown(VALUE self, VALUE msg_rb)
Definition: ruby/ext/google/protobuf_c/encode_decode.c:1607
ruby_to_FieldDescriptor
FieldDescriptor * ruby_to_FieldDescriptor(VALUE value)
add_def_obj
void add_def_obj(const void *def, VALUE value)
Definition: ruby/ext/google/protobuf_c/protobuf.c:46
layout_hash
VALUE layout_hash(MessageLayout *layout, void *storage)
Definition: ruby/ext/google/protobuf_c/storage.c:1023
Map
Definition: ruby/ext/google/protobuf_c/protobuf.h:442
Map_hash
VALUE Map_hash(VALUE _self)
Definition: ruby/ext/google/protobuf_c/map.c:643
cRepeatedField
VALUE cRepeatedField
Definition: repeated_field.c:42
upb_json_parsermethod
Definition: php/ext/google/protobuf/upb.c:9068
Map_init
VALUE Map_init(int argc, VALUE *argv, VALUE self)
Definition: ruby/ext/google/protobuf_c/map.c:224
upb_status
Definition: php/ext/google/protobuf/upb.h:170
Descriptor_file_descriptor
VALUE Descriptor_file_descriptor(VALUE _self)
Definition: defs.c:333
Map_index
VALUE Map_index(VALUE _self, VALUE key)
Definition: ruby/ext/google/protobuf_c/map.c:363
Message_inspect
VALUE Message_inspect(VALUE _self)
Definition: ruby/ext/google/protobuf_c/message.c:579
MessageField::offset
size_t offset
Definition: php/ext/google/protobuf/protobuf.h:921
MessageHeader::unknown_fields
stringsink * unknown_fields
Definition: ruby/ext/google/protobuf_c/protobuf.h:553
ruby_to_OneofDescriptor
OneofDescriptor * ruby_to_OneofDescriptor(VALUE value)
FieldDescriptor_register
void FieldDescriptor_register(VALUE module)
Definition: defs.c:672
layout_get
VALUE layout_get(MessageLayout *layout, const void *storage, const upb_fielddef *field)
Definition: ruby/ext/google/protobuf_c/storage.c:743
FieldDescriptor_default_set
VALUE FieldDescriptor_default_set(VALUE _self, VALUE default_value)
Definition: defs.c:884
Builder_register
void Builder_register(VALUE module)
Definition: defs.c:2086
FieldDescriptor::fielddef
const upb_fielddef * fielddef
Definition: ruby/ext/google/protobuf_c/protobuf.h:130
layout_set
void layout_set(MessageLayout *layout, void *storage, const upb_fielddef *field, VALUE val)
Definition: ruby/ext/google/protobuf_c/storage.c:834
Map_each
VALUE Map_each(VALUE _self)
Definition: ruby/ext/google/protobuf_c/map.c:282
MessageHeader::descriptor
Descriptor * descriptor
Definition: ruby/ext/google/protobuf_c/protobuf.h:552
MessageBuilderContext_initialize
VALUE MessageBuilderContext_initialize(VALUE _self, VALUE descriptor, VALUE builder)
Definition: defs.c:1523
Message_eq
VALUE Message_eq(VALUE _self, VALUE _other)
Definition: ruby/ext/google/protobuf_c/message.c:540
cBuilder
VALUE cBuilder
enum_resolve
VALUE enum_resolve(VALUE self, VALUE sym)
Definition: ruby/ext/google/protobuf_c/message.c:780
cParseError
VALUE cParseError
Definition: ruby/ext/google/protobuf_c/protobuf.c:43
MessageHeader
Definition: ruby/ext/google/protobuf_c/protobuf.h:551
FieldDescriptor_type
VALUE FieldDescriptor_type(VALUE _self)
Definition: defs.c:844
Message_decode_json
VALUE Message_decode_json(int argc, VALUE *argv, VALUE klass)
Definition: ruby/ext/google/protobuf_c/encode_decode.c:900
ruby_to_FileDescriptor
FileDescriptor * ruby_to_FileDescriptor(VALUE value)
layout_init
void layout_init(MessageLayout *layout, void *storage)
Definition: ruby/ext/google/protobuf_c/storage.c:883
EnumDescriptor::enumdef
const upb_enumdef * enumdef
Definition: ruby/ext/google/protobuf_c/protobuf.h:138
Descriptor_lookup
VALUE Descriptor_lookup(VALUE _self, VALUE name)
Definition: defs.c:394
EnumDescriptor_name_set
VALUE EnumDescriptor_name_set(VALUE _self, VALUE str)
Definition: defs.c:1368
Map_iter_key
VALUE Map_iter_key(Map_iter *iter)
Definition: ruby/ext/google/protobuf_c/map.c:816
Message_descriptor
VALUE Message_descriptor(VALUE klass)
Definition: ruby/ext/google/protobuf_c/message.c:695
Message_decode
VALUE Message_decode(VALUE klass, VALUE data)
Definition: ruby/ext/google/protobuf_c/encode_decode.c:856
Map_iter
Definition: ruby/ext/google/protobuf_c/protobuf.h:480
MessageBuilderContext_alloc
VALUE MessageBuilderContext_alloc(VALUE klass)
Definition: defs.c:1491
Message_index
VALUE Message_index(VALUE _self, VALUE field_name)
Definition: ruby/ext/google/protobuf_c/message.c:656
MessageBuilderContext_register
void MessageBuilderContext_register(VALUE module)
Definition: defs.c:1500
_EnumDescriptor_type
const rb_data_type_t _EnumDescriptor_type
RepeatedField_insert
VALUE RepeatedField_insert(int argc, VALUE *argv, VALUE _self)
RepeatedField_to_ary
VALUE RepeatedField_to_ary(VALUE _self)
Definition: repeated_field.c:384
FileDescriptor
Definition: ruby/ext/google/protobuf_c/protobuf.h:125
Message_encode
VALUE Message_encode(VALUE klass, VALUE msg_rb)
Definition: ruby/ext/google/protobuf_c/encode_decode.c:1442
Message_hash
VALUE Message_hash(VALUE _self)
Definition: ruby/ext/google/protobuf_c/message.c:564
label
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:4316
FieldDescriptor_mark
void FieldDescriptor_mark(void *_self)
Definition: defs.c:647
Builder::defs
upb_def ** defs
Definition: ruby/ext/google/protobuf_c/protobuf.h:165
MessageBuilderContext_free
void MessageBuilderContext_free(void *_self)
Definition: defs.c:1486
RepeatedField_init
VALUE RepeatedField_init(int argc, VALUE *argv, VALUE self)
Definition: repeated_field.c:626
RepeatedField_clear
VALUE RepeatedField_clear(VALUE _self)
Definition: repeated_field.c:302
RepeatedField_push
VALUE RepeatedField_push(VALUE _self, VALUE val)
Definition: repeated_field.c:212
native_slot_set_value_and_case
void native_slot_set_value_and_case(const char *name, upb_fieldtype_t type, VALUE type_class, void *memory, VALUE value, uint32_t *case_memory, uint32_t case_number)
Definition: ruby/ext/google/protobuf_c/storage.c:120
MessageField
Definition: php/ext/google/protobuf/protobuf.h:920
ruby_to_Map
Map * ruby_to_Map(VALUE value)
Definition: ruby/ext/google/protobuf_c/map.c:139
DescriptorPool_mark
void DescriptorPool_mark(void *_self)
Definition: defs.c:99
validate_type_class
void validate_type_class(upb_fieldtype_t type, VALUE klass)
Definition: repeated_field.c:523
ruby_to_Descriptor
Descriptor * ruby_to_Descriptor(VALUE value)
FileBuilderContext_add_message
VALUE FileBuilderContext_add_message(VALUE _self, VALUE name)
Definition: defs.c:2011
MessageBuilderContext_mark
void MessageBuilderContext_mark(void *_self)
Definition: defs.c:1480
Message_data
void * Message_data(void *msg)
Definition: ruby/ext/google/protobuf_c/message.c:37
layout_inspect
VALUE layout_inspect(MessageLayout *layout, void *storage)
Definition: ruby/ext/google/protobuf_c/storage.c:1039
layout_get_default
VALUE layout_get_default(const upb_fielddef *field)
Definition: ruby/ext/google/protobuf_c/storage.c:707
Builder_free
void Builder_free(void *_self)
Definition: defs.c:2062
FileBuilderContext::pending_list
VALUE pending_list
Definition: ruby/ext/google/protobuf_c/protobuf.h:157
field_type_class
VALUE field_type_class(const upb_fielddef *field)
Definition: ruby/ext/google/protobuf_c/storage.c:583
RepeatedField::field_type
upb_fieldtype_t field_type
Definition: ruby/ext/google/protobuf_c/protobuf.h:396
Descriptor_free
void Descriptor_free(void *_self)
Definition: defs.c:233
OneofDescriptor_name
VALUE OneofDescriptor_name(VALUE _self)
Definition: defs.c:1204
ruby_to_fieldtype
upb_fieldtype_t ruby_to_fieldtype(VALUE type)
Definition: defs.c:724
Map_begin
void Map_begin(VALUE _self, Map_iter *iter)
Definition: ruby/ext/google/protobuf_c/map.c:802
RepeatedField_length
VALUE RepeatedField_length(VALUE _self)
Definition: repeated_field.c:314
Descriptor_add_oneof
VALUE Descriptor_add_oneof(VALUE _self, VALUE obj)
Definition: defs.c:436
RepeatedField_free
void RepeatedField_free(void *self)
Definition: repeated_field.c:599
cFieldDescriptor
VALUE cFieldDescriptor
native_slot_init
void native_slot_init(upb_fieldtype_t type, void *memory)
Definition: ruby/ext/google/protobuf_c/storage.c:308
Message_method_missing
VALUE Message_method_missing(int argc, VALUE *argv, VALUE _self)
Definition: ruby/ext/google/protobuf_c/message.c:284
cFileBuilderContext
VALUE cFileBuilderContext
descriptor
Descriptor * descriptor
Definition: php/ext/google/protobuf/protobuf.h:936
Map_clear
VALUE Map_clear(VALUE _self)
Definition: ruby/ext/google/protobuf_c/map.c:467
Map_eq
VALUE Map_eq(VALUE _self, VALUE _other)
Definition: ruby/ext/google/protobuf_c/map.c:582
OneofBuilderContext_register
void OneofBuilderContext_register(VALUE module)
Definition: defs.c:1828
FieldDescriptor_name
VALUE FieldDescriptor_name(VALUE _self)
Definition: defs.c:703
Descriptor_name_set
VALUE Descriptor_name_set(VALUE _self, VALUE str)
Definition: defs.c:357
Builder_initialize
VALUE Builder_initialize(VALUE _self)
Definition: defs.c:2104
Builder_mark
void Builder_mark(void *_self)
Definition: defs.c:2056
OneofBuilderContext_mark
void OneofBuilderContext_mark(void *_self)
Definition: defs.c:1808
layout_eq
VALUE layout_eq(MessageLayout *layout, void *msg1, void *msg2)
Definition: ruby/ext/google/protobuf_c/storage.c:981
EnumBuilderContext::enumdesc
VALUE enumdesc
Definition: ruby/ext/google/protobuf_c/protobuf.h:153
EnumDescriptor_register
void EnumDescriptor_register(VALUE module)
Definition: defs.c:1303
FieldDescriptor_label_set
VALUE FieldDescriptor_label_set(VALUE _self, VALUE label)
Definition: defs.c:963
Descriptor
Definition: ruby/ext/google/protobuf_c/protobuf.h:113
EnumDescriptor_free
void EnumDescriptor_free(void *_self)
Definition: defs.c:1281
native_slot_eq
bool native_slot_eq(upb_fieldtype_t type, void *mem1, void *mem2)
Definition: ruby/ext/google/protobuf_c/storage.c:382
map_entry_key
const upb_fielddef * map_entry_key(const upb_msgdef *msgdef)
Definition: php/ext/google/protobuf/storage.c:540
Map_set_frame
VALUE Map_set_frame(VALUE self, VALUE val)
Definition: ruby/ext/google/protobuf_c/map.c:178
RepeatedField::size
int size
Definition: ruby/ext/google/protobuf_c/protobuf.h:399
Map::value_type_class
VALUE value_type_class
Definition: ruby/ext/google/protobuf_c/protobuf.h:445
DescriptorPool::symtab
upb_symtab * symtab
Definition: ruby/ext/google/protobuf_c/protobuf.h:110
layout
MessageLayout * layout
Definition: php/ext/google/protobuf/protobuf.h:800
Map_to_h
VALUE Map_to_h(VALUE _self)
Definition: ruby/ext/google/protobuf_c/map.c:675
map_field_key
const upb_fielddef * map_field_key(const upb_fielddef *field)
Definition: php/ext/google/protobuf/storage.c:530
MessageBuilderContext_oneof
VALUE MessageBuilderContext_oneof(VALUE _self, VALUE name)
Definition: defs.c:1787
FileDescriptor_free
void FileDescriptor_free(void *_self)
Definition: defs.c:514
Builder_add_file
VALUE Builder_add_file(int argc, VALUE *argv, VALUE _self)
Definition: defs.c:2124
map_entry_value
const upb_fielddef * map_entry_value(const upb_msgdef *msgdef)
Definition: php/ext/google/protobuf/storage.c:546
ruby_to_Builder
Builder * ruby_to_Builder(VALUE value)
Message_encode_json
VALUE Message_encode_json(int argc, VALUE *argv, VALUE klass)
Definition: ruby/ext/google/protobuf_c/encode_decode.c:1480
cMap
VALUE cMap
Definition: ruby/ext/google/protobuf_c/map.c:137
DescriptorPool_free
void DescriptorPool_free(void *_self)
Definition: defs.c:102
MessageBuilderContext_optional
VALUE MessageBuilderContext_optional(int argc, VALUE *argv, VALUE _self)
Definition: defs.c:1588
enum_lookup
VALUE enum_lookup(VALUE self, VALUE number)
Definition: ruby/ext/google/protobuf_c/message.c:760
upb_oneofdef
Definition: php/ext/google/protobuf/upb.c:1176
FileBuilderContext_add_enum
VALUE FileBuilderContext_add_enum(VALUE _self, VALUE name)
Definition: defs.c:2033
FieldDescriptor
Definition: ruby/ext/google/protobuf_c/protobuf.h:129
Descriptor_add_field
VALUE Descriptor_add_field(VALUE _self, VALUE obj)
Definition: defs.c:413
MessageField::hasbit
size_t hasbit
Definition: ruby/ext/google/protobuf_c/protobuf.h:501
OneofBuilderContext
Definition: ruby/ext/google/protobuf_c/protobuf.h:147
Map_next
void Map_next(Map_iter *iter)
Definition: ruby/ext/google/protobuf_c/map.c:808
FieldDescriptor_submsg_name_set
VALUE FieldDescriptor_submsg_name_set(VALUE _self, VALUE value)
Definition: defs.c:1047
build_module_from_enumdesc
VALUE build_module_from_enumdesc(EnumDescriptor *enumdef)
Definition: ruby/ext/google/protobuf_c/message.c:805
Message_index_set
VALUE Message_index_set(VALUE _self, VALUE field_name, VALUE value)
Definition: ruby/ext/google/protobuf_c/message.c:675
FileBuilderContext_alloc
VALUE FileBuilderContext_alloc(VALUE klass)
Definition: defs.c:1964
_Descriptor_type
const rb_data_type_t _Descriptor_type
cOneofBuilderContext
VALUE cOneofBuilderContext
obj
GLsizei GLsizei GLuint * obj
Definition: glcorearb.h:3066
Message_to_h
VALUE Message_to_h(VALUE _self)
Definition: ruby/ext/google/protobuf_c/message.c:599
FieldDescriptor_free
void FieldDescriptor_free(void *_self)
Definition: defs.c:650
EnumDescriptor::module
VALUE module
Definition: ruby/ext/google/protobuf_c/protobuf.h:139
RepeatedField_index
VALUE RepeatedField_index(int argc, VALUE *argv, VALUE _self)
Definition: repeated_field.c:108
FieldDescriptor_alloc
VALUE FieldDescriptor_alloc(VALUE klass)
Definition: defs.c:663
OneofBuilderContext_free
void OneofBuilderContext_free(void *_self)
Definition: defs.c:1814
cEnumBuilderContext
VALUE cEnumBuilderContext
upb_byteshandler
Definition: php/ext/google/protobuf/upb.h:4650
Descriptor_each
VALUE Descriptor_each(VALUE _self)
Definition: defs.c:373
Descriptor::msgdef
const upb_msgdef * msgdef
Definition: ruby/ext/google/protobuf_c/protobuf.h:114
FileBuilderContext_initialize
VALUE FileBuilderContext_initialize(VALUE _self, VALUE file_descriptor, VALUE builder)
Definition: defs.c:1991
FieldDescriptor_get
VALUE FieldDescriptor_get(VALUE _self, VALUE msg_rb)
Definition: defs.c:1089
native_slot_mark
void native_slot_mark(upb_fieldtype_t type, void *memory)
Definition: ruby/ext/google/protobuf_c/storage.c:346
DescriptorPool_register
void DescriptorPool_register(VALUE module)
Definition: defs.c:120
Descriptor::json_fill_method
const upb_json_parsermethod * json_fill_method
Definition: ruby/ext/google/protobuf_c/protobuf.h:119
OneofDescriptor_mark
void OneofDescriptor_mark(void *_self)
Definition: defs.c:1162
Message_dup
VALUE Message_dup(VALUE _self)
Definition: ruby/ext/google/protobuf_c/message.c:498
RepeatedField_replace
VALUE RepeatedField_replace(VALUE _self, VALUE list)
Definition: repeated_field.c:286
MessageLayout::fields
MessageField * fields
Definition: php/ext/google/protobuf/protobuf.h:929
FieldDescriptor_default
VALUE FieldDescriptor_default(VALUE _self)
Definition: defs.c:872
update_failure_list.str
str
Definition: update_failure_list.py:41
FieldDescriptor_type_set
VALUE FieldDescriptor_type_set(VALUE _self, VALUE type)
Definition: defs.c:859
EnumDescriptor_enummodule
VALUE EnumDescriptor_enummodule(VALUE _self)
Definition: defs.c:1460
Map_done
bool Map_done(Map_iter *iter)
Definition: ruby/ext/google/protobuf_c/map.c:812
FileDescriptor_mark
void FileDescriptor_mark(void *_self)
Definition: defs.c:511
FileBuilderContext_pending_descriptors
VALUE FileBuilderContext_pending_descriptors(VALUE _self)
Definition: defs.c:2045
check_upb_status
void check_upb_status(const upb_status *status, const char *msg)
Definition: ruby/ext/google/protobuf_c/protobuf.c:59
FileBuilderContext_mark
void FileBuilderContext_mark(void *_self)
Definition: defs.c:1952
layout_clear
void layout_clear(MessageLayout *layout, const void *storage, const upb_fielddef *field)
Definition: ruby/ext/google/protobuf_c/storage.c:647
DescriptorPool_build
VALUE DescriptorPool_build(int argc, VALUE *argv, VALUE _self)
Definition: defs.c:184
upb_symtab
Definition: php/ext/google/protobuf/upb.c:1202
Map_merge
VALUE Map_merge(VALUE _self, VALUE hashmap)
Definition: ruby/ext/google/protobuf_c/map.c:750
FileBuilderContext_free
void FileBuilderContext_free(void *_self)
Definition: defs.c:1959
EnumDescriptor_name
VALUE EnumDescriptor_name(VALUE _self)
Definition: defs.c:1356
Descriptor_lookup_oneof
VALUE Descriptor_lookup_oneof(VALUE _self, VALUE name)
Definition: defs.c:476
layout_deep_copy
void layout_deep_copy(MessageLayout *layout, void *to, void *from)
Definition: ruby/ext/google/protobuf_c/storage.c:947
Builder_add_message
VALUE Builder_add_message(VALUE _self, VALUE name)
Definition: defs.c:2148
MessageBuilderContext_required
VALUE MessageBuilderContext_required(int argc, VALUE *argv, VALUE _self)
Definition: defs.c:1620
OneofDescriptor_register
void OneofDescriptor_register(VALUE module)
Definition: defs.c:1185
size
#define size
Definition: glcorearb.h:2944
OneofDescriptor_alloc
VALUE OneofDescriptor_alloc(VALUE klass)
Definition: defs.c:1178
native_slot_deep_copy
void native_slot_deep_copy(upb_fieldtype_t type, void *to, void *from)
Definition: ruby/ext/google/protobuf_c/storage.c:362
Builder_alloc
VALUE Builder_alloc(VALUE klass)
Definition: defs.c:2076
FileDescriptor_syntax_set
VALUE FileDescriptor_syntax_set(VALUE _self, VALUE syntax)
Definition: defs.c:622
Builder_add_enum
VALUE Builder_add_enum(VALUE _self, VALUE name)
Definition: defs.c:2173
EnumDescriptor_mark
void EnumDescriptor_mark(void *_self)
Definition: defs.c:1276
EnumBuilderContext_register
void EnumBuilderContext_register(VALUE module)
Definition: defs.c:1902
RepeatedField_register
void RepeatedField_register(VALUE module)
Definition: repeated_field.c:631
upb_fielddef
Definition: php/ext/google/protobuf/upb.c:1118
RepeatedField_each
VALUE RepeatedField_each(VALUE _self)
Definition: repeated_field.c:86
upb_filedef
Definition: php/ext/google/protobuf/upb.c:1184
layout_has
VALUE layout_has(MessageLayout *layout, const void *storage, const upb_fielddef *field)
Definition: ruby/ext/google/protobuf_c/storage.c:640
FieldDescriptor_number
VALUE FieldDescriptor_number(VALUE _self)
Definition: defs.c:1000
cDescriptor
VALUE cDescriptor
EnumDescriptor
Definition: ruby/ext/google/protobuf_c/protobuf.h:137
DescriptorPool_add
VALUE DescriptorPool_add(VALUE _self, VALUE def)
Definition: defs.c:160
RepeatedField_inspect
VALUE RepeatedField_inspect(VALUE _self)
Descriptor::pb_serialize_handlers
const upb_handlers * pb_serialize_handlers
Definition: ruby/ext/google/protobuf_c/protobuf.h:120
new_fillmsg_decodermethod
const upb_pbdecodermethod * new_fillmsg_decodermethod(Descriptor *descriptor, const void *owner)
Definition: ruby/ext/google/protobuf_c/encode_decode.c:783
field
const FieldDescriptor * field
Definition: parser_unittest.cc:2694
key
const SETUP_TEARDOWN_TESTCONTEXT char * key
Definition: test_wss_transport.cpp:10
native_slot_check_int_range_precision
void native_slot_check_int_range_precision(const char *name, upb_fieldtype_t type, VALUE value)
Definition: ruby/ext/google/protobuf_c/storage.c:68
FieldDescriptor_number_set
VALUE FieldDescriptor_number_set(VALUE _self, VALUE number)
Definition: defs.c:1012
FileDescriptor_syntax
VALUE FileDescriptor_syntax(VALUE _self)
Definition: defs.c:606
cEnumDescriptor
VALUE cEnumDescriptor
RepeatedField_index_set
VALUE RepeatedField_index_set(VALUE _self, VALUE _index, VALUE val)
Definition: repeated_field.c:158
RepeatedField_reserve
void RepeatedField_reserve(RepeatedField *self, int new_size)
Definition: repeated_field.c:187
Map::table
upb_strtable table
Definition: ruby/ext/google/protobuf_c/protobuf.h:447
MessageBuilderContext
Definition: ruby/ext/google/protobuf_c/protobuf.h:142
ruby_to_OneofBuilderContext
OneofBuilderContext * ruby_to_OneofBuilderContext(VALUE value)
MessageBuilderContext::builder
VALUE builder
Definition: ruby/ext/google/protobuf_c/protobuf.h:144
FieldDescriptor_set
VALUE FieldDescriptor_set(VALUE _self, VALUE msg_rb, VALUE value)
Definition: defs.c:1145
RepeatedField::capacity
int capacity
Definition: ruby/ext/google/protobuf_c/protobuf.h:400
EnumBuilderContext_value
VALUE EnumBuilderContext_value(VALUE _self, VALUE name, VALUE number)
Definition: defs.c:1939
fieldtype_to_ruby
VALUE fieldtype_to_ruby(upb_fieldtype_t type)
Definition: defs.c:752
FileDescriptor_initialize
VALUE FileDescriptor_initialize(int argc, VALUE *argv, VALUE _self)
Definition: defs.c:556
EnumDescriptor_initialize
VALUE EnumDescriptor_initialize(VALUE _self, VALUE file_descriptor_rb)
Definition: defs.c:1327
Map_type
const rb_data_type_t Map_type
Definition: ruby/ext/google/protobuf_c/map.c:132
EnumDescriptor_lookup_name
VALUE EnumDescriptor_lookup_name(VALUE _self, VALUE name)
Definition: defs.c:1402
OneofDescriptor_free
void OneofDescriptor_free(void *_self)
Definition: defs.c:1165
FileDescriptor_name
VALUE FileDescriptor_name(VALUE _self)
Definition: defs.c:591
Map_iter::it
upb_strtable_iter it
Definition: ruby/ext/google/protobuf_c/protobuf.h:482
FileBuilderContext::builder
VALUE builder
Definition: ruby/ext/google/protobuf_c/protobuf.h:159
layout_dup
void layout_dup(MessageLayout *layout, void *to, void *from)
Definition: ruby/ext/google/protobuf_c/storage.c:915
get_def_obj
VALUE get_def_obj(const void *def)
Definition: php/ext/google/protobuf/protobuf.c:112
Builder
Definition: ruby/ext/google/protobuf_c/protobuf.h:162
Message_type
rb_data_type_t Message_type
Definition: ruby/ext/google/protobuf_c/message.c:55
RepeatedField::field_type_class
VALUE field_type_class
Definition: ruby/ext/google/protobuf_c/protobuf.h:397
build_class_from_descriptor
VALUE build_class_from_descriptor(Descriptor *descriptor)
Definition: ruby/ext/google/protobuf_c/message.c:699
Map_dup
VALUE Map_dup(VALUE _self)
Definition: ruby/ext/google/protobuf_c/map.c:514
Map_deep_copy
VALUE Map_deep_copy(VALUE _self)
Definition: ruby/ext/google/protobuf_c/map.c:542
RepeatedField_pop_one
VALUE RepeatedField_pop_one(VALUE _self)
Definition: repeated_field.c:261
FieldDescriptor_label
VALUE FieldDescriptor_label(VALUE _self)
Definition: defs.c:940
RepeatedField_hash
VALUE RepeatedField_hash(VALUE _self)
Definition: repeated_field.c:454
type
GLenum type
Definition: glcorearb.h:2695
FileBuilderContext::file_descriptor
VALUE file_descriptor
Definition: ruby/ext/google/protobuf_c/protobuf.h:158
Message_deep_copy
VALUE Message_deep_copy(VALUE _self)
Definition: ruby/ext/google/protobuf_c/message.c:515
RepeatedField_dup
VALUE RepeatedField_dup(VALUE _self)
Definition: repeated_field.c:340
FileDescriptor_register
void FileDescriptor_register(VALUE module)
Definition: defs.c:535
kRubyStringUtf8Encoding
rb_encoding * kRubyStringUtf8Encoding
Definition: ruby/ext/google/protobuf_c/protobuf.c:67
FileBuilderContext
Definition: ruby/ext/google/protobuf_c/protobuf.h:156
Map_register
void Map_register(VALUE module)
Definition: ruby/ext/google/protobuf_c/map.c:831
OneofBuilderContext_initialize
VALUE OneofBuilderContext_initialize(VALUE _self, VALUE descriptor, VALUE builder)
Definition: defs.c:1847
is_map_field
bool is_map_field(const upb_fielddef *field)
Definition: php/ext/google/protobuf/storage.c:526
EnumBuilderContext_mark
void EnumBuilderContext_mark(void *_self)
Definition: defs.c:1884
len
int len
Definition: php/ext/google/protobuf/map.c:206
OneofBuilderContext_optional
VALUE OneofBuilderContext_optional(int argc, VALUE *argv, VALUE _self)
Definition: defs.c:1866
upb_enumdef
Definition: php/ext/google/protobuf/upb.c:1168
ruby_to_MessageBuilderContext
MessageBuilderContext * ruby_to_MessageBuilderContext(VALUE value)
MessageLayout::msgdef
const upb_msgdef * msgdef
Definition: php/ext/google/protobuf/protobuf.h:928
RepeatedField_plus
VALUE RepeatedField_plus(VALUE _self, VALUE list)
Definition: repeated_field.c:480
Map_mark
void Map_mark(void *self)
Definition: ruby/ext/google/protobuf_c/map.c:145
OneofDescriptor
Definition: ruby/ext/google/protobuf_c/protobuf.h:133
MessageBuilderContext_map
VALUE MessageBuilderContext_map(int argc, VALUE *argv, VALUE _self)
Definition: defs.c:1675
map_field_value
const upb_fielddef * map_field_value(const upb_fielddef *field)
Definition: php/ext/google/protobuf/storage.c:535
ruby_to_EnumDescriptor
EnumDescriptor * ruby_to_EnumDescriptor(VALUE value)
native_slot_set
void native_slot_set(const char *name, upb_fieldtype_t type, VALUE type_class, void *memory, VALUE value)
Definition: ruby/ext/google/protobuf_c/storage.c:114
layout_mark
void layout_mark(MessageLayout *layout, void *storage)
Definition: ruby/ext/google/protobuf_c/storage.c:894
Descriptor::fill_method
const upb_pbdecodermethod * fill_method
Definition: ruby/ext/google/protobuf_c/protobuf.h:118
RepeatedField_type
const rb_data_type_t RepeatedField_type
Definition: repeated_field.c:37
Map_keys
VALUE Map_keys(VALUE _self)
Definition: ruby/ext/google/protobuf_c/map.c:311
Map::key_type
upb_fieldtype_t key_type
Definition: ruby/ext/google/protobuf_c/protobuf.h:443
OneofDescriptor_add_field
VALUE OneofDescriptor_add_field(VALUE _self, VALUE field)
Definition: defs.c:1239
native_slot_size
size_t native_slot_size(upb_fieldtype_t type)
Definition: php/ext/google/protobuf/storage.c:43
Map_inspect
VALUE Map_inspect(VALUE _self)
Definition: ruby/ext/google/protobuf_c/map.c:706
DescriptorPool_generated_pool
VALUE DescriptorPool_generated_pool(VALUE _self)
Definition: defs.c:218
descriptor_instancevar_interned
ID descriptor_instancevar_interned
Definition: ruby/ext/google/protobuf_c/protobuf.c:78
Descriptor_each_oneof
VALUE Descriptor_each_oneof(VALUE _self)
Definition: defs.c:455
native_slot_encode_and_freeze_string
VALUE native_slot_encode_and_freeze_string(upb_fieldtype_t type, VALUE value)
Definition: ruby/ext/google/protobuf_c/storage.c:94
Map_alloc
VALUE Map_alloc(VALUE klass)
Definition: ruby/ext/google/protobuf_c/map.c:171
Message_mark
void Message_mark(void *self)
Definition: ruby/ext/google/protobuf_c/message.c:41
EnumBuilderContext_initialize
VALUE EnumBuilderContext_initialize(VALUE _self, VALUE enumdesc)
Definition: defs.c:1920
RepeatedField_index_native
void * RepeatedField_index_native(VALUE _self, int index)
Definition: repeated_field.c:246
RepeatedField_eq
VALUE RepeatedField_eq(VALUE _self, VALUE _other)
Definition: repeated_field.c:412
Google_Protobuf_deep_copy
VALUE Google_Protobuf_deep_copy(VALUE self, VALUE obj)
Definition: ruby/ext/google/protobuf_c/message.c:839
field_contains_hasbit
bool field_contains_hasbit(MessageLayout *layout, const upb_fielddef *field)
Definition: ruby/ext/google/protobuf_c/storage.c:452
FieldDescriptor_clear
VALUE FieldDescriptor_clear(VALUE _self, VALUE msg_rb)
Definition: defs.c:1125
ruby_to_EnumBuilderContext
EnumBuilderContext * ruby_to_EnumBuilderContext(VALUE value)
ruby_to_RepeatedField
RepeatedField * ruby_to_RepeatedField(VALUE value)
Definition: repeated_field.c:44
EnumDescriptor_alloc
VALUE EnumDescriptor_alloc(VALUE klass)
Definition: defs.c:1295
upb_strtable
Definition: php/ext/google/protobuf/upb.h:2819
OneofBuilderContext::descriptor
VALUE descriptor
Definition: ruby/ext/google/protobuf_c/protobuf.h:148
Descriptor::json_serialize_handlers_preserve
const upb_handlers * json_serialize_handlers_preserve
Definition: ruby/ext/google/protobuf_c/protobuf.h:122
handler
void * handler
Definition: test_security_curve.cpp:27
Map_index_set
VALUE Map_index_set(VALUE _self, VALUE key, VALUE value)
Definition: ruby/ext/google/protobuf_c/map.c:388
Descriptor_initialize
VALUE Descriptor_initialize(VALUE _self, VALUE file_descriptor_rb)
Definition: defs.c:314
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: glcorearb.h:2879
OneofDescriptor_each
VALUE OneofDescriptor_each(VALUE _self, VALUE field)
Definition: defs.c:1257
EnumDescriptor_each
VALUE EnumDescriptor_each(VALUE _self)
Definition: defs.c:1438
MessageBuilderContext::descriptor
VALUE descriptor
Definition: ruby/ext/google/protobuf_c/protobuf.h:143
upb_def
Definition: ruby/ext/google/protobuf_c/upb.h:1844
Map_free
void Map_free(void *self)
Definition: ruby/ext/google/protobuf_c/map.c:165
FieldDescriptor_submsg_name
VALUE FieldDescriptor_submsg_name(VALUE _self)
Definition: defs.c:1029
upb_bytessink
Definition: php/ext/google/protobuf/upb.h:6031
MessageLayout
Definition: php/ext/google/protobuf/protobuf.h:927
Descriptor::json_serialize_handlers
const upb_handlers * json_serialize_handlers
Definition: ruby/ext/google/protobuf_c/protobuf.h:121
cFileDescriptor
VALUE cFileDescriptor
Map_values
VALUE Map_values(VALUE _self)
Definition: ruby/ext/google/protobuf_c/map.c:335
val
GLuint GLfloat * val
Definition: glcorearb.h:3604
Map_delete
VALUE Map_delete(VALUE _self, VALUE key)
Definition: ruby/ext/google/protobuf_c/map.c:442
Descriptor_name
VALUE Descriptor_name(VALUE _self)
Definition: defs.c:345
EnumBuilderContext
Definition: ruby/ext/google/protobuf_c/protobuf.h:152
Map::parse_frame
VALUE parse_frame
Definition: ruby/ext/google/protobuf_c/protobuf.h:446
value
GLsizei const GLfloat * value
Definition: glcorearb.h:3093
EnumDescriptor_lookup_value
VALUE EnumDescriptor_lookup_value(VALUE _self, VALUE number)
Definition: defs.c:1420
upb.h
Descriptor::fill_handlers
const upb_handlers * fill_handlers
Definition: ruby/ext/google/protobuf_c/protobuf.h:117
Descriptor::klass
VALUE klass
Definition: ruby/ext/google/protobuf_c/protobuf.h:116
OneofDescriptor_name_set
VALUE OneofDescriptor_name_set(VALUE _self, VALUE value)
Definition: defs.c:1216
RepeatedField_deep_copy
VALUE RepeatedField_deep_copy(VALUE _self)
Definition: repeated_field.c:359
upb_strtable_iter
Definition: php/ext/google/protobuf/upb.h:3061
EnumBuilderContext_alloc
VALUE EnumBuilderContext_alloc(VALUE klass)
Definition: defs.c:1894
DescriptorPool_lookup
VALUE DescriptorPool_lookup(VALUE _self, VALUE name)
Definition: defs.c:199
Map::value_type
upb_fieldtype_t value_type
Definition: ruby/ext/google/protobuf_c/protobuf.h:444
enumdef
const upb_enumdef * enumdef
Definition: php/ext/google/protobuf/protobuf.h:830
Builder_finalize_to_pool
VALUE Builder_finalize_to_pool(VALUE _self, VALUE pool_rb)
Definition: defs.c:2222
DescriptorPool
Definition: ruby/ext/google/protobuf_c/protobuf.h:109
generated_pool
VALUE generated_pool
Definition: def.c:582
cError
VALUE cError
Definition: ruby/ext/google/protobuf_c/protobuf.c:42
Map_length
VALUE Map_length(VALUE _self)
Definition: ruby/ext/google/protobuf_c/map.c:487
FieldDescriptor_name_set
VALUE FieldDescriptor_name_set(VALUE _self, VALUE str)
Definition: defs.c:715
Builder::default_file_descriptor
VALUE default_file_descriptor
Definition: ruby/ext/google/protobuf_c/protobuf.h:164
Descriptor_register
void Descriptor_register(VALUE module)
Definition: defs.c:288
cTypeError
VALUE cTypeError
Definition: ruby/ext/google/protobuf_c/protobuf.c:44
index
GLuint index
Definition: glcorearb.h:3055
OneofBuilderContext_alloc
VALUE OneofBuilderContext_alloc(VALUE klass)
Definition: defs.c:1819
FileDescriptor::filedef
const upb_filedef * filedef
Definition: ruby/ext/google/protobuf_c/protobuf.h:126
upb_handlers
Definition: php/ext/google/protobuf/upb.c:3269
kRubyStringASCIIEncoding
rb_encoding * kRubyStringASCIIEncoding
Definition: ruby/ext/google/protobuf_c/protobuf.c:68
MessageField::case_offset
size_t case_offset
Definition: php/ext/google/protobuf/protobuf.h:924
Message_alloc
VALUE Message_alloc(VALUE klass)
Definition: ruby/ext/google/protobuf_c/message.c:60
DescriptorPool_alloc
VALUE DescriptorPool_alloc(VALUE klass)
Definition: defs.c:114
Map_iter_value
VALUE Map_iter_value(Map_iter *iter)
Definition: ruby/ext/google/protobuf_c/map.c:823
klass
zend_class_entry * klass
Definition: php/ext/google/protobuf/protobuf.h:801
number
double number
Definition: cJSON.h:326
Descriptor::layout
MessageLayout * layout
Definition: ruby/ext/google/protobuf_c/protobuf.h:115
RepeatedField_alloc
VALUE RepeatedField_alloc(VALUE klass)
Definition: repeated_field.c:616
FileBuilderContext_register
void FileBuilderContext_register(VALUE module)
Definition: defs.c:1973
FieldDescriptor_has
VALUE FieldDescriptor_has(VALUE _self, VALUE msg_rb)
Definition: defs.c:1106
RepeatedField_size
int RepeatedField_size(VALUE _self)
Definition: repeated_field.c:253
upb_msgdef
Definition: php/ext/google/protobuf/upb.c:1146
EnumDescriptor_add_value
VALUE EnumDescriptor_add_value(VALUE _self, VALUE name, VALUE number)
Definition: defs.c:1385
upb_fieldtype_t
upb_fieldtype_t
Definition: php/ext/google/protobuf/upb.h:410
kRubyString8bitEncoding
rb_encoding * kRubyString8bitEncoding
Definition: ruby/ext/google/protobuf_c/protobuf.c:69
FieldDescriptor_subtype
VALUE FieldDescriptor_subtype(VALUE _self)
Definition: defs.c:1068
stringsink
Definition: php/ext/google/protobuf/protobuf.h:1460
upb_pbdecodermethod
Definition: php/ext/google/protobuf/upb.h:6574
RepeatedField
Definition: ruby/ext/google/protobuf_c/protobuf.h:395
EnumBuilderContext_free
void EnumBuilderContext_free(void *_self)
Definition: defs.c:1889
Descriptor_msgclass
VALUE Descriptor_msgclass(VALUE _self)
Definition: defs.c:493


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:58