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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e750df14d398beba90298203a253b80bf9f3f8a1
4
- data.tar.gz: 372405f4be4af7621011dc3e725aad673903d618
3
+ metadata.gz: 86cecb4433272ac917562bf243d29b1e8aa3a29b
4
+ data.tar.gz: 36bb32592e1397ad672a64ca422e6c5e061fda64
5
5
  SHA512:
6
- metadata.gz: 2d3eaf9c183473c1ae7a65120ee54d5f32b369229b29282936b5bcbb32b482a39e7da011b8b51479ef8f9dd4f941c58571455759065bce6eb81889b061bc11c4
7
- data.tar.gz: 5283d53bae1c583c57fbe5459505a10f4d6bc5b45fc7647863c2ca4927f18ed205a70e4ade244b39f1ac3f5f403fbc83896dfd5fedf9d9444ec9ef51db70493e
6
+ metadata.gz: 4ac1417a702843bc61302022870872bbb353e8f0cd3408cd3d152bbb77cd08d62f78566f28a1f7b1d589624eb539322d24d94222435dad3defd741ea9d2b39e8
7
+ data.tar.gz: ad3f7f25ff4b2bd8122b36ba97d93b0b09c82298b729aa83c8647fa3a90380ed7c8fe4566023849542acb0772bd105197117a9c15184dfee6dbe9161e87a0b61
data/carray.h CHANGED
@@ -505,7 +505,7 @@ typedef struct {
505
505
 
506
506
  /*
507
507
  CAReduce is an internal class
508
- used only in reference as data_type with different byte size
508
+ used only in ca_obj_refer.c.
509
509
  */
510
510
 
511
511
  typedef struct {
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
@@ -13,6 +13,11 @@
13
13
  #include "ruby.h"
14
14
  #include "carray.h"
15
15
 
16
+ #if RUBY_VERSION_CODE >= 240
17
+ # define rb_cFixnum rb_cInteger
18
+ # define rb_cBignum rb_cInteger
19
+ #endif
20
+
16
21
  VALUE CA_NAN, CA_INF;
17
22
 
18
23
  static ID id___or__;
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])
@@ -62,7 +62,7 @@ def fortran_namelist (name, out)
62
62
  end
63
63
  " #{ident} = #{value}"
64
64
  }
65
- return ["&#{name}", list.join(",\n") + " /"].join("\n")
65
+ return ["&#{name}", list.join(",\n") + " /", ""].join("\n")
66
66
  end
67
67
 
68
68
  def fortran_namelist_read (io, name=nil, out={})
@@ -0,0 +1,10 @@
1
+ require "fortio"
2
+
3
+ a = {
4
+ :array => [1,2,3],
5
+ :x => 1,
6
+ :y => 2.2
7
+ }
8
+
9
+ fortran_namelist_write(STDOUT, "a", a)
10
+ fortran_namelist_write(STDOUT, "a", a)
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.1.8"
14
- #define CA_VERSION_CODE 118
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 1
17
- #define CA_VERSION_TEENY 8
18
- #define CA_VERSION_DATE "2016/05/10"
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.1.8
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: 2016-08-24 00:00:00.000000000 Z
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.3
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