Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2014 Google Inc. All rights reserved. 2 // Copyright 2014 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 extern VALUE cFieldDescriptor; 159 extern VALUE cFieldDescriptor;
160 extern VALUE cEnumDescriptor; 160 extern VALUE cEnumDescriptor;
161 extern VALUE cMessageBuilderContext; 161 extern VALUE cMessageBuilderContext;
162 extern VALUE cOneofBuilderContext; 162 extern VALUE cOneofBuilderContext;
163 extern VALUE cEnumBuilderContext; 163 extern VALUE cEnumBuilderContext;
164 extern VALUE cBuilder; 164 extern VALUE cBuilder;
165 165
166 extern VALUE cError; 166 extern VALUE cError;
167 extern VALUE cParseError; 167 extern VALUE cParseError;
168 168
169 extern VALUE map_parse_frames;
170
171 // We forward-declare all of the Ruby method implementations here because we 169 // We forward-declare all of the Ruby method implementations here because we
172 // sometimes call the methods directly across .c files, rather than going 170 // sometimes call the methods directly across .c files, rather than going
173 // through Ruby's method dispatching (e.g. during message parse). It's cleaner 171 // through Ruby's method dispatching (e.g. during message parse). It's cleaner
174 // to keep the list of object methods together than to split them between 172 // to keep the list of object methods together than to split them between
175 // static-in-file definitions and header declarations. 173 // static-in-file definitions and header declarations.
176 174
177 void DescriptorPool_mark(void* _self); 175 void DescriptorPool_mark(void* _self);
178 void DescriptorPool_free(void* _self); 176 void DescriptorPool_free(void* _self);
179 VALUE DescriptorPool_alloc(VALUE klass); 177 VALUE DescriptorPool_alloc(VALUE klass);
180 void DescriptorPool_register(VALUE module); 178 void DescriptorPool_register(VALUE module);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 uint32_t case_number); 306 uint32_t case_number);
309 VALUE native_slot_get(upb_fieldtype_t type, 307 VALUE native_slot_get(upb_fieldtype_t type,
310 VALUE type_class, 308 VALUE type_class,
311 const void* memory); 309 const void* memory);
312 void native_slot_init(upb_fieldtype_t type, void* memory); 310 void native_slot_init(upb_fieldtype_t type, void* memory);
313 void native_slot_mark(upb_fieldtype_t type, void* memory); 311 void native_slot_mark(upb_fieldtype_t type, void* memory);
314 void native_slot_dup(upb_fieldtype_t type, void* to, void* from); 312 void native_slot_dup(upb_fieldtype_t type, void* to, void* from);
315 void native_slot_deep_copy(upb_fieldtype_t type, void* to, void* from); 313 void native_slot_deep_copy(upb_fieldtype_t type, void* to, void* from);
316 bool native_slot_eq(upb_fieldtype_t type, void* mem1, void* mem2); 314 bool native_slot_eq(upb_fieldtype_t type, void* mem1, void* mem2);
317 315
318 VALUE native_slot_encode_and_freeze_string(upb_fieldtype_t type, VALUE value); 316 void native_slot_validate_string_encoding(upb_fieldtype_t type, VALUE value);
319 void native_slot_check_int_range_precision(upb_fieldtype_t type, VALUE value); 317 void native_slot_check_int_range_precision(upb_fieldtype_t type, VALUE value);
320 318
321 extern rb_encoding* kRubyStringUtf8Encoding; 319 extern rb_encoding* kRubyStringUtf8Encoding;
322 extern rb_encoding* kRubyStringASCIIEncoding; 320 extern rb_encoding* kRubyStringASCIIEncoding;
323 extern rb_encoding* kRubyString8bitEncoding; 321 extern rb_encoding* kRubyString8bitEncoding;
324 322
325 VALUE field_type_class(const upb_fielddef* field); 323 VALUE field_type_class(const upb_fielddef* field);
326 324
327 #define MAP_KEY_FIELD 1 325 #define MAP_KEY_FIELD 1
328 #define MAP_VALUE_FIELD 2 326 #define MAP_VALUE_FIELD 2
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 void RepeatedField_register(VALUE module); 359 void RepeatedField_register(VALUE module);
362 360
363 extern const rb_data_type_t RepeatedField_type; 361 extern const rb_data_type_t RepeatedField_type;
364 extern VALUE cRepeatedField; 362 extern VALUE cRepeatedField;
365 363
366 RepeatedField* ruby_to_RepeatedField(VALUE value); 364 RepeatedField* ruby_to_RepeatedField(VALUE value);
367 365
368 VALUE RepeatedField_each(VALUE _self); 366 VALUE RepeatedField_each(VALUE _self);
369 VALUE RepeatedField_index(int argc, VALUE* argv, VALUE _self); 367 VALUE RepeatedField_index(int argc, VALUE* argv, VALUE _self);
370 void* RepeatedField_index_native(VALUE _self, int index); 368 void* RepeatedField_index_native(VALUE _self, int index);
371 int RepeatedField_size(VALUE _self);
372 VALUE RepeatedField_index_set(VALUE _self, VALUE _index, VALUE val); 369 VALUE RepeatedField_index_set(VALUE _self, VALUE _index, VALUE val);
373 void RepeatedField_reserve(RepeatedField* self, int new_size); 370 void RepeatedField_reserve(RepeatedField* self, int new_size);
374 VALUE RepeatedField_push(VALUE _self, VALUE val); 371 VALUE RepeatedField_push(VALUE _self, VALUE val);
375 void RepeatedField_push_native(VALUE _self, void* data); 372 void RepeatedField_push_native(VALUE _self, void* data);
376 VALUE RepeatedField_pop_one(VALUE _self); 373 VALUE RepeatedField_pop_one(VALUE _self);
377 VALUE RepeatedField_insert(int argc, VALUE* argv, VALUE _self); 374 VALUE RepeatedField_insert(int argc, VALUE* argv, VALUE _self);
378 VALUE RepeatedField_replace(VALUE _self, VALUE list); 375 VALUE RepeatedField_replace(VALUE _self, VALUE list);
379 VALUE RepeatedField_clear(VALUE _self); 376 VALUE RepeatedField_clear(VALUE _self);
380 VALUE RepeatedField_length(VALUE _self); 377 VALUE RepeatedField_length(VALUE _self);
381 VALUE RepeatedField_dup(VALUE _self); 378 VALUE RepeatedField_dup(VALUE _self);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 529
533 #define CHECK_UPB(code, msg) do { \ 530 #define CHECK_UPB(code, msg) do { \
534 upb_status status = UPB_STATUS_INIT; \ 531 upb_status status = UPB_STATUS_INIT; \
535 code; \ 532 code; \
536 check_upb_status(&status, msg); \ 533 check_upb_status(&status, msg); \
537 } while (0) 534 } while (0)
538 535
539 extern ID descriptor_instancevar_interned; 536 extern ID descriptor_instancevar_interned;
540 537
541 #endif // __GOOGLE_PROTOBUF_RUBY_PROTOBUF_H__ 538 #endif // __GOOGLE_PROTOBUF_RUBY_PROTOBUF_H__
OLDNEW
« no previous file with comments | « third_party/protobuf/ruby/ext/google/protobuf_c/message.c ('k') | third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698