bigdecimal 1.4.0.pre.20181204a → 1.4.0.pre.20181205a
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 +4 -4
- data/bigdecimal.gemspec +1 -1
- data/ext/bigdecimal/bigdecimal.c +3 -4
- data/ext/bigdecimal/depend +2 -0
- data/ext/bigdecimal/extconf.rb +1 -37
- data/ext/bigdecimal/util/extconf.rb +7 -23
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1efca1a1549d20fd900c4c91093190ed708a17d1f9f690613243fc313269b535
|
4
|
+
data.tar.gz: be5df8a6f0ccaf32b76ff844d8f1163855fb0313e67ee8490b12e456b0d43f23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cff275e3d30c221ba4ba999ddba252c41aeaf01d3dba7fce7d1a6953149e2eb3cbc3b746890c5ed9cd3a3aab5ae87d1a3168b6be021471254de11ebf21c1fcd1
|
7
|
+
data.tar.gz: 962973030d179795586bba23390bcc54dee9166cf771c5885f34a0ecd1a96c948c757826b4c2371489b8370ba8564095859ebb7370e884a03408c6cf67e9840b
|
data/bigdecimal.gemspec
CHANGED
data/ext/bigdecimal/bigdecimal.c
CHANGED
@@ -3141,13 +3141,12 @@ rmpd_util_str_to_d(VALUE str)
|
|
3141
3141
|
ENTER(1);
|
3142
3142
|
char const *c_str;
|
3143
3143
|
Real *pv;
|
3144
|
-
VALUE obj;
|
3145
3144
|
|
3146
3145
|
c_str = StringValueCStr(str);
|
3147
3146
|
GUARD_OBJ(pv, VpAlloc(0, c_str, 0, 1));
|
3148
|
-
obj = TypedData_Wrap_Struct(rb_cBigDecimal, &BigDecimal_data_type, pv);
|
3149
|
-
RB_OBJ_FREEZE(obj);
|
3150
|
-
return obj;
|
3147
|
+
pv->obj = TypedData_Wrap_Struct(rb_cBigDecimal, &BigDecimal_data_type, pv);
|
3148
|
+
RB_OBJ_FREEZE(pv->obj);
|
3149
|
+
return pv->obj;
|
3151
3150
|
}
|
3152
3151
|
|
3153
3152
|
/* Document-class: BigDecimal
|
data/ext/bigdecimal/depend
CHANGED
data/ext/bigdecimal/extconf.rb
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
# frozen_string_literal: false
|
2
2
|
require 'mkmf'
|
3
3
|
|
4
|
-
def windows_platform?
|
5
|
-
/cygwin|mingw|mswin/ === RUBY_PLATFORM
|
6
|
-
end
|
7
|
-
|
8
4
|
gemspec_name = gemspec_path = nil
|
9
5
|
unless ['', '../../'].any? {|dir|
|
10
6
|
gemspec_name = "#{dir}bigdecimal.gemspec"
|
@@ -32,38 +28,6 @@ have_func("rb_rational_den", "ruby.h")
|
|
32
28
|
have_func("rb_array_const_ptr", "ruby.h")
|
33
29
|
have_func("rb_sym2str", "ruby.h")
|
34
30
|
|
35
|
-
if windows_platform?
|
36
|
-
library_base_name = "ruby-bigdecimal"
|
37
|
-
case RUBY_PLATFORM
|
38
|
-
when /cygwin|mingw/
|
39
|
-
import_library_name = "libruby-bigdecimal.a"
|
40
|
-
when /mswin/
|
41
|
-
import_library_name = "bigdecimal-$(arch).lib"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
checking_for(checking_message("Windows")) do
|
46
|
-
if windows_platform?
|
47
|
-
case RUBY_PLATFORM
|
48
|
-
when /cygwin|mingw/
|
49
|
-
$DLDFLAGS << " $(srcdir)/bigdecimal.def"
|
50
|
-
$DLDFLAGS << " -Wl,--out-implib=$(TARGET_SO_DIR)#{import_library_name}"
|
51
|
-
when /mswin/
|
52
|
-
$DLDFLAGS << " /DEF:$(srcdir)/bigdecimal.def"
|
53
|
-
end
|
54
|
-
$cleanfiles << import_library_name
|
55
|
-
true
|
56
|
-
else
|
57
|
-
false
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
31
|
create_makefile('bigdecimal') {|mf|
|
62
|
-
mf << "
|
63
|
-
case RUBY_PLATFORM
|
64
|
-
when /mswin/
|
65
|
-
mf << "\nall:\n\tdir $(TARGET_SO_DIR)"
|
66
|
-
else
|
67
|
-
mf << "\nall:\n\tls $(TARGET_SO_DIR)"
|
68
|
-
end
|
32
|
+
mf << "GEMSPEC = #{gemspec_name}\n"
|
69
33
|
}
|
@@ -1,36 +1,20 @@
|
|
1
1
|
# frozen_string_literal: false
|
2
2
|
require 'mkmf'
|
3
3
|
|
4
|
-
|
5
|
-
/cygwin|mingw|mswin/ === RUBY_PLATFORM
|
6
|
-
end
|
7
|
-
|
8
|
-
if windows_platform?
|
9
|
-
library_base_name = "ruby-bigdecimal"
|
4
|
+
checking_for(checking_message("Windows")) do
|
10
5
|
case RUBY_PLATFORM
|
11
6
|
when /cygwin|mingw/
|
12
|
-
import_library_name = "libruby-bigdecimal.a"
|
13
|
-
when /mswin/
|
14
|
-
import_library_name = "bigdecimal-$(arch).lib"
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
checking_for(checking_message("Windows")) do
|
19
|
-
if windows_platform?
|
20
7
|
if defined?($extlist)
|
21
8
|
build_dir = "$(TARGET_SO_DIR)../"
|
22
9
|
else
|
23
10
|
base_dir = File.expand_path('../../../..', __FILE__)
|
24
|
-
build_dir = File.join(base_dir, "tmp", RUBY_PLATFORM, "bigdecimal", RUBY_VERSION)
|
25
|
-
end
|
26
|
-
case RUBY_PLATFORM
|
27
|
-
when /cygwin|mingw/
|
28
|
-
$LDFLAGS << " -L#{build_dir} -L.. -L .."
|
29
|
-
$libs << " -l#{library_base_name}"
|
30
|
-
when /mswin/
|
31
|
-
$DLDFLAGS << " /libpath:#{build_dir} /libpath:.."
|
32
|
-
$libs << " #{import_library_name}"
|
11
|
+
build_dir = File.join(base_dir, "tmp", RUBY_PLATFORM, "bigdecimal", RUBY_VERSION, "")
|
33
12
|
end
|
13
|
+
$libs << " #{build_dir}bigdecimal.so"
|
14
|
+
true
|
15
|
+
when /mswin/
|
16
|
+
$DLDFLAGS << " -libpath:.."
|
17
|
+
$libs << " bigdecimal-$(arch).lib"
|
34
18
|
true
|
35
19
|
else
|
36
20
|
false
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bigdecimal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.0.pre.
|
4
|
+
version: 1.4.0.pre.20181205a
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenta Murata
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-12-
|
13
|
+
date: 2018-12-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|