vox-etf 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/vox/decoder.hpp +6 -0
- data/ext/vox/encoder.hpp +1 -1
- data/ext/vox/etf.hpp +1 -0
- data/ext/vox/extconf.rb +4 -1
- data/lib/vox/etf/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8d2deb457e60eb111c3f25ee95afcf9532e369ec4dff759908d48c92c93d3cf
|
4
|
+
data.tar.gz: d003df24854077a8b6192506f62db5888c417acaf35872b9ddd6bebf7c37f720
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be499bd7ec49e3e1ee4945b808979a2a8bf331ac871f227a90a8ff77d28a87eddc32cea4f7e6e722d3d09d88a1a226c05d6b4760ef1ccf517b786fe9799c1429
|
7
|
+
data.tar.gz: 7bfa5417c8d0fbe5a2226fe2bb506af46cbb22d1736ef7b99029bec0074c35080b30e84450296ce23c0589cf6394349eca4f8e2376099cc60eccd9af796528c6
|
data/ext/vox/decoder.hpp
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
#pragma once
|
2
2
|
#include <zlib.h>
|
3
|
+
#include "./etf.hpp"
|
3
4
|
#include "ruby.h"
|
4
5
|
#include "erlpack/sysdep.h"
|
5
6
|
#include "erlpack/constants.h"
|
@@ -360,6 +361,7 @@ namespace etf
|
|
360
361
|
|
361
362
|
VALUE decode_compressed()
|
362
363
|
{
|
364
|
+
#if HAVE_ZLIB_H
|
363
365
|
const uint32_t decompressed_size = read32();
|
364
366
|
|
365
367
|
unsigned long source_size = decompressed_size;
|
@@ -378,6 +380,10 @@ namespace etf
|
|
378
380
|
VALUE value = decompressed.decode_term();
|
379
381
|
free(out_buffer);
|
380
382
|
return value;
|
383
|
+
#else
|
384
|
+
rb_raise(rb_eArgError, "vox-etf was compiled without zlib support can cannot decode the compressed term.");
|
385
|
+
return Qnil;
|
386
|
+
#endif
|
381
387
|
}
|
382
388
|
};
|
383
389
|
} // namespace etf
|
data/ext/vox/encoder.hpp
CHANGED
data/ext/vox/etf.hpp
CHANGED
data/ext/vox/extconf.rb
CHANGED
@@ -3,11 +3,14 @@
|
|
3
3
|
require('mkmf')
|
4
4
|
|
5
5
|
find_header('ruby.h')
|
6
|
-
find_header('zlib.h')
|
7
6
|
find_header('stddef.h')
|
8
7
|
find_header('stdlib.h')
|
9
8
|
find_header('stdint.h')
|
10
9
|
find_header('limits.h')
|
11
10
|
find_header('string.h')
|
11
|
+
have_header('zlib.h')
|
12
|
+
have_library('z')
|
13
|
+
|
14
|
+
create_header
|
12
15
|
|
13
16
|
create_makefile('vox/etf')
|
data/lib/vox/etf/version.rb
CHANGED