ts wrote:

>>>>>>"J" == Jan Arne Petersen <japetersen / web.de> writes:
>>>>>>
> 
> J> What means the FL_EXIVAR flag (defined in ruby.h)?
> 
>  Why do you want to know this ? :-)


We are implementing an Ruby-Interpreter for Java.


>  All objects can have instance variables, but if you look at ruby.h you'll
>  see that only 2 struct (ROBJECT, RCLASS) has a field "st_table *iv_tbl"
>  (this is where are stored the instance variables).
> 
>  This mean that when you define an instance variable, there are 2 cases
> 
>   * the type of the object is T_OBJECT, T_CLASS or T_MODULE : the instance
>     variable is stored in iv_tbl of the object
> 
>   * for the other types, ruby will create for each object a struct st_table
>     in the global variable generic_iv_tbl, to store the instance
>     variable. Then the object is marked with the flag FL_EXIVAR.


Thank you. I understand this now.


>     It's a little more complex, because for some object (like Qnil, Qtrue,
>     ...) ruby can't put this flag. In this case the variable
>     special_generic_ivar is set.


Ok.


Jan Arne Petersen