pbwire 0.1.12 → 0.1.13

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a2efea0f03bf38506badeb056255fce0e823d45a69cf3190f0c59a23c5a372d
4
- data.tar.gz: 4cbee376c83938e8f6ab2d06d7d9144bfe45fa4abd599a709484705c5914918b
3
+ metadata.gz: cb4f6b7cf39192a4b629a15021602052bfd92a018dada81f4b5a39d698b52d72
4
+ data.tar.gz: 4fb73360db872995f67944c183ca5d1bf471150f02efbdf3bde14ada104f8e16
5
5
  SHA512:
6
- metadata.gz: cb4a4b9e08f7161818b9df2d8358765c75f150f108cc841f2b3c39972fe168d094b48cc7511d60a41ae07dd9b33571af20bdc8c034d279993f55755df8dd6b73
7
- data.tar.gz: b75dcd01c883469fa6df031b1daf88be3cecec11a08cf40a1c82828366643654a4f5ea46f85490ea90e12a64e26d2ebd1a5d6832caa287f972ea6589721fb980
6
+ metadata.gz: 5b9a4e29a0c6e99d8562324fde49a67eaacc250dbe2fdde6050df02958bda1744c44eeaca02c44a5686ba8d002a3c4c7c64f47dd1bc23a542cce79581396fbd6
7
+ data.tar.gz: 39d8591660b5fa4a37ea3c215a3c33ddf698f3c89ee0ad258aa85f6762066779e86d252f7f9cc990f3272fd4262f9009d63675da6044d866fd02b0cd2dce7b94
@@ -13,6 +13,7 @@ skipped a member with an empty or parent path: '../../src/schema.c'
13
13
  skipped a member with an empty or parent path: '../../src/stream.c'
14
14
  skipped a member with an empty or parent path: '../../src/text.c'
15
15
  skipped a member with an empty or parent path: '../../src/wire.c'
16
+ skipped a member with an empty or parent path: '../../src/wkt.c'
16
17
 
17
18
  GNU tar output:
18
19
  tar: Removing leading `../../' from member names
@@ -29,4 +30,5 @@ tar: ../../src/schema.c: Member name contains '..'
29
30
  tar: ../../src/stream.c: Member name contains '..'
30
31
  tar: ../../src/text.c: Member name contains '..'
31
32
  tar: ../../src/wire.c: Member name contains '..'
33
+ tar: ../../src/wkt.c: Member name contains '..'
32
34
  tar: Exiting with failure status due to previous errors
@@ -34,6 +34,7 @@
34
34
  #include <pbwire.h>
35
35
 
36
36
  #include <stdint.h>
37
+ #include <stdio.h>
37
38
  #include <stdlib.h>
38
39
  #include <string.h>
39
40
 
@@ -1518,11 +1519,15 @@ schema_s_load(VALUE klass, VALUE bytes)
1518
1519
  status = pbw_descriptor_set_load(RSTRING_PTR(bytes),
1519
1520
  (size_t)RSTRING_LEN(bytes), &schema);
1520
1521
  if (status != PBW_OK) {
1521
- const char *reason = pbw_schema_error(schema);
1522
+ /* the reason lives inside the schema: copy it before freeing */
1523
+ char reason[192];
1524
+ const char *why = pbw_schema_error(schema);
1525
+
1526
+ snprintf(reason, sizeof(reason), "%s",
1527
+ why != NULL ? why : "");
1522
1528
  pbw_schema_free(schema);
1523
1529
  rb_raise(eError, "descriptor set rejected: %s",
1524
- reason != NULL && reason[0] != '\0' ? reason
1525
- : pbw_strerror(status));
1530
+ reason[0] != '\0' ? reason : pbw_strerror(status));
1526
1531
  }
1527
1532
  obj = typed_object_alloc(klass, &schema_data_type, (void **)&self);
1528
1533
  self->holder = holder_new(schema);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pbwire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - jinganix
@@ -29,6 +29,7 @@ files:
29
29
  - "../../src/stream.c"
30
30
  - "../../src/text.c"
31
31
  - "../../src/wire.c"
32
+ - "../../src/wkt.c"
32
33
  - README.md
33
34
  - ext/pbwire_ext/extconf.rb
34
35
  - ext/pbwire_ext/pbwire_ext.c