rucy 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.doc/ext/rucy/class.cpp +2 -2
- data/.doc/ext/rucy/tester.cpp +2 -2
- data/VERSION +1 -1
- data/ext/rucy/class.cpp +2 -2
- data/ext/rucy/tester.cpp +2 -2
- data/include/rucy/exception.h +29 -9
- data/include/rucy/extension.h.erb +16 -4
- data/include/rucy/module.h.erb +1 -1
- data/src/module.cpp.erb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 316378a11ef7b873b7d77adeb9856280df55a130daf7997d5bb5fe114fc15331
|
4
|
+
data.tar.gz: 81cf980b50bd54f9ea3e77275baa9852456e14aedddcc4dbdd5158038f1f6478
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 735e517eb093760b6f459273849919474002c3040eff84866102069009824e06e5c87018707786c32fbadf32ad72026ca3b924c0929e2fee966191f112b5d561
|
7
|
+
data.tar.gz: 21efee6f049361ac15e032a2ad043a70fa921f94be2b1f33d2da8f89dd5a7e5c80608c6210527ec3fd9af2daef25bc479d98aa3f2f52005efc796e88765ea7df
|
data/.doc/ext/rucy/class.cpp
CHANGED
@@ -177,6 +177,6 @@ Init_class ()
|
|
177
177
|
cSimpleObj = rb_define_class_under(mTester, "SimpleObj", rb_cObject);
|
178
178
|
rb_define_alloc_func(cSimpleObj, simpleobj_alloc);
|
179
179
|
rb_define_private_method(cSimpleObj, "initialize", RUBY_METHOD_FUNC(simpleobj_initialize), 1);
|
180
|
-
|
181
|
-
|
180
|
+
rb_define_module_function(cSimpleObj, "set_refs", RUBY_METHOD_FUNC(simpleobj_set_refs), 1);
|
181
|
+
rb_define_module_function(cSimpleObj, "clear_refs", RUBY_METHOD_FUNC(simpleobj_clear_refs), 0);
|
182
182
|
}
|
data/.doc/ext/rucy/tester.cpp
CHANGED
@@ -54,8 +54,8 @@ Init_tester ()
|
|
54
54
|
Module mRucy = rb_define_module("Rucy");
|
55
55
|
Module mTester = rb_define_module_under(mRucy, "Tester");
|
56
56
|
|
57
|
-
|
58
|
-
|
57
|
+
rb_define_module_function(mTester, "all_logs", RUBY_METHOD_FUNC(all_logs), 0);
|
58
|
+
rb_define_module_function(mTester, "clear_logs", RUBY_METHOD_FUNC(clear_logs), 0);
|
59
59
|
|
60
60
|
Init_value();
|
61
61
|
Init_exception();
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.16
|
data/ext/rucy/class.cpp
CHANGED
@@ -190,6 +190,6 @@ Init_class ()
|
|
190
190
|
cSimpleObj = mTester.define_class("SimpleObj");
|
191
191
|
cSimpleObj.define_alloc_func(simpleobj_alloc);
|
192
192
|
cSimpleObj.define_private_method("initialize", simpleobj_initialize);
|
193
|
-
cSimpleObj.
|
194
|
-
cSimpleObj.
|
193
|
+
cSimpleObj.define_module_function("set_refs", simpleobj_set_refs);
|
194
|
+
cSimpleObj.define_module_function("clear_refs", simpleobj_clear_refs);
|
195
195
|
}
|
data/ext/rucy/tester.cpp
CHANGED
@@ -56,8 +56,8 @@ Init_tester ()
|
|
56
56
|
Module mRucy = define_module("Rucy");
|
57
57
|
Module mTester = mRucy.define_module("Tester");
|
58
58
|
|
59
|
-
mTester.
|
60
|
-
mTester.
|
59
|
+
mTester.define_module_function("all_logs", all_logs);
|
60
|
+
mTester.define_module_function("clear_logs", clear_logs);
|
61
61
|
|
62
62
|
Init_value();
|
63
63
|
Init_exception();
|
data/include/rucy/exception.h
CHANGED
@@ -47,31 +47,51 @@ namespace Rucy
|
|
47
47
|
};// RubyJumpTag
|
48
48
|
|
49
49
|
|
50
|
+
[[noreturn]]
|
50
51
|
void raise (const char* format = NULL, ...);
|
51
52
|
|
53
|
+
[[noreturn]]
|
52
54
|
void raise (RubyValue exception, const char* format = NULL, ...);
|
53
55
|
|
54
56
|
|
55
|
-
|
57
|
+
[[noreturn]]
|
58
|
+
void rucy_error (
|
59
|
+
const char* file, int line, const char* format = NULL, ...);
|
56
60
|
|
57
|
-
|
61
|
+
[[noreturn]]
|
62
|
+
void type_error (
|
63
|
+
const char* file, int line, const char* format = NULL, ...);
|
58
64
|
|
59
|
-
|
65
|
+
[[noreturn]]
|
66
|
+
void argument_error (
|
67
|
+
const char* file, int line, const char* format = NULL, ...);
|
60
68
|
|
61
|
-
|
69
|
+
[[noreturn]]
|
70
|
+
void arg_count_error (
|
71
|
+
const char* file, int line,
|
62
72
|
const char* method, int nargs, int nargs_expected,
|
63
73
|
int n1 = -1, int n2 = -1, int n3 = -1, int n4 = -1, int n5 = -1,
|
64
74
|
int n6 = -1, int n7 = -1, int n8 = -1, int n9 = -1, int n10 = -1);
|
65
75
|
|
66
|
-
|
76
|
+
[[noreturn]]
|
77
|
+
void invalid_state_error (
|
78
|
+
const char* file, int line, const char* format = NULL, ...);
|
67
79
|
|
68
|
-
|
80
|
+
[[noreturn]]
|
81
|
+
void invalid_object_error (
|
82
|
+
const char* file, int line, const char* format = NULL, ...);
|
69
83
|
|
70
|
-
|
84
|
+
[[noreturn]]
|
85
|
+
void index_error (
|
86
|
+
const char* file, int line, const char* format = NULL, ...);
|
71
87
|
|
72
|
-
|
88
|
+
[[noreturn]]
|
89
|
+
void not_implemented_error (
|
90
|
+
const char* file, int line, const char* format = NULL, ...);
|
73
91
|
|
74
|
-
|
92
|
+
[[noreturn]]
|
93
|
+
void system_error (
|
94
|
+
const char* file, int line, const char* format = NULL, ...);
|
75
95
|
|
76
96
|
|
77
97
|
}// Rucy
|
@@ -27,14 +27,20 @@
|
|
27
27
|
template <> const native_class& value_to<const native_class&> (Value value, bool convert); \
|
28
28
|
}
|
29
29
|
|
30
|
-
#define
|
31
|
-
RUCY_DECLARE_VALUE_TO(native_class) \
|
30
|
+
#define RUCY_DECLARE_ARRAY_TO(native_class) \
|
32
31
|
namespace Rucy \
|
33
32
|
{ \
|
34
33
|
template <> native_class value_to<native_class> (Value value, bool convert); \
|
35
34
|
template <> native_class value_to<native_class> (int argc, const Value* argv, bool convert); \
|
36
35
|
}
|
37
36
|
|
37
|
+
#define RUCY_DECLARE_CONVERT_TO(native_type) \
|
38
|
+
RUCY_DECLARE_ARRAY_TO(native_type)
|
39
|
+
|
40
|
+
#define RUCY_DECLARE_VALUE_OR_ARRAY_TO(native_class) \
|
41
|
+
RUCY_DECLARE_VALUE_TO(native_class) \
|
42
|
+
RUCY_DECLARE_ARRAY_TO(native_class)
|
43
|
+
|
38
44
|
#define RUCY_DECLARE_WRAPPER_VALUE_FROM(native_class) \
|
39
45
|
namespace Rucy \
|
40
46
|
{ \
|
@@ -92,8 +98,7 @@
|
|
92
98
|
} \
|
93
99
|
}
|
94
100
|
|
95
|
-
#define
|
96
|
-
RUCY_DEFINE_VALUE_TO(native_class) \
|
101
|
+
#define RUCY_DEFINE_ARRAY_TO(native_class) \
|
97
102
|
namespace Rucy \
|
98
103
|
{ \
|
99
104
|
template <> native_class \
|
@@ -106,6 +111,13 @@
|
|
106
111
|
} \
|
107
112
|
}
|
108
113
|
|
114
|
+
#define RUCY_DEFINE_CONVERT_TO(native_type) \
|
115
|
+
RUCY_DEFINE_ARRAY_TO(native_type)
|
116
|
+
|
117
|
+
#define RUCY_DEFINE_VALUE_OR_ARRAY_TO(native_class) \
|
118
|
+
RUCY_DEFINE_VALUE_TO(native_class) \
|
119
|
+
RUCY_DEFINE_ARRAY_TO(native_class)
|
120
|
+
|
109
121
|
#define RUCY_DEFINE_WRAPPER_VALUE_FROM(native_class) \
|
110
122
|
namespace Rucy \
|
111
123
|
{ \
|
data/include/rucy/module.h.erb
CHANGED
data/src/module.cpp.erb
CHANGED
@@ -58,7 +58,7 @@ namespace Rucy
|
|
58
58
|
}
|
59
59
|
|
60
60
|
% [
|
61
|
-
% ['
|
61
|
+
% ['define_module_function', 'rb_define_module_function'],
|
62
62
|
% ['define_method', 'rb_define_method'],
|
63
63
|
% ['define_private_method', 'rb_define_private_method'],
|
64
64
|
% ['define_singleton_method', 'rb_define_singleton_method']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rucy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xordog
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xot
|
@@ -91,7 +91,7 @@ files:
|
|
91
91
|
homepage: https://github.com/xord/rucy
|
92
92
|
licenses: []
|
93
93
|
metadata: {}
|
94
|
-
post_install_message:
|
94
|
+
post_install_message:
|
95
95
|
rdoc_options: []
|
96
96
|
require_paths:
|
97
97
|
- lib
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubygems_version: 3.0.3
|
110
|
-
signing_key:
|
110
|
+
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: A Ruby C++ Extension Helper Library.
|
113
113
|
test_files:
|