helix_runtime 0.7.3 → 0.7.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e0c4dcb6f2c94b6cbc94177b101922d1666530dd34ddc6aea2ad642be6456aa
|
4
|
+
data.tar.gz: a1e80f900a1910b5433a8d83cd0fd86d7edf596cda20e1b358a9b5a357a5d320
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fa2de203265870bc1c6cd58c0d6f59ccefea4bbe02a16ce0a5d6dac829da745b8c0fffbb85352048a13b28fb81891f9561be5a743b858c40b55d0c573a1849b
|
7
|
+
data.tar.gz: a1c6a2235eea8a84dd9bf6e1e18134ff2353e43798e01f69a3ccd5b3a6865265e8abe98cb2ef0520cdf31d50e89dca586b639337155cb9ff67806f8b99d4aa39
|
@@ -2,11 +2,12 @@
|
|
2
2
|
|
3
3
|
#include <ruby.h>
|
4
4
|
#include <ruby/intern.h>
|
5
|
+
#include <ruby/encoding.h>
|
5
6
|
#include <stdbool.h>
|
6
7
|
#include <helix_runtime.h>
|
7
8
|
|
8
9
|
// Update with version.rb
|
9
|
-
const char* HELIX_RUNTIME_VERSION = "0.7.
|
10
|
+
const char* HELIX_RUNTIME_VERSION = "0.7.4";
|
10
11
|
|
11
12
|
const char* HELIX_PRIsVALUE = PRIsVALUE;
|
12
13
|
const char* HELIX_SPRINTF_TO_S = "%" PRIsVALUE;
|
@@ -64,6 +65,14 @@ VALUE HELIX_rb_utf8_str_new(const char* str, long len) {
|
|
64
65
|
return rb_utf8_str_new(str, len);
|
65
66
|
}
|
66
67
|
|
68
|
+
bool HELIX_rb_str_valid_encoding_p(VALUE str) {
|
69
|
+
return rb_enc_str_coderange(str) != ENC_CODERANGE_BROKEN;
|
70
|
+
}
|
71
|
+
|
72
|
+
bool HELIX_rb_str_ascii_only_p(VALUE str) {
|
73
|
+
return rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT;
|
74
|
+
}
|
75
|
+
|
67
76
|
VALUE HELIX_Data_Wrap_Struct(VALUE klass, HELIX_RUBY_DATA_FUNC mark, HELIX_RUBY_DATA_FUNC free, void* data) {
|
68
77
|
return Data_Wrap_Struct(klass, mark, free, data);
|
69
78
|
}
|
@@ -69,6 +69,9 @@ HELIX_EXTERN VALUE HELIX_FIX2INT(VALUE fix);
|
|
69
69
|
|
70
70
|
HELIX_EXTERN VALUE HELIX_rb_utf8_str_new(const char* str, long len);
|
71
71
|
|
72
|
+
HELIX_EXTERN bool HELIX_rb_str_valid_encoding_p(VALUE str);
|
73
|
+
HELIX_EXTERN bool HELIX_rb_str_ascii_only_p(VALUE str);
|
74
|
+
|
72
75
|
// typedef VALUE (*HELIX_rb_alloc_func_t)(VALUE);
|
73
76
|
// void HELIX_rb_define_alloc_func(VALUE klass, HELIX_rb_alloc_func_t func);
|
74
77
|
|
@@ -52,7 +52,7 @@ module HelixRuntime
|
|
52
52
|
end
|
53
53
|
|
54
54
|
task "cargo:build" => ["helix:pre_build", "helix:check_path"] do
|
55
|
-
project.cargo_build
|
55
|
+
project.cargo_build || abort
|
56
56
|
end
|
57
57
|
|
58
58
|
task "cargo:clean" do
|
@@ -61,7 +61,7 @@ module HelixRuntime
|
|
61
61
|
|
62
62
|
desc "Build #{project.name}"
|
63
63
|
task :build => ["helix:pre_build", "helix:check_path"] do
|
64
|
-
project.build
|
64
|
+
project.build || abort
|
65
65
|
end
|
66
66
|
|
67
67
|
desc "Remove build artifacts"
|
@@ -117,11 +117,11 @@ module HelixRuntime
|
|
117
117
|
raise "native source doesn't exist, run `cargo_build` first; source=#{source}" unless File.exist?(source)
|
118
118
|
FileUtils.mkdir_p(File.dirname(native_path))
|
119
119
|
FileUtils.cp source, native_path
|
120
|
+
true
|
120
121
|
end
|
121
122
|
|
122
123
|
def build
|
123
|
-
cargo_build
|
124
|
-
copy_native
|
124
|
+
cargo_build && copy_native
|
125
125
|
end
|
126
126
|
|
127
127
|
def clobber
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: helix_runtime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yehuda Katz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-06-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.7.
|
163
|
+
rubygems_version: 2.7.7
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: The Helix Runtime
|