[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Embedding 1.9

Dave Thomas

1/7/2008 9:44:00 PM

Folks:

I'm working on the "Extending Ruby" chapter (now an appendix) for the
third PickAxe, and I'm finding a whole bunch of conflicting
information. Reading the source, it seems like there's no canonical
way of embedding Ruby in a C application. I have lots of alternatives
that _seem_ to work, but I want to be more authoritative than that.

Does anyone have any pointers to stuff that would help?


Thanks



Dave

5 Answers

Dave Thomas

1/8/2008 3:23:00 AM

0


On Jan 7, 2008, at 7:41 PM, Mark Guzman wrote:

> Have you checked out VIM? It has ruby embedded and provides an
> interface into vim buffers from ruby. HTH. Good luck.

Mark:

I don;t believe it has Ruby 1.9, though.


Dave

Dave Thomas

1/8/2008 7:08:00 AM

0


On Jan 8, 2008, at 12:20 AM, Mark Guzman wrote:

> case TAG_RAISE:
> case TAG_FATAL:


Mark:

Are you manually defining the TAG_xxx values somewhere? eval_intern.h
isn't installed onto the user side on my box.


Dave

Mark Guzman

1/8/2008 5:05:00 PM

0

<(08/01/08 16:08) Dave Thomas>
> Are you manually defining the TAG_xxx values somewhere? eval_intern.h isn't
> installed onto the user side on my box.

Dave,
Those are defined locally in if_ruby.c, that seems to be the convention
as the tcltk extension does the same. I wonder if those should be pushed
into ruby.h to ease embedding...?
--mark

--
Those the gods wish to destroy they call promising.
blog: http://...

Dave Thomas

1/8/2008 6:04:00 PM

0


On Jan 8, 2008, at 11:05 AM, Mark Guzman wrote:

>> Are you manually defining the TAG_xxx values somewhere?
>> eval_intern.h isn't
>> installed onto the user side on my box.
>
> Dave,
> Those are defined locally in if_ruby.c, that seems to be the
> convention
> as the tcltk extension does the same. I wonder if those should be
> pushed
> into ruby.h to ease embedding...?

That'd get my vote. I've copied core on this..

Dave

Paul Brannan

1/9/2008 3:36:00 PM

0

On Wed, Jan 09, 2008 at 03:03:49AM +0900, Dave Thomas wrote:
> > Dave,
> > Those are defined locally in if_ruby.c, that seems to be the
> > convention as the tcltk extension does the same. I wonder if those
> > should be pushed into ruby.h to ease embedding...?
>
> That'd get my vote. I've copied core on this..

I submitted a bug for this a while ago:

http://rubyforge.org/tracker/?func=detail&atid=1698&aid=13838&gr...

I see no reason for this to be an opaque value.

Currently I use the #ifndef trick to get the TAG_ macros.

Paul