google-protobuf 4.28.0 → 4.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/ext/google/protobuf_c/defs.c +1 -2
 - data/ext/google/protobuf_c/message.c +15 -5
 - data/ext/google/protobuf_c/protobuf.c +0 -2
 - data/ext/google/protobuf_c/ruby-upb.c +6705 -6668
 - data/ext/google/protobuf_c/ruby-upb.h +3277 -3189
 - data/lib/google/protobuf/descriptor_pb.rb +1 -1
 - data/lib/google/protobuf/ffi/ffi.rb +5 -0
 - data/lib/google/protobuf/ffi/message.rb +6 -2
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 2956cfa1fcc75ab4faaa1884e4bf43f07a45ef03992806dd974f2e6dece6b5a0
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: eb8281379f42531e5d86e1b92504f1ba5a00fbdbddf38b8d37c16c5d4b522352
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: c13f8f6cc2117980c13dd30ce43708683120b016b4d6239fb97271cec82df15bdcf559415ea625302823b7f2e2b7b893070d2f35576e3d97e9e8895267f196d9
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 95d877eb2bca28b52c75611989fe2538a34c2ccb209011d6eaf033ab930742f0ba81fd3f39e824edd00a31de5062de8a8591fe6bb70290d94ce041e28b964fc3
         
     | 
| 
         @@ -7,7 +7,6 @@ 
     | 
|
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
            #include <ctype.h>
         
     | 
| 
       9 
9 
     | 
    
         
             
            #include <errno.h>
         
     | 
| 
       10 
     | 
    
         
            -
            #include <ruby/version.h>
         
     | 
| 
       11 
10 
     | 
    
         | 
| 
       12 
11 
     | 
    
         
             
            #include "convert.h"
         
     | 
| 
       13 
12 
     | 
    
         
             
            #include "message.h"
         
     | 
| 
         @@ -726,7 +725,7 @@ static VALUE FieldDescriptor__type(VALUE _self) { 
     | 
|
| 
       726 
725 
     | 
    
         
             
            static VALUE FieldDescriptor_default(VALUE _self) {
         
     | 
| 
       727 
726 
     | 
    
         
             
              FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
         
     | 
| 
       728 
727 
     | 
    
         
             
              const upb_FieldDef* f = self->fielddef;
         
     | 
| 
       729 
     | 
    
         
            -
              upb_MessageValue default_val =  
     | 
| 
      
 728 
     | 
    
         
            +
              upb_MessageValue default_val = upb_MessageValue_Zero();
         
     | 
| 
       730 
729 
     | 
    
         
             
              if (upb_FieldDef_IsSubMessage(f)) {
         
     | 
| 
       731 
730 
     | 
    
         
             
                return Qnil;
         
     | 
| 
       732 
731 
     | 
    
         
             
              } else if (!upb_FieldDef_IsRepeated(f)) {
         
     | 
| 
         @@ -1038,11 +1038,21 @@ static VALUE Message_decode_json(int argc, VALUE* argv, VALUE klass) { 
     | 
|
| 
       1038 
1038 
     | 
    
         | 
| 
       1039 
1039 
     | 
    
         
             
              upb_Status_Clear(&status);
         
     | 
| 
       1040 
1040 
     | 
    
         
             
              const upb_DefPool* pool = upb_FileDef_Pool(upb_MessageDef_File(msg->msgdef));
         
     | 
| 
       1041 
     | 
    
         
            -
             
     | 
| 
       1042 
     | 
    
         
            -
             
     | 
| 
       1043 
     | 
    
         
            -
             
     | 
| 
       1044 
     | 
    
         
            -
             
     | 
| 
       1045 
     | 
    
         
            -
             
     | 
| 
      
 1041 
     | 
    
         
            +
             
     | 
| 
      
 1042 
     | 
    
         
            +
              int result = upb_JsonDecodeDetectingNonconformance(
         
     | 
| 
      
 1043 
     | 
    
         
            +
                  RSTRING_PTR(data), RSTRING_LEN(data), (upb_Message*)msg->msg,
         
     | 
| 
      
 1044 
     | 
    
         
            +
                  msg->msgdef, pool, options, Arena_get(msg->arena), &status);
         
     | 
| 
      
 1045 
     | 
    
         
            +
             
     | 
| 
      
 1046 
     | 
    
         
            +
              switch (result) {
         
     | 
| 
      
 1047 
     | 
    
         
            +
                case kUpb_JsonDecodeResult_Ok:
         
     | 
| 
      
 1048 
     | 
    
         
            +
                  break;
         
     | 
| 
      
 1049 
     | 
    
         
            +
                case kUpb_JsonDecodeResult_OkWithEmptyStringNumerics:
         
     | 
| 
      
 1050 
     | 
    
         
            +
                  rb_warn("%s", upb_Status_ErrorMessage(&status));
         
     | 
| 
      
 1051 
     | 
    
         
            +
                  break;
         
     | 
| 
      
 1052 
     | 
    
         
            +
                case kUpb_JsonDecodeResult_Error:
         
     | 
| 
      
 1053 
     | 
    
         
            +
                  rb_raise(cParseError, "Error occurred during parsing: %s",
         
     | 
| 
      
 1054 
     | 
    
         
            +
                           upb_Status_ErrorMessage(&status));
         
     | 
| 
      
 1055 
     | 
    
         
            +
                  break;
         
     | 
| 
       1046 
1056 
     | 
    
         
             
              }
         
     | 
| 
       1047 
1057 
     | 
    
         | 
| 
       1048 
1058 
     | 
    
         
             
              return msg_rb;
         
     |