rucy 0.1.15 → 0.1.16

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: 3318eec71901bf3df44d0671f812db3587cba4398fcffe2626d890e1f2661b4c
4
- data.tar.gz: e52137f3e90d24e0488241782a7c16073a08739f1b49dbc4b2481b31fb6d2540
3
+ metadata.gz: 316378a11ef7b873b7d77adeb9856280df55a130daf7997d5bb5fe114fc15331
4
+ data.tar.gz: 81cf980b50bd54f9ea3e77275baa9852456e14aedddcc4dbdd5158038f1f6478
5
5
  SHA512:
6
- metadata.gz: 4bb51a1e39c354397dae4bbf9646347afae280cff1bf3a6bd8bf6642aa5d61cc2521686740c96861886db7634be0102dd34bf7377e343f472f3a67eda35b7cce
7
- data.tar.gz: 82d1edba03b208254d356ccb7a19e2fbcc83b16bdf9e938a70a7c852e926f66745de8ad5c315f24eebef2ca6950daa13658c9545dcb0c4e0afbf1d90e7d80c9f
6
+ metadata.gz: 735e517eb093760b6f459273849919474002c3040eff84866102069009824e06e5c87018707786c32fbadf32ad72026ca3b924c0929e2fee966191f112b5d561
7
+ data.tar.gz: 21efee6f049361ac15e032a2ad043a70fa921f94be2b1f33d2da8f89dd5a7e5c80608c6210527ec3fd9af2daef25bc479d98aa3f2f52005efc796e88765ea7df
@@ -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
- rb_define_function(cSimpleObj, "set_refs", RUBY_METHOD_FUNC(simpleobj_set_refs), 1);
181
- rb_define_function(cSimpleObj, "clear_refs", RUBY_METHOD_FUNC(simpleobj_clear_refs), 0);
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
  }
@@ -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
- rb_define_function(mTester, "all_logs", RUBY_METHOD_FUNC(all_logs), 0);
58
- rb_define_function(mTester, "clear_logs", RUBY_METHOD_FUNC(clear_logs), 0);
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.15
1
+ 0.1.16
@@ -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.define_function("set_refs", simpleobj_set_refs);
194
- cSimpleObj.define_function("clear_refs", simpleobj_clear_refs);
193
+ cSimpleObj.define_module_function("set_refs", simpleobj_set_refs);
194
+ cSimpleObj.define_module_function("clear_refs", simpleobj_clear_refs);
195
195
  }
@@ -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.define_function("all_logs", all_logs);
60
- mTester.define_function("clear_logs", clear_logs);
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();
@@ -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
- void rucy_error (const char* file, int line, const char* format = NULL, ...);
57
+ [[noreturn]]
58
+ void rucy_error (
59
+ const char* file, int line, const char* format = NULL, ...);
56
60
 
57
- void type_error (const char* file, int line, const char* format = NULL, ...);
61
+ [[noreturn]]
62
+ void type_error (
63
+ const char* file, int line, const char* format = NULL, ...);
58
64
 
59
- void argument_error (const char* file, int line, const char* format = NULL, ...);
65
+ [[noreturn]]
66
+ void argument_error (
67
+ const char* file, int line, const char* format = NULL, ...);
60
68
 
61
- void arg_count_error (const char* file, int line,
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
- void invalid_state_error (const char* file, int line, const char* format = NULL, ...);
76
+ [[noreturn]]
77
+ void invalid_state_error (
78
+ const char* file, int line, const char* format = NULL, ...);
67
79
 
68
- void invalid_object_error (const char* file, int line, const char* format = NULL, ...);
80
+ [[noreturn]]
81
+ void invalid_object_error (
82
+ const char* file, int line, const char* format = NULL, ...);
69
83
 
70
- void index_error (const char* file, int line, const char* format = NULL, ...);
84
+ [[noreturn]]
85
+ void index_error (
86
+ const char* file, int line, const char* format = NULL, ...);
71
87
 
72
- void not_implemented_error (const char* file, int line, const char* format = NULL, ...);
88
+ [[noreturn]]
89
+ void not_implemented_error (
90
+ const char* file, int line, const char* format = NULL, ...);
73
91
 
74
- void system_error (const char* file, int line, const char* format = NULL, ...);
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 RUCY_DECLARE_VALUE_OR_ARRAY_TO(native_class) \
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 RUCY_DEFINE_VALUE_OR_ARRAY_TO(native_class) \
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
  { \
@@ -41,7 +41,7 @@ namespace Rucy
41
41
  void extend_module (Value module);
42
42
 
43
43
  % [
44
- % 'define_function',
44
+ % 'define_module_function',
45
45
  % 'define_method',
46
46
  % 'define_private_method',
47
47
  % 'define_singleton_method',
@@ -58,7 +58,7 @@ namespace Rucy
58
58
  }
59
59
 
60
60
  % [
61
- % ['define_function', 'rb_define_module_function'],
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.15
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-04-16 00:00:00.000000000 Z
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: