RubyInline 3.2.0 → 3.2.1
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.
- data/History.txt +6 -0
- data/inline.rb +7 -3
- data/test_inline.rb +5 -1
- metadata +5 -4
data/History.txt
CHANGED
data/inline.rb
CHANGED
@@ -44,7 +44,7 @@ class CompilationError < RuntimeError; end
|
|
44
44
|
# the current namespace.
|
45
45
|
|
46
46
|
module Inline
|
47
|
-
VERSION = '3.2.
|
47
|
+
VERSION = '3.2.1'
|
48
48
|
|
49
49
|
$stderr.puts "RubyInline v #{VERSION}" if $DEBUG
|
50
50
|
|
@@ -89,6 +89,7 @@ module Inline
|
|
89
89
|
@@type_map = {
|
90
90
|
'char' => [ 'NUM2CHR', 'CHR2FIX' ],
|
91
91
|
'char *' => [ 'STR2CSTR', 'rb_str_new2' ],
|
92
|
+
'double' => [ 'NUM2DBL', 'rb_float_new' ],
|
92
93
|
'int' => [ 'FIX2INT', 'INT2FIX' ],
|
93
94
|
'long' => [ 'NUM2INT', 'INT2NUM' ],
|
94
95
|
'unsigned int' => [ 'NUM2UINT', 'UINT2NUM' ],
|
@@ -304,9 +305,12 @@ module Inline
|
|
304
305
|
|
305
306
|
cmd = "#{Config::CONFIG['LDSHARED']} #{flags} #{Config::CONFIG['CFLAGS']} -I #{hdrdir} -o #{@so_name} #{src_name} #{libs}"
|
306
307
|
|
307
|
-
|
308
|
+
case RUBY_PLATFORM
|
309
|
+
when /mswin32/ then
|
308
310
|
cmd += " -link /INCREMENTAL:no /EXPORT:Init_#{@mod_name}"
|
309
|
-
|
311
|
+
when /i386-cygwin/ then
|
312
|
+
cmd += ' -L/usr/local/lib -lruby.dll'
|
313
|
+
end
|
310
314
|
|
311
315
|
cmd += " 2> /dev/null" if $TESTING
|
312
316
|
|
data/test_inline.rb
CHANGED
@@ -324,7 +324,11 @@ return INT2FIX(42)}"
|
|
324
324
|
def test_generate_arity_3
|
325
325
|
src = "int func(int x, int y, int z) {blah; return x+y+z;}"
|
326
326
|
|
327
|
-
expected = "static VALUE func(int argc, VALUE *argv, VALUE self) {
|
327
|
+
expected = "static VALUE func(int argc, VALUE *argv, VALUE self) {
|
328
|
+
int x = FIX2INT(argv[0]);
|
329
|
+
int y = FIX2INT(argv[1]);
|
330
|
+
int z = FIX2INT(argv[2]);
|
331
|
+
blah; return INT2FIX(x+y+z);}"
|
328
332
|
|
329
333
|
util_generate(src, expected)
|
330
334
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.10
|
3
3
|
specification_version: 1
|
4
4
|
name: RubyInline
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 3.2.
|
7
|
-
date:
|
6
|
+
version: 3.2.1
|
7
|
+
date: 2005-04-19
|
8
8
|
summary: Multi-language extension coding within ruby.
|
9
9
|
require_paths:
|
10
10
|
- "."
|
11
|
-
author: Ryan Davis
|
12
11
|
email: ryand-ruby@zenspider.com
|
13
12
|
homepage: http://www.zenspider.com/ZSS/Products/RubyInline/
|
14
13
|
rubyforge_project: rubyinline
|
@@ -28,6 +27,8 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
28
27
|
version: 0.0.0
|
29
28
|
version:
|
30
29
|
platform: ruby
|
30
|
+
authors:
|
31
|
+
- Ryan Davis
|
31
32
|
files:
|
32
33
|
- History.txt
|
33
34
|
- Makefile
|