kernaux 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3d010f1c8a8ce21a88ce43e74f74cefd3948499192dfb15c86a7bdbec8fb207
4
- data.tar.gz: 22cc8aa38ee888bcd8812eb5bc0632111211833a74f4c2d456356d0c7420657b
3
+ metadata.gz: 9f5d202a8273c256f2be0061cf85c8c40f771ec5ca399f4a8fb9bd3bc3d97a39
4
+ data.tar.gz: 801a146b8c0c709cc5a33d308376d30384ae22e59e60880a4f2b0c0404b140f4
5
5
  SHA512:
6
- metadata.gz: 99134a6e80f7a9891de94d80e510e8d022d9522c2c1630e8ac7a0c23a7ee1e38ee9783a86eee91c7128af019d9ebfb415a650857e862fe7a826057768c3bfffb
7
- data.tar.gz: 42d27fc4592ae2e6c7c760b5ae5804e88cd3c8e7d67e6900da11f64bc1b73d9d77aa7c30a17aaacab8b678d26b9b11ebd3717c7967ac1601edf1654f9b53b9ef
6
+ metadata.gz: d198f7c5775fe921ec59e394439767edbf489557fa458b94cba029a8c67f02f8f9df8715f664ccc21f1aecef0b6ce233498ba64aa706d7688a0ff9900dc2b9d5
7
+ data.tar.gz: bf3a9e46e451ff9d4217dc0d144355cb99e33b39db29288c94c3b1138ad8eb1d74c0bfffb1f0cba4fc8bce800c220e55ff8a0762d592ccab4893a85889714517
data/README.md CHANGED
@@ -15,7 +15,7 @@ Install
15
15
  Add the following to your `Gemfile`:
16
16
 
17
17
  ```ruby
18
- gem 'kernaux', '~> 0.5.0'
18
+ gem 'kernaux', '~> 0.6.0'
19
19
  ```
20
20
 
21
21
  Or add the following to your `*.gemspec`:
@@ -23,7 +23,7 @@ Or add the following to your `*.gemspec`:
23
23
  ```ruby
24
24
  Gem::Specification.new do |spec|
25
25
  # ...
26
- spec.add_runtime_dependency 'kernaux', '~> 0.5.0'
26
+ spec.add_runtime_dependency 'kernaux', '~> 0.6.0'
27
27
  # ...
28
28
  end
29
29
  ```
data/ext/default/assert.c CHANGED
@@ -40,7 +40,7 @@ VALUE rb_KernAux_assert_cb_EQ(const VALUE self, const VALUE assert_cb_rb)
40
40
  }
41
41
 
42
42
  VALUE rb_KernAux_assert_do(
43
- const VALUE self_rb __attribute__((unused)),
43
+ const VALUE self_rb KERNAUX_UNUSED,
44
44
  VALUE file_rb,
45
45
  const VALUE line_rb,
46
46
  VALUE msg_rb
data/ext/default/dynarg.h CHANGED
@@ -7,6 +7,10 @@ extern "C" {
7
7
 
8
8
  #include <stdbool.h>
9
9
 
10
+ #include <kernaux/macro.h>
11
+
12
+ #include <kernaux/macro/packing_start.run>
13
+
10
14
  struct DynArg {
11
15
  bool use_dbl;
12
16
  double dbl;
@@ -16,8 +20,11 @@ struct DynArg {
16
20
  long long ll;
17
21
  const char *str;
18
22
  unsigned long long ull;
19
- } __attribute__((packed)) arg;
20
- };
23
+ } KERNAUX_PACKED arg;
24
+ }
25
+ KERNAUX_PACKED;
26
+
27
+ #include <kernaux/macro/packing_end.run>
21
28
 
22
29
  struct DynArg DynArg_create();
23
30
  void DynArg_init(struct DynArg *dynarg);
data/ext/default/ntoa.c CHANGED
@@ -138,7 +138,7 @@ VALUE rb_KernAux_itoa(const int argc, const VALUE *argv, const VALUE self)
138
138
  }
139
139
 
140
140
  VALUE rb_KernAux_utoa2(
141
- const VALUE self_rb __attribute__((unused)),
141
+ const VALUE self_rb KERNAUX_UNUSED,
142
142
  const VALUE number_rb
143
143
  ) {
144
144
  const uint64_t number = NUM2ULL(number_rb);
@@ -151,7 +151,7 @@ VALUE rb_KernAux_utoa2(
151
151
  }
152
152
 
153
153
  VALUE rb_KernAux_itoa2(
154
- const VALUE self_rb __attribute__((unused)),
154
+ const VALUE self_rb KERNAUX_UNUSED,
155
155
  const VALUE number_rb
156
156
  ) {
157
157
  const int64_t number = NUM2LL(number_rb);
@@ -161,7 +161,7 @@ VALUE rb_KernAux_itoa2(
161
161
  }
162
162
 
163
163
  VALUE rb_KernAux_utoa8(
164
- const VALUE self_rb __attribute__((unused)),
164
+ const VALUE self_rb KERNAUX_UNUSED,
165
165
  const VALUE number_rb
166
166
  ) {
167
167
  const uint64_t number = NUM2ULL(number_rb);
@@ -174,7 +174,7 @@ VALUE rb_KernAux_utoa8(
174
174
  }
175
175
 
176
176
  VALUE rb_KernAux_itoa8(
177
- const VALUE self_rb __attribute__((unused)),
177
+ const VALUE self_rb KERNAUX_UNUSED,
178
178
  const VALUE number_rb
179
179
  ) {
180
180
  const int64_t number = NUM2LL(number_rb);
@@ -184,7 +184,7 @@ VALUE rb_KernAux_itoa8(
184
184
  }
185
185
 
186
186
  VALUE rb_KernAux_utoa10(
187
- const VALUE self_rb __attribute__((unused)),
187
+ const VALUE self_rb KERNAUX_UNUSED,
188
188
  const VALUE number_rb
189
189
  ) {
190
190
  const uint64_t number = NUM2ULL(number_rb);
@@ -197,7 +197,7 @@ VALUE rb_KernAux_utoa10(
197
197
  }
198
198
 
199
199
  VALUE rb_KernAux_itoa10(
200
- const VALUE self_rb __attribute__((unused)),
200
+ const VALUE self_rb KERNAUX_UNUSED,
201
201
  const VALUE number_rb
202
202
  ) {
203
203
  const int64_t number = NUM2LL(number_rb);
@@ -207,7 +207,7 @@ VALUE rb_KernAux_itoa10(
207
207
  }
208
208
 
209
209
  VALUE rb_KernAux_utoa16(
210
- const VALUE self_rb __attribute__((unused)),
210
+ const VALUE self_rb KERNAUX_UNUSED,
211
211
  const VALUE number_rb
212
212
  ) {
213
213
  const uint64_t number = NUM2ULL(number_rb);
@@ -220,7 +220,7 @@ VALUE rb_KernAux_utoa16(
220
220
  }
221
221
 
222
222
  VALUE rb_KernAux_itoa16(
223
- const VALUE self_rb __attribute__((unused)),
223
+ const VALUE self_rb KERNAUX_UNUSED,
224
224
  const VALUE number_rb
225
225
  ) {
226
226
  const int64_t number = NUM2LL(number_rb);
data/ext/default/printf.c CHANGED
@@ -68,7 +68,7 @@ void init_printf()
68
68
  VALUE rb_KernAux_snprintf1(
69
69
  const int argc,
70
70
  const VALUE *const argv_rb,
71
- const VALUE self __attribute__((unused))
71
+ const VALUE self KERNAUX_UNUSED
72
72
  ) {
73
73
  if (argc < 2 || argc > 5) rb_raise(rb_eArgError, "expected 2, 3, 4 or 5 args");
74
74
 
@@ -85,9 +85,7 @@ VALUE rb_KernAux_snprintf1(
85
85
  while (*fmt && *fmt != '%') ++fmt;
86
86
  if (*(fmt++) != '%') rb_raise(rb_eArgError, "invalid format");
87
87
 
88
- struct KernAux_PrintfFmt_Spec spec = KernAux_PrintfFmt_Spec_create();
89
-
90
- fmt = KernAux_PrintfFmt_Spec_parse(&spec, fmt);
88
+ struct KernAux_PrintfFmt_Spec spec = KernAux_PrintfFmt_Spec_create_out(&fmt);
91
89
 
92
90
  while (*fmt) {
93
91
  if (*(fmt++) == '%') rb_raise(rb_eArgError, "invalid format");
@@ -2,7 +2,7 @@
2
2
 
3
3
  module KernAux
4
4
  # Gem version.
5
- VERSION = '0.5.0'
5
+ VERSION = '0.6.0'
6
6
 
7
7
  ##
8
8
  # This module includes functions to determine if specific features are
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kernaux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Kotov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-26 00:00:00.000000000 Z
11
+ date: 2022-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -207,7 +207,7 @@ metadata:
207
207
  homepage_uri: https://github.com/tailix/libkernaux/tree/master/bindings/ruby
208
208
  source_code_uri: https://github.com/tailix/libkernaux/tree/master/bindings/ruby
209
209
  bug_tracker_uri: https://github.com/tailix/libkernaux/issues
210
- documentation_uri: https://www.rubydoc.info/gems/kernaux/0.5.0
210
+ documentation_uri: https://www.rubydoc.info/gems/kernaux/0.6.0
211
211
  post_install_message:
212
212
  rdoc_options: []
213
213
  require_paths: