carray 1.1.8 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/carray.h +1 -1
- data/carray_access.c +19 -0
- data/carray_cast.c +1 -1
- data/carray_numeric.c +5 -0
- data/carray_utils.c +19 -0
- data/ext/fortio/lib/fortio/fortran_namelist.rb +1 -1
- data/ext/fortio/test/test_namelist_write.rb +10 -0
- data/ruby_float_func.c +5 -0
- data/version.h +5 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86cecb4433272ac917562bf243d29b1e8aa3a29b
|
4
|
+
data.tar.gz: 36bb32592e1397ad672a64ca422e6c5e061fda64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ac1417a702843bc61302022870872bbb353e8f0cd3408cd3d152bbb77cd08d62f78566f28a1f7b1d589624eb539322d24d94222435dad3defd741ea9d2b39e8
|
7
|
+
data.tar.gz: ad3f7f25ff4b2bd8122b36ba97d93b0b09c82298b729aa83c8647fa3a90380ed7c8fe4566023849542acb0772bd105197117a9c15184dfee6dbe9161e87a0b61
|
data/carray.h
CHANGED
data/carray_access.c
CHANGED
@@ -12,6 +12,25 @@
|
|
12
12
|
|
13
13
|
#include "carray.h"
|
14
14
|
|
15
|
+
#if RUBY_VERSION_CODE >= 240
|
16
|
+
#define RSTRUCT_EMBED_LEN_MAX RSTRUCT_EMBED_LEN_MAX
|
17
|
+
enum {
|
18
|
+
RSTRUCT_EMBED_LEN_MAX = 3,
|
19
|
+
RSTRUCT_ENUM_END
|
20
|
+
};
|
21
|
+
struct RStruct {
|
22
|
+
struct RBasic basic;
|
23
|
+
union {
|
24
|
+
struct {
|
25
|
+
long len;
|
26
|
+
const VALUE *ptr;
|
27
|
+
} heap;
|
28
|
+
const VALUE ary[RSTRUCT_EMBED_LEN_MAX];
|
29
|
+
} as;
|
30
|
+
};
|
31
|
+
#define RSTRUCT(obj) (R_CAST(RStruct)(obj))
|
32
|
+
#endif
|
33
|
+
|
15
34
|
#if RUBY_VERSION_CODE >= 190
|
16
35
|
#define RANGE_BEG(r) (RSTRUCT(r)->as.ary[0])
|
17
36
|
#define RANGE_END(r) (RSTRUCT(r)->as.ary[1])
|
data/carray_cast.c
CHANGED
@@ -357,7 +357,7 @@ rb_ca_to_fixlen (int argc, VALUE *argv, VALUE self)
|
|
357
357
|
{
|
358
358
|
volatile VALUE ropt = rb_pop_options(&argc, &argv);
|
359
359
|
VALUE list[2];
|
360
|
-
rb_scan_args(argc, argv, "0");
|
360
|
+
// rb_scan_args(argc, argv, "0");
|
361
361
|
list[0] = INT2NUM(CA_FIXLEN);
|
362
362
|
list[1] = ropt;
|
363
363
|
return rb_ca_to_type_internal(2, list, self);
|
data/carray_numeric.c
CHANGED
data/carray_utils.c
CHANGED
@@ -20,6 +20,25 @@
|
|
20
20
|
#include "st.h"
|
21
21
|
#endif
|
22
22
|
|
23
|
+
#if RUBY_VERSION_CODE >= 240
|
24
|
+
#define RSTRUCT_EMBED_LEN_MAX RSTRUCT_EMBED_LEN_MAX
|
25
|
+
enum {
|
26
|
+
RSTRUCT_EMBED_LEN_MAX = 3,
|
27
|
+
RSTRUCT_ENUM_END
|
28
|
+
};
|
29
|
+
struct RStruct {
|
30
|
+
struct RBasic basic;
|
31
|
+
union {
|
32
|
+
struct {
|
33
|
+
long len;
|
34
|
+
const VALUE *ptr;
|
35
|
+
} heap;
|
36
|
+
const VALUE ary[RSTRUCT_EMBED_LEN_MAX];
|
37
|
+
} as;
|
38
|
+
};
|
39
|
+
#define RSTRUCT(obj) (R_CAST(RStruct)(obj))
|
40
|
+
#endif
|
41
|
+
|
23
42
|
#if RUBY_VERSION_CODE >= 190
|
24
43
|
#define RANGE_BEG(r) (RSTRUCT(r)->as.ary[0])
|
25
44
|
#define RANGE_END(r) (RSTRUCT(r)->as.ary[1])
|
data/ruby_float_func.c
CHANGED
@@ -77,7 +77,12 @@ Init_numeric_float_function ()
|
|
77
77
|
rb_define_method(mod, "distance", rb_num_distance, 1);
|
78
78
|
|
79
79
|
rb_include_module(rb_cFloat, mod);
|
80
|
+
#if RUBY_VERSION_CODE >= 240
|
81
|
+
rb_include_module(rb_cInteger, mod);
|
82
|
+
#else
|
80
83
|
rb_include_module(rb_cFixnum, mod);
|
81
84
|
rb_include_module(rb_cBignum, mod);
|
85
|
+
#endif
|
86
|
+
|
82
87
|
}
|
83
88
|
|
data/version.h
CHANGED
@@ -10,9 +10,9 @@
|
|
10
10
|
|
11
11
|
---------------------------------------------------------------------------- */
|
12
12
|
|
13
|
-
#define CA_VERSION "1.
|
14
|
-
#define CA_VERSION_CODE
|
13
|
+
#define CA_VERSION "1.2.0"
|
14
|
+
#define CA_VERSION_CODE 120
|
15
15
|
#define CA_VERSION_MAJOR 1
|
16
|
-
#define CA_VERSION_MINOR
|
17
|
-
#define CA_VERSION_TEENY
|
18
|
-
#define CA_VERSION_DATE "
|
16
|
+
#define CA_VERSION_MINOR 2
|
17
|
+
#define CA_VERSION_TEENY 0
|
18
|
+
#define CA_VERSION_DATE "2017/02/09"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carray
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroki Motoyoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: narray
|
@@ -178,6 +178,7 @@ files:
|
|
178
178
|
- ext/fortio/test/test_T.rb
|
179
179
|
- ext/fortio/test/test_fortran_format.rb
|
180
180
|
- ext/fortio/test/test_namelist.rb
|
181
|
+
- ext/fortio/test/test_namelist_write.rb
|
181
182
|
- ext/fortio/test/test_sequential.rb
|
182
183
|
- ext/fortio/test/test_sequential2.rb
|
183
184
|
- ext/fortio/work/test.rb
|
@@ -392,9 +393,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
392
393
|
version: '0'
|
393
394
|
requirements: []
|
394
395
|
rubyforge_project:
|
395
|
-
rubygems_version: 2.6.
|
396
|
+
rubygems_version: 2.6.8
|
396
397
|
signing_key:
|
397
398
|
specification_version: 4
|
398
399
|
summary: Multi-dimesional array class
|
399
400
|
test_files: []
|
400
|
-
has_rdoc: true
|