blake3-rb 1.5.4.2 → 1.5.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/digest/blake3_ext/extconf.rb +20 -1
- data/ext/digest/blake3_ext/src/bindings.rs +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6434507643a1bd262f562044a1a022c3ffd4348e82a217dde88ee360036c69cd
|
4
|
+
data.tar.gz: 0bd45e1cecd30ed52d4358961397a4c11997bbdf00dced6df48958e77756476d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c45295e7fec2446bb51925c42674a340a5db9155ea4f0b7f280b49b29e4728c15e91b8017ce99f0f358d42a4cf48e09db12c98b3205999429707a82de7ac3ea1
|
7
|
+
data.tar.gz: 7e690b4cc449d9289f84919614187ccd7b9f2a226b4264c00e507847e43586b049182d0c80fc9d489311d4d78c5fdbdba90ae84307f3d123e282a6b09c02c8ea
|
@@ -3,4 +3,23 @@
|
|
3
3
|
require "mkmf"
|
4
4
|
require "rb_sys/mkmf"
|
5
5
|
|
6
|
-
|
6
|
+
# Detect when DIGEST_USE_RB_EXT_RESOLVE_SYMBOL is defined truthy,
|
7
|
+
# which indicates rb_ext_resolve_symbol("digest.so", "rb_digest_wrap_metadata")
|
8
|
+
# will work with the version of Digest we're building against.
|
9
|
+
digest_use_rb_ext_resolve_symbol = try_compile(<<~C)
|
10
|
+
#include <ruby/digest.h>
|
11
|
+
|
12
|
+
#if !defined(DIGEST_USE_RB_EXT_RESOLVE_SYMBOL)
|
13
|
+
# error DIGEST_USE_RB_EXT_RESOLVE_SYMBOL not defined
|
14
|
+
#endif
|
15
|
+
#if !DIGEST_USE_RB_EXT_RESOLVE_SYMBOL
|
16
|
+
# error DIGEST_USE_RB_EXT_RESOLVE_SYMBOL is 0
|
17
|
+
#endif
|
18
|
+
C
|
19
|
+
puts("digest_use_rb_ext_resolve_symbol=#{digest_use_rb_ext_resolve_symbol}")
|
20
|
+
|
21
|
+
create_rust_makefile("digest/blake3/blake3_ext") do |r|
|
22
|
+
if digest_use_rb_ext_resolve_symbol
|
23
|
+
r.extra_rustflags = ["--cfg digest_use_rb_ext_resolve_symbol"]
|
24
|
+
end
|
25
|
+
end
|
@@ -19,7 +19,7 @@ pub struct RbDigestMetadataT {
|
|
19
19
|
pub finish_func: RbDigestHashFinishFuncT,
|
20
20
|
}
|
21
21
|
|
22
|
-
#[cfg(
|
22
|
+
#[cfg(digest_use_rb_ext_resolve_symbol)]
|
23
23
|
pub unsafe fn rb_digest_make_metadata(meta: &'static RbDigestMetadataT) -> VALUE {
|
24
24
|
static mut WRAPPER: Option<unsafe extern "C" fn(&'static RbDigestMetadataT) -> VALUE> = None;
|
25
25
|
|
@@ -50,7 +50,7 @@ pub unsafe fn rb_digest_make_metadata(meta: &'static RbDigestMetadataT) -> VALUE
|
|
50
50
|
panic!("Failed to resolve rb_digest_wrap_metadata");
|
51
51
|
}
|
52
52
|
|
53
|
-
#[cfg(not(
|
53
|
+
#[cfg(not(digest_use_rb_ext_resolve_symbol))]
|
54
54
|
pub unsafe fn rb_digest_make_metadata(meta: &'static RbDigestMetadataT) -> VALUE {
|
55
55
|
use rb_sys::{rb_data_object_wrap, rb_obj_freeze};
|
56
56
|
let data = rb_data_object_wrap(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blake3-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.4.
|
4
|
+
version: 1.5.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Ker-Seymer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rb_sys
|