[Pyrex] Re: Globals and wrapping Eiffel

Godefroid Chapelle gotcha at bubblenet.be
Wed Nov 19 15:31:18 CET 2003


Hi Simon and Pyrex list,

I just got subscribed because I wanted to ask a question for SmartEiffel
  integration.

Nice coincidence that you, Simon, are working on that as well.


Simon Frost wrote:

> Dear Pyrex list,
> 
> I'm trying to wrap some C code emitted from compiling Eiffel code using 
> the SmartEiffel compiler. All functions called have to have a 
> pointer-to-void eiffel_root_object, which is generated upon an 
> initialization function initialize_eiffel_runtime(argc,argv).

With the work I did till now, I did not find out that the
initialize_eiffel_runtime had to be called more than once, ie before
using any pointer to objects. But I could be wrong !

This was the question I wanted to ask : is there a way in Pyrex to
declare some code that must run once when the extension module is imported ?


<snip>


> However, all objects must have access to the eiffel_root_object in order 
> to run, and I don't want to have a separate Eiffel runtime for each 
> class. 

I do not understand why you want to keep the eiffel_root_object in your
classes.

One global pointer (in the pyrex module) seems ok to me!
> Thanks
> Simon
> 
-- 
Godefroid Chapelle (aka __gotcha)                http://bubblenet.be










More information about the Pyrex mailing list