rcstorable 0.3.0 → 0.3.1
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.
- data/VERSION +1 -1
- data/ext/rcstorable.c +3 -13
- metadata +2 -4
- data/ext/rcstorable.bundle +0 -0
- data/ext/rcstorable.o +0 -0
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.3. | 
| 1 | 
            +
            0.3.1
         | 
    
        data/ext/rcstorable.c
    CHANGED
    
    | @@ -172,11 +172,8 @@ read_string(bool extended_size) | |
| 172 172 | 
             
              check_pointer(serialized);
         | 
| 173 173 |  | 
| 174 174 | 
             
              VALUE ret;
         | 
| 175 | 
            -
              
         | 
| 176 175 | 
             
              uint32_t size = extended_size ? read_32_bit_integer() : read_compact_size();
         | 
| 177 | 
            -
             | 
| 178 176 | 
             
              uint32_t actual_size = 0;
         | 
| 179 | 
            -
              uint32_t rem;
         | 
| 180 177 | 
             
              uchar *tp = serialized;
         | 
| 181 178 |  | 
| 182 179 | 
             
              if (size == 319) { // apparently Storable uses \000\000\001\077 to mean "read until n<7"
         | 
| @@ -186,19 +183,12 @@ read_string(bool extended_size) | |
| 186 183 | 
             
                }
         | 
| 187 184 | 
             
                size = actual_size;
         | 
| 188 185 | 
             
              }
         | 
| 189 | 
            -
              rem = size;
         | 
| 190 186 |  | 
| 191 187 | 
             
              uchar *np = malloc(size+1);
         | 
| 192 | 
            -
               | 
| 188 | 
            +
              check_pointer(serialized+size-1);
         | 
| 189 | 
            +
              memcpy(np, serialized, size);
         | 
| 190 | 
            +
              serialized += size;
         | 
| 193 191 |  | 
| 194 | 
            -
              check_pointer(serialized+rem-1);
         | 
| 195 | 
            -
              while (rem > 0) {
         | 
| 196 | 
            -
                rem--;
         | 
| 197 | 
            -
                *cnp++ = *serialized++;
         | 
| 198 | 
            -
              }
         | 
| 199 | 
            -
             | 
| 200 | 
            -
              *cnp++ = '\0';
         | 
| 201 | 
            -
             | 
| 202 192 | 
             
              ret = rb_str_new(np, size);
         | 
| 203 193 | 
             
              free(np);
         | 
| 204 194 | 
             
              return ret;
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: rcstorable
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              version: 0.3. | 
| 4 | 
            +
              version: 0.3.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors: 
         | 
| 7 7 | 
             
            - Burke Libbey
         | 
| @@ -9,7 +9,7 @@ autorequire: | |
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 11 |  | 
| 12 | 
            -
            date: 2010- | 
| 12 | 
            +
            date: 2010-02-02 00:00:00 -06:00
         | 
| 13 13 | 
             
            default_executable: 
         | 
| 14 14 | 
             
            dependencies: []
         | 
| 15 15 |  | 
| @@ -28,9 +28,7 @@ files: | |
| 28 28 | 
             
            - VERSION
         | 
| 29 29 | 
             
            - ext/Makefile
         | 
| 30 30 | 
             
            - ext/extconf.rb
         | 
| 31 | 
            -
            - ext/rcstorable.bundle
         | 
| 32 31 | 
             
            - ext/rcstorable.c
         | 
| 33 | 
            -
            - ext/rcstorable.o
         | 
| 34 32 | 
             
            - spec/rcstorable_spec.rb
         | 
| 35 33 | 
             
            - spec/store.pl
         | 
| 36 34 | 
             
            has_rdoc: true
         | 
    
        data/ext/rcstorable.bundle
    DELETED
    
    | Binary file | 
    
        data/ext/rcstorable.o
    DELETED
    
    | Binary file |