iseq 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +2 -2
- data/README.ja +1 -1
- data/ext/extconf.rb +15 -0
- data/ext/iseq.c +15 -2
- data/files +7 -0
- metadata +4 -3
data/README
CHANGED
@@ -5,9 +5,9 @@ This is a library, by the ISeq freaks, for the ISeq freaks, of the ISeq freaks.
|
|
5
5
|
RubyVM::InstructionSequence is too long name, so I aliased it as Object::ISeq.
|
6
6
|
please use ISeq easily.
|
7
7
|
|
8
|
-
I define RubyVM::InstructionSequence
|
8
|
+
I define RubyVM::InstructionSequence.load, it is hidden feature on Ruby level.
|
9
9
|
|
10
|
-
Other feature is
|
10
|
+
Other feature is under seeking. If you have a question, please contact me.
|
11
11
|
e-mail (s.wanabe AT gmail.com) or twitter (wannabe53) is welcome.
|
12
12
|
|
13
13
|
LICENCE
|
data/README.ja
CHANGED
@@ -5,7 +5,7 @@ ISeq
|
|
5
5
|
RubyVM::InstructionSequence �Ƃ��������ɂ��������O���g�킹�Ȃ��C���X�Ȃ̂�
|
6
6
|
Object::ISeq �ɑ�����܂����B�C�y�� ISeq �ƎQ�Ƃ��Ă��������B
|
7
7
|
|
8
|
-
�ӂ��� Ruby ����͎g���Ȃ� RubyVM::InstructionSequence
|
8
|
+
�ӂ��� Ruby ����͎g���Ȃ� RubyVM::InstructionSequence.load ���`���܂����B
|
9
9
|
|
10
10
|
���̂ق��̋@�\�͍l�����ł��B�Ȃɂ�����܂����烏�i�x�܂ŁB
|
11
11
|
���[���is.wanabe ������ gmail.com�j�܂��� twitter�iwannabe53�j�łǂ����B
|
data/ext/extconf.rb
CHANGED
@@ -1,6 +1,21 @@
|
|
1
1
|
require "mkmf"
|
2
|
+
|
3
|
+
# $defs = ["-D_MSC_VER=1200"]
|
4
|
+
# $LDFLAGS += " msvcrt_winxp.obj"
|
5
|
+
|
2
6
|
if RUBY_VERSION >= "1.9.0" &&
|
3
7
|
defined?(RUBY_ENGINE) &&
|
4
8
|
RUBY_ENGINE == "ruby"
|
9
|
+
#$defs ||= []
|
10
|
+
load_api = \
|
11
|
+
if RUBY_VERSION < "1.9.1"
|
12
|
+
$CFLAGS += " -DOLD_ISEQ_LOAD"
|
13
|
+
"rb_iseq_load"
|
14
|
+
elsif RUBY_VERSION < "1.9.2"
|
15
|
+
"ruby_iseq_load"
|
16
|
+
else
|
17
|
+
"rb_iseq_load"
|
18
|
+
end
|
19
|
+
$CFLAGS += " -DISEQ_LOAD=#{load_api}"
|
5
20
|
create_makefile("iseq")
|
6
21
|
end
|
data/ext/iseq.c
CHANGED
@@ -1,7 +1,20 @@
|
|
1
1
|
#include "ruby.h"
|
2
|
+
#ifndef ISEQ_LOAD
|
3
|
+
#define ISEQ_LOAD rb_iseq_load
|
4
|
+
#endif
|
2
5
|
|
3
6
|
RUBY_EXTERN VALUE rb_cISeq;
|
4
|
-
|
7
|
+
|
8
|
+
#ifdef OLD_ISEQ_LOAD
|
9
|
+
RUBY_EXTERN VALUE iseq_load(VALUE self, VALUE data, VALUE parent, VALUE opt);
|
10
|
+
static inline VALUE
|
11
|
+
ISEQ_LOAD(VALUE data, VALUE parent, VALUE opt)
|
12
|
+
{
|
13
|
+
iseq_load(rb_cISeq, data, parent, opt);
|
14
|
+
}
|
15
|
+
#else
|
16
|
+
RUBY_EXTERN VALUE ISEQ_LOAD(VALUE data, VALUE parent, VALUE opt);
|
17
|
+
#endif
|
5
18
|
|
6
19
|
static VALUE
|
7
20
|
iseq_s_load(int argc, VALUE *argv, VALUE self)
|
@@ -9,7 +22,7 @@ iseq_s_load(int argc, VALUE *argv, VALUE self)
|
|
9
22
|
VALUE data, opt=Qnil;
|
10
23
|
rb_scan_args(argc, argv, "11", &data, &opt);
|
11
24
|
|
12
|
-
return
|
25
|
+
return ISEQ_LOAD(data, 0, opt);
|
13
26
|
}
|
14
27
|
|
15
28
|
void
|
data/files
ADDED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- wanabe
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-03-
|
17
|
+
date: 2010-03-18 00:00:00 +09:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- README.ja
|
37
37
|
- ext/extconf.rb
|
38
38
|
- ext/iseq.c
|
39
|
+
- files
|
39
40
|
has_rdoc: true
|
40
41
|
homepage: http://github.com/wanabe/iseq
|
41
42
|
licenses: []
|