[#863] RDtool-0.5.0 — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp>
Hi,
18 messages
1999/10/23
[#864] Re: RDtool-0.5.0
— matz@... (Yukihiro Matsumoto)
1999/10/26
Hi,
[#865] Re: RDtool-0.5.0
— Toshiro Kuwabara <toshirok@...3.so-net.ne.jp>
1999/10/26
Hi,
[#866] Re: RDtool-0.5.0
— matz@... (Yukihiro Matsumoto)
1999/10/26
Hi,
[#892] Re: RDtool-0.5.0
— Toshiro Kuwabara <toshirok@...3.so-net.ne.jp>
1999/10/31
Hi,
[#894] Re: RDtool-0.5.0
— matz@... (Yukihiro Matsumoto)
1999/11/01
Hi,
[#905] Re: RDtool-0.5.0
— Toshiro Kuwabara <toshirok@...3.so-net.ne.jp>
1999/11/04
Hi,
[#906] Re: RDtool-0.5.0
— matz@... (Yukihiro Matsumoto)
1999/11/04
Hi,
[#907] Re: RDtool-0.5.0
— Kazuhiro HIWADA <hiwada@...>
1999/11/04
Hi,
[#908] Re: RDtool-0.5.0
— kjana@... (YANAGAWA Kazuhisa)
1999/11/05
In message <19991105025532K.hiwada@kuee.kyoto-u.ac.jp>
[#867] call with a Proc — ts <decoux@...>
11 messages
1999/10/28
[#868] Re: call with a Proc
— gotoken@... (GOTO Kentaro)
1999/10/28
Hi,
[#877] local / dynamic variables — ts <decoux@...>
11 messages
1999/10/29
[#878] Re: local / dynamic variables
— gotoken@... (GOTO Kentaro)
1999/10/29
Hi,
[ruby-talk:00843] Re: Ruby as an extension language ?
From:
matz@... (Yukihiro Matsumoto)
Date:
1999-10-03 14:22:19 UTC
List:
ruby-talk #843
Hi,
In message "[ruby-talk:00839] Ruby as an extension language ?"
on 99/10/03, Artur Matos <ei96024@fe.up.pt> writes:
| I'm looking for an extension language (aka a macro language) for
|a large program i'm developing. After seeing some alternatives, I think
|Ruby could make a nice extension language for my program.
Quite possibly.
| The problem is I don't find specific information for using
|Ruby this way, only as a standalone scripting language. Is
|it possible to use Ruby as an extension language ? If it is, I would like
|to know how :
|
| - to embeb the ruby interpreter in my program.
| - to interface ruby with C/C++ calls. (specialy
|C++, as my program is written in C++)
Did you check out README.EXT file in the distribution?
Hope that helps, especially for the latter.
To embed the interpreter, First, you need to initialize the
interpreter by calling:
ruby_init();
And then invoke the interpreter by calling
rb_eval_string(str);
or
rb_eval_string_protect(str, &status);
rb_eval_string_protect() does not jump out by the exception. if the
exception raised it set the status variable to non-zero. So you don't
have to protect against any global exits.
Because Ruby is written in C, you have to declare the prototypes of
the Ruby calling functions within `extern "C"'.
matz.