carray 1.3.2 → 1.3.3

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: ea50398fd82431dc1bc7cf02a0eb419646194e46d6a96332b6f22bed6e00f254
4
- data.tar.gz: 87cf5b32d5e4449ba85b275915bdc767f9067e1012fe58712eb39447edf6cd43
3
+ metadata.gz: ed57e98ceb7b9a6dd20bdcc198768e05f2f813c90fb8b01b66aa22ff1533dea0
4
+ data.tar.gz: 0bcb559bed2952b2b409fa4a775ed42f333940983b9be9ae1a10519d601ae35b
5
5
  SHA512:
6
- metadata.gz: 6d5ad8c819c3be008b9281aa6fca197db2e49d009319ee32de09073efef3a772a3a174a00de9a9768be106aac66e33bec2e349d5e3c460a99b1eeb289abe7691
7
- data.tar.gz: 41c4b2d57f30806181722cca5348d8d72523adf796bdc19583b8cb22338748d3ea66309cd8213d657c9165352a02663a66bd9da41c751c46252ff57cbd5bc983
6
+ metadata.gz: 33dc237571154a0e4cdd9982e6fb42d0d22689491b0c59d4a8384942acf016c4407faaa5695a1c38939727128849743445d7f182f5b0689a3c4b62adc9e50c43
7
+ data.tar.gz: d0794dfe656fbe639ecfdc1c2104aebf24e6b1a44e784e6f8cfa4845c9c1bc57dc84076d27604c02455defbdf8e1a98fb3123f3073044235d511f3b4c58f813b
@@ -387,7 +387,9 @@ class FortranFormatParser
387
387
  def read (io, list, state)
388
388
  str = nil
389
389
  if length
390
- list << (str = io.read(length))
390
+ count.times do
391
+ list << (str = io.read(length))
392
+ end
391
393
  else
392
394
  list << (str = io.read)
393
395
  end
@@ -461,7 +463,7 @@ class FortranFormatParser
461
463
  if state.zero
462
464
  list << str.gsub(/ /,'0').to_i
463
465
  else
464
- list << Integer(str)
466
+ list << str.to_i
465
467
  end
466
468
  end
467
469
  rescue
@@ -86,7 +86,13 @@ class CArray
86
86
 
87
87
  def unblob (type, subdim = nil)
88
88
  bytes = CArray.sizeof(type)
89
- elem = self[0]
89
+ elem = nil
90
+ self.each do |e|
91
+ unless e.nil?
92
+ elem = e
93
+ break
94
+ end
95
+ end
90
96
  if elem == nil and subdim == nil
91
97
  raise "first element is nil, please specify dimension."
92
98
  end
data/mkmf.log CHANGED
@@ -1,7 +1,11 @@
1
- have_header: checking for sys/types.h... -------------------- yes
2
-
3
- "clang -o conftest -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-darwin17 -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I. -I/Users/moto/.rbenv/versions/2.4.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe -Wall -O2 conftest.c -L. -L/Users/moto/.rbenv/versions/2.4.1/lib -L. -L/Users/moto/.rbenv/versions/2.4.1/lib -fstack-protector -L/usr/local/lib -lruby-static -framework CoreFoundation -lpthread -lgmp -ldl -lobjc "
4
- ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
1
+ "clang -o conftest -I/Users/himotoyoshi/.rbenv/versions/2.5.1/include/ruby-2.5.0/x86_64-darwin16 -I/Users/himotoyoshi/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/backward -I/Users/himotoyoshi/.rbenv/versions/2.5.1/include/ruby-2.5.0 -I. -I/Users/himotoyoshi/.rbenv/versions/2.5.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe -Wall -O2 conftest.c -L. -L/Users/himotoyoshi/.rbenv/versions/2.5.1/lib -L. -L/Users/himotoyoshi/.rbenv/versions/2.5.1/lib -fstack-protector -L/usr/local/lib -lruby.2.5.1-static -framework Foundation -lpthread -lgmp -ldl -lobjc "
2
+ In file included from conftest.c:1:
3
+ In file included from /Users/himotoyoshi/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby.h:33:
4
+ In file included from /Users/himotoyoshi/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/ruby.h:29:
5
+ /Users/himotoyoshi/.rbenv/versions/2.5.1/include/ruby-2.5.0/ruby/defines.h:112:10: fatal error: 'stdio.h' file not found
6
+ #include <stdio.h>
7
+ ^~~~~~~~~
8
+ 1 error generated.
5
9
  checked program was:
6
10
  /* begin */
7
11
  1: #include "ruby.h"
@@ -12,129 +16,3 @@ checked program was:
12
16
  6: }
13
17
  /* end */
14
18
 
15
- "clang -E -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-darwin17 -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I. -I/Users/moto/.rbenv/versions/2.4.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe -Wall -O2 conftest.c -o conftest.i"
16
- checked program was:
17
- /* begin */
18
- 1: #include "ruby.h"
19
- 2:
20
- 3: #include <sys/types.h>
21
- /* end */
22
-
23
- --------------------
24
-
25
- have_header: checking for stdint.h... -------------------- yes
26
-
27
- "clang -E -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-darwin17 -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I. -I/Users/moto/.rbenv/versions/2.4.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe -Wall -O2 conftest.c -o conftest.i"
28
- checked program was:
29
- /* begin */
30
- 1: #include "ruby.h"
31
- 2:
32
- 3: #include <stdint.h>
33
- /* end */
34
-
35
- --------------------
36
-
37
- have_type: checking for int8_t in ruby.h,sys/types.h,stdint.h... -------------------- yes
38
-
39
- "clang -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-darwin17 -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I. -I/Users/moto/.rbenv/versions/2.4.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe -Wall -O2 -c conftest.c"
40
- checked program was:
41
- /* begin */
42
- 1: #include "ruby.h"
43
- 2:
44
- 3: #include <ruby.h>
45
- 4: #include <sys/types.h>
46
- 5: #include <stdint.h>
47
- 6:
48
- 7: /*top*/
49
- 8: typedef int8_t conftest_type;
50
- 9: int conftestval[sizeof(conftest_type)?1:-1];
51
- /* end */
52
-
53
- --------------------
54
-
55
- have_type: checking for uint8_t in ruby.h,sys/types.h,stdint.h... -------------------- yes
56
-
57
- "clang -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-darwin17 -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I. -I/Users/moto/.rbenv/versions/2.4.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe -Wall -O2 -c conftest.c"
58
- checked program was:
59
- /* begin */
60
- 1: #include "ruby.h"
61
- 2:
62
- 3: #include <ruby.h>
63
- 4: #include <sys/types.h>
64
- 5: #include <stdint.h>
65
- 6:
66
- 7: /*top*/
67
- 8: typedef uint8_t conftest_type;
68
- 9: int conftestval[sizeof(conftest_type)?1:-1];
69
- /* end */
70
-
71
- --------------------
72
-
73
- have_type: checking for int16_t in ruby.h,sys/types.h,stdint.h... -------------------- yes
74
-
75
- "clang -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-darwin17 -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I. -I/Users/moto/.rbenv/versions/2.4.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe -Wall -O2 -c conftest.c"
76
- checked program was:
77
- /* begin */
78
- 1: #include "ruby.h"
79
- 2:
80
- 3: #include <ruby.h>
81
- 4: #include <sys/types.h>
82
- 5: #include <stdint.h>
83
- 6:
84
- 7: /*top*/
85
- 8: typedef int16_t conftest_type;
86
- 9: int conftestval[sizeof(conftest_type)?1:-1];
87
- /* end */
88
-
89
- --------------------
90
-
91
- have_type: checking for uint16_t in ruby.h,sys/types.h,stdint.h... -------------------- yes
92
-
93
- "clang -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-darwin17 -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I. -I/Users/moto/.rbenv/versions/2.4.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe -Wall -O2 -c conftest.c"
94
- checked program was:
95
- /* begin */
96
- 1: #include "ruby.h"
97
- 2:
98
- 3: #include <ruby.h>
99
- 4: #include <sys/types.h>
100
- 5: #include <stdint.h>
101
- 6:
102
- 7: /*top*/
103
- 8: typedef uint16_t conftest_type;
104
- 9: int conftestval[sizeof(conftest_type)?1:-1];
105
- /* end */
106
-
107
- --------------------
108
-
109
- have_type: checking for int32_t in ruby.h,sys/types.h,stdint.h... -------------------- yes
110
-
111
- "clang -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-darwin17 -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I. -I/Users/moto/.rbenv/versions/2.4.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe -Wall -O2 -c conftest.c"
112
- checked program was:
113
- /* begin */
114
- 1: #include "ruby.h"
115
- 2:
116
- 3: #include <ruby.h>
117
- 4: #include <sys/types.h>
118
- 5: #include <stdint.h>
119
- 6:
120
- 7: /*top*/
121
- 8: typedef int32_t conftest_type;
122
- 9: int conftestval[sizeof(conftest_type)?1:-1];
123
- /* end */
124
-
125
- --------------------
126
-
127
- "clang -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-darwin17 -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/moto/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I. -I/Users/moto/.rbenv/versions/2.4.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe -Wall -O2 -c conftest.c"
128
- checked program was:
129
- /* begin */
130
- 1: #include "ruby.h"
131
- 2:
132
- 3: #include <ruby.h>
133
- 4: #include <sys/types.h>
134
- 5: #include <stdint.h>
135
- 6:
136
- 7: /*top*/
137
- 8: typedef uint32_t conftest_type;
138
- 9: int conftestval[sizeof(conftest_type)?1:-1];
139
- /* end */
140
-
data/version.h CHANGED
@@ -10,9 +10,9 @@
10
10
 
11
11
  ---------------------------------------------------------------------------- */
12
12
 
13
- #define CA_VERSION "1.3.2"
14
- #define CA_VERSION_CODE 132
13
+ #define CA_VERSION "1.3.3"
14
+ #define CA_VERSION_CODE 133
15
15
  #define CA_VERSION_MAJOR 1
16
16
  #define CA_VERSION_MINOR 3
17
- #define CA_VERSION_TEENY 2
18
- #define CA_VERSION_DATE "2018/12/10"
17
+ #define CA_VERSION_TEENY 3
18
+ #define CA_VERSION_DATE "2019/08/06"
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.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroki Motoyoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-10 00:00:00.000000000 Z
11
+ date: 2019-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: narray