RubyInline 3.6.3 → 3.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +232 -227
- data/README.txt +3 -4
- data/Rakefile +1 -1
- data/lib/inline.rb +21 -6
- metadata +12 -9
data/History.txt
CHANGED
@@ -1,227 +1,232 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
1
|
+
### 3.6.4 / 2007-08-20
|
2
|
+
|
3
|
+
* 1 minor enhancement:
|
4
|
+
* Added ability to include ruby.h last. Thanks to Luc Heinrich.
|
5
|
+
|
6
|
+
### 3.6.3 / 2007-04-27
|
7
|
+
|
8
|
+
* 7 minor enhancements:
|
9
|
+
* Added map_ruby_const and map_c_const to C builder.
|
10
|
+
* Converted example.rb to a real benchmark setup.
|
11
|
+
* Improved error messages.
|
12
|
+
* Added options hash for all C builder methods.
|
13
|
+
* Options hash can take optional :method_name param to have ruby name diff from c.
|
14
|
+
* Converted to a more traditional setup. Now I can heckle!
|
15
|
+
* Cleaned up ruby.h search.
|
16
|
+
* 2 bug fixes:
|
17
|
+
* Added CCDLFLAGS. _Should_ pick up -fPIC on misconfigured 64 bit machines.
|
18
|
+
* Broke up all warnings so progress report was cleaner.
|
19
|
+
|
20
|
+
### 3.6.2 / 2006-10-12
|
21
|
+
|
22
|
+
* 2 bug fixes:
|
23
|
+
* comment stripper much more sane to fix problems on certain linux distros
|
24
|
+
* fixed a nit with older C compilers.
|
25
|
+
|
26
|
+
### 3.6.1 / 2006-10-11
|
27
|
+
|
28
|
+
* 1 minor enhancement
|
29
|
+
* Hoe'd the Rakefile. :P
|
30
|
+
* 2 bug fixes
|
31
|
+
* Removed VALUE from @types because it is now in @@type_map.
|
32
|
+
* Tweak added for mingw32.
|
33
|
+
|
34
|
+
|
35
|
+
### 3.6.0 / 2005-11-30 (omg I suck: actual release: 2006-09-15)
|
36
|
+
|
37
|
+
* 6 minor enhancements
|
38
|
+
* C builder can now be used directly for other foreign language glue.
|
39
|
+
* Pretty much all (c) functions are plain argument style, not argc/argv.
|
40
|
+
* Added Nathaniel and Dan's patches for windows support.
|
41
|
+
* Added VALUE as a default known type.
|
42
|
+
* Improved testing under $DEBUG.
|
43
|
+
* Deprecated $INLINE_FLAGS and $INLINE_LIBS are dead.
|
44
|
+
* 3 bug fixes
|
45
|
+
* Fixed a number of issues wrt testing.
|
46
|
+
* Cleaned up and cached certain calculations.
|
47
|
+
* Some windows compiler fixes went in, but MS compiler is a PITA still.
|
48
|
+
|
49
|
+
### 3.5.0 / 2005-10-15
|
50
|
+
|
51
|
+
* 4 minor enhancements
|
52
|
+
* Switched to install for Makefile.
|
53
|
+
* Lots of minor cleanup.
|
54
|
+
* Added add_to_init to extend init methods. Great hack!
|
55
|
+
* Added 2 demo files used in the rubyconf 2005 presentation.
|
56
|
+
* 1 bug fix
|
57
|
+
* Fixed example in README.txt. OOPS!
|
58
|
+
|
59
|
+
### 3.4.0 / 2005-07-13
|
60
|
+
|
61
|
+
* 2 minor enhancement
|
62
|
+
* Changed inline to take the language and a hash of options.
|
63
|
+
* Still backwards compatible, for now, and emits a warning.
|
64
|
+
* Options are available via the builder passed to your block.
|
65
|
+
* 2 bug fixes
|
66
|
+
* Modified caller discovery, yet again, due to changes in ruby 1.8.3.
|
67
|
+
* More compatible and clean with non-gems systems.
|
68
|
+
|
69
|
+
### 3.3.2 / 2005-05-19
|
70
|
+
|
71
|
+
* 4 bug fixes
|
72
|
+
* Fixed a line number issue when using c_raw w/ multi-line signatures.
|
73
|
+
* Inline can now be invoked multiple times per class.
|
74
|
+
* Filled out rdoc.
|
75
|
+
* Fixed some old tests.
|
76
|
+
|
77
|
+
### 3.3.1 / 2005-05-03
|
78
|
+
|
79
|
+
* 3 bug fixes
|
80
|
+
* Fixed a bug w/ unit tests involving caching of rootdir.
|
81
|
+
* Added a minor tweak to the file discovery when called through eval.
|
82
|
+
* Moved the packaging code into inline.rb in order to get rubygems wrapped scripts to work again (wrapper was breaking due to __FILE__ != $0).
|
83
|
+
|
84
|
+
### 3.3.0 / 2005-04-22
|
85
|
+
|
86
|
+
* 2 minor enhancement
|
87
|
+
* Added inline_package, which helps you package inlined code into gems.
|
88
|
+
* inline_package also generates a Rakefile for you if you need it.
|
89
|
+
* inline.rb now (only) loads packaged code when present.
|
90
|
+
|
91
|
+
### 3.2.1 / 2005-04-19
|
92
|
+
|
93
|
+
* 2 bug fixes
|
94
|
+
* Added double to typemap. Thanks Phil Tomson!
|
95
|
+
* Added a minor hack to get cygwin to work right--lemme know pls.
|
96
|
+
|
97
|
+
### 3.2.0 / 2004-11-27
|
98
|
+
|
99
|
+
* 8 minor enhancements
|
100
|
+
* Gemified
|
101
|
+
* Added #line preprocessor directives to make debugging inside your ruby file practical.
|
102
|
+
* Added uninstall rule to Makefile
|
103
|
+
* Inline::C now generates classes directly instead of included modules.
|
104
|
+
* Better execeptions are thrown on error.
|
105
|
+
* Incorporated a bunch of changes from Jonathan Paisley:
|
106
|
+
* Generation of inline'd class methods. (c_singleton and c_raw_singleton)
|
107
|
+
* Fixed problems with nested module/classes.
|
108
|
+
* Inline can now extend the same class multiple times.
|
109
|
+
* 2 bug fixes
|
110
|
+
* Smarter require/instantiation to accomodate other languages better.
|
111
|
+
* Fixed a logic error where running good code, then bad, then bad again ran the original good code.
|
112
|
+
|
113
|
+
### 3.1.0 / 2004-09-24
|
114
|
+
|
115
|
+
* 2 minor enhancement
|
116
|
+
* Extended API of Inline::C with prefix(code).
|
117
|
+
* Documented all public API.
|
118
|
+
* 2 bug fixes
|
119
|
+
* Cleaned a lot of code and tests.
|
120
|
+
* Removed nearly all tags.
|
121
|
+
|
122
|
+
### 3.0.1 / 2004-02-24
|
123
|
+
|
124
|
+
* 2 bug fixes
|
125
|
+
* I let references to ZenTestUnit slip through the release. Removed.
|
126
|
+
* Converted History.txt to ZenWeb format.
|
127
|
+
|
128
|
+
### 3.0.0 / 2003-12-23
|
129
|
+
|
130
|
+
* 3 major enhancements
|
131
|
+
* Complete rewrite with new design.
|
132
|
+
* Multiple language support, works with C/C++ out of the box.
|
133
|
+
* Multiple functions per compilation unit, now allowing entire classes to be defined and linked in one unit.
|
134
|
+
* Notes:
|
135
|
+
* I still need to write much better/complete documentation.
|
136
|
+
|
137
|
+
### 2.2.0 / 2003-01-25
|
138
|
+
|
139
|
+
* 1 minor enhancements
|
140
|
+
* Touch all generated files to avoid unnecessary diffs.
|
141
|
+
* 1 bug fixes
|
142
|
+
* Added good profiling example in tutorial/*.
|
143
|
+
* Added profiling strategy in README.txt.
|
144
|
+
* Notes:
|
145
|
+
* Paired with Doug Beaver <snarly@beaver.net>
|
146
|
+
|
147
|
+
### 2.1.1 / 2002-12-27
|
148
|
+
|
149
|
+
* 2 bug fixes
|
150
|
+
* Fixed a bug in inline.rb where it was comparing against inline.rb, not the caller.
|
151
|
+
* Tweaked example.rb to take the number of iterations as an option.
|
152
|
+
|
153
|
+
### 2.1.0 / 2002-12-17
|
154
|
+
|
155
|
+
* 2 minor enhancements
|
156
|
+
* Added inline_c_raw to replace Inline.inline.
|
157
|
+
* Removed module Inline as a whole. This gets rid of some
|
158
|
+
* major version incompatibilities, tons of duplicate code, and
|
159
|
+
* just seems to make things happier.
|
160
|
+
* 4 bug fixes
|
161
|
+
* Added a fix from Michael Scholz to fix the use of $0 for file test.
|
162
|
+
* Added private and public declarations since we are invading
|
163
|
+
* class Module.
|
164
|
+
* Fixed tests... oops!
|
165
|
+
* Lots of clean up...
|
166
|
+
* Notes:
|
167
|
+
* Reviewed by Doug Beaver <snarly@beaver.net>
|
168
|
+
|
169
|
+
### 2.0.0 / 2002-12-12
|
170
|
+
|
171
|
+
* 2 bug fixes
|
172
|
+
* Minor fix to get working on MacOS X (.so vs .bundle).
|
173
|
+
* Downgraded typemap to be compatible with 1.6.x.
|
174
|
+
* Notes:
|
175
|
+
* Paired w/ Doug Beaver <snarly@beaver.net>
|
176
|
+
|
177
|
+
### 2.0.0 beta / 2002-11-22
|
178
|
+
|
179
|
+
* 1 major enhancements
|
180
|
+
* Added inline_c, a "compile-time" version of inline. Massively enhanced, this version has a limited form of C function parsing.
|
181
|
+
* 2 minor enhancements
|
182
|
+
* Deprecated Inline#inline for Module#inline_c. To be removed by 2.1.0.
|
183
|
+
* Extended example.rb to include a fully written inlined C function.
|
184
|
+
* 3 bug fixes
|
185
|
+
* Updated README.txt and improved some of the documentation.
|
186
|
+
* Added test and clean rules to Makefile.
|
187
|
+
* Removed the copious warnings if running ruby < 1.7.2.
|
188
|
+
* Notes:
|
189
|
+
* Paired w/ Doug Beaver <snarly@beaver.net>
|
190
|
+
|
191
|
+
### 1.1.0 / 2002-11-01
|
192
|
+
|
193
|
+
* 2 minor enhancements
|
194
|
+
* Aliased methods are now inlined as well. 250x faster.
|
195
|
+
* ONLY on ruby 1.7*. Warns on ruby < 1.7.
|
196
|
+
* Added a makefile to automate running of all different benchmarks.
|
197
|
+
* 1 bug fixes
|
198
|
+
* Improved example to include an aliased method testcase.
|
199
|
+
|
200
|
+
### 1.0.7 / 2002-09-22
|
201
|
+
|
202
|
+
* 1 minor enhancements
|
203
|
+
* Only compiles the generated code if it was different from the previous version.
|
204
|
+
* 1 bug fixes
|
205
|
+
* Improved security: Checks group and global write on home directory.
|
206
|
+
|
207
|
+
### 1.0.6 / 2002-09-18
|
208
|
+
|
209
|
+
* 1 minor enhancements
|
210
|
+
* Added a prelude argument for header and datatype declarations.
|
211
|
+
* 3 bug fixes
|
212
|
+
* Only output stuff if invoked verbose (ie 'ruby -v ./example.rb').
|
213
|
+
* Added some compatibility code for windows.
|
214
|
+
* Declared requirement on POSIX system.
|
215
|
+
|
216
|
+
### 1.0.5 / 2002-09-11
|
217
|
+
|
218
|
+
* 2 bug fixes
|
219
|
+
* Improved security model for UNIX. Still not sure about windoze.
|
220
|
+
* Fixed History.txt to be accurate, gave example in README.
|
221
|
+
|
222
|
+
### 1.0.4 / 2002-09-10
|
223
|
+
|
224
|
+
* 1 major enhancements
|
225
|
+
* Released to sourceforge!
|
226
|
+
* 1 bug fixes
|
227
|
+
* A number of very minor bug fixes from IRC sessions w/ others.
|
228
|
+
|
229
|
+
### 1.0.0 / 2002-09-05
|
230
|
+
|
231
|
+
* 1 major enhancements
|
232
|
+
* Birthday!
|
data/README.txt
CHANGED
@@ -11,9 +11,8 @@ directly. By writing simple builder classes, you can teach how to cope
|
|
11
11
|
with new languages (fortran, perl, whatever). The code is compiled and
|
12
12
|
run on the fly when needed.
|
13
13
|
|
14
|
-
Using the package_inline tool Inline
|
15
|
-
|
16
|
-
compiler (read: windows)!
|
14
|
+
Using the package_inline tool Inline allows you to package up your
|
15
|
+
inlined object code for distribution to systems without a compiler.
|
17
16
|
|
18
17
|
** FEATURES/PROBLEMS:
|
19
18
|
|
@@ -110,7 +109,7 @@ compiler (read: windows)!
|
|
110
109
|
|
111
110
|
(The MIT License)
|
112
111
|
|
113
|
-
Copyright (c) 2001-
|
112
|
+
Copyright (c) 2001-2007 Ryan Davis, Zen Spider Software
|
114
113
|
|
115
114
|
Permission is hereby granted, free of charge, to any person obtaining
|
116
115
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
@@ -6,8 +6,8 @@ require 'hoe'
|
|
6
6
|
require './lib/inline.rb'
|
7
7
|
|
8
8
|
Hoe.new("RubyInline", Inline::VERSION) do |p|
|
9
|
-
p.summary = "Multi-language extension coding within ruby."
|
10
9
|
p.description = p.paragraphs_of("README.txt", 3).join
|
10
|
+
p.summary = p.description[/\A([^.]+\.){2}/]
|
11
11
|
p.url = p.paragraphs_of("README.txt", 1).join
|
12
12
|
p.changes = p.paragraphs_of("History.txt", 0..1).join
|
13
13
|
p.clean_globs << File.expand_path("~/.ruby_inline")
|
data/lib/inline.rb
CHANGED
@@ -51,7 +51,7 @@ class CompilationError < RuntimeError; end
|
|
51
51
|
# the current namespace.
|
52
52
|
|
53
53
|
module Inline
|
54
|
-
VERSION = '3.6.
|
54
|
+
VERSION = '3.6.4'
|
55
55
|
|
56
56
|
WINDOZE = /win32/ =~ RUBY_PLATFORM
|
57
57
|
DEV_NULL = (WINDOZE ? 'nul' : '/dev/null')
|
@@ -278,10 +278,12 @@ module Inline
|
|
278
278
|
|
279
279
|
@mod = mod
|
280
280
|
@src = []
|
281
|
+
@inc = []
|
281
282
|
@sig = {}
|
282
283
|
@flags = []
|
283
284
|
@libs = []
|
284
285
|
@init_extra = []
|
286
|
+
@include_ruby_first = true
|
285
287
|
end
|
286
288
|
|
287
289
|
##
|
@@ -318,8 +320,14 @@ module Inline
|
|
318
320
|
src_name = "#{Inline.directory}/#{module_name}.c"
|
319
321
|
old_src_name = "#{src_name}.old"
|
320
322
|
should_compare = File.write_with_backup(src_name) do |io|
|
323
|
+
if @include_ruby_first
|
324
|
+
@inc.unshift "#include \"ruby.h\""
|
325
|
+
else
|
326
|
+
@inc.push "#include \"ruby.h\""
|
327
|
+
end
|
328
|
+
|
321
329
|
io.puts
|
322
|
-
io.puts "
|
330
|
+
io.puts @inc.join("\n")
|
323
331
|
io.puts
|
324
332
|
io.puts @src.join("\n\n")
|
325
333
|
io.puts
|
@@ -392,7 +400,7 @@ module Inline
|
|
392
400
|
end
|
393
401
|
|
394
402
|
if WINDOZE then
|
395
|
-
Dir.chdir
|
403
|
+
Dir.chdir Inline.directory do
|
396
404
|
cmd = "mt /manifest lib.so.manifest /outputresource:so.dll;#2"
|
397
405
|
$stderr.puts "Embedding manifest with '#{cmd}'" if $DEBUG
|
398
406
|
result = `#{cmd}`
|
@@ -486,7 +494,15 @@ module Inline
|
|
486
494
|
# quotes or angle brackets.
|
487
495
|
|
488
496
|
def include(header)
|
489
|
-
@
|
497
|
+
@inc << "#include #{header}"
|
498
|
+
end
|
499
|
+
|
500
|
+
##
|
501
|
+
# Specifies that the the ruby.h header should be included *after* custom
|
502
|
+
# header(s) instead of before them.
|
503
|
+
|
504
|
+
def include_ruby_last
|
505
|
+
@include_ruby_first = false
|
490
506
|
end
|
491
507
|
|
492
508
|
##
|
@@ -701,8 +717,7 @@ class Dir
|
|
701
717
|
if $TESTING then
|
702
718
|
raise SecurityError, "Directory #{path} is insecure"
|
703
719
|
else
|
704
|
-
|
705
|
-
exit 1
|
720
|
+
abort "#{path} is insecure (#{'%o' % mode}). It may not be group or world writable. Exiting."
|
706
721
|
end
|
707
722
|
end
|
708
723
|
end
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.4
|
3
3
|
specification_version: 1
|
4
4
|
name: RubyInline
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 3.6.
|
7
|
-
date: 2007-
|
8
|
-
summary:
|
6
|
+
version: 3.6.4
|
7
|
+
date: 2007-08-20 00:00:00 -07:00
|
8
|
+
summary: Ruby Inline is an analog to Perl's Inline::C. Out of the box, it allows you to embed C/++ external module code in your ruby script directly.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: ryand-ruby@zenspider.com
|
@@ -44,10 +44,13 @@ files:
|
|
44
44
|
- tutorial/example2.rb
|
45
45
|
test_files:
|
46
46
|
- test/test_inline.rb
|
47
|
-
rdoc_options:
|
48
|
-
|
49
|
-
|
50
|
-
|
47
|
+
rdoc_options:
|
48
|
+
- --main
|
49
|
+
- README.txt
|
50
|
+
extra_rdoc_files:
|
51
|
+
- History.txt
|
52
|
+
- Manifest.txt
|
53
|
+
- README.txt
|
51
54
|
executables:
|
52
55
|
- inline_package
|
53
56
|
extensions: []
|
@@ -62,5 +65,5 @@ dependencies:
|
|
62
65
|
requirements:
|
63
66
|
- - ">="
|
64
67
|
- !ruby/object:Gem::Version
|
65
|
-
version: 1.
|
68
|
+
version: 1.3.0
|
66
69
|
version:
|