From: Sean O'Dell Date: 2004-06-08T23:32:28+09:00 Subject: Re: Interfaces and semantics (or, how to hashpipe a duck) On Monday 07 June 2004 21:07, nobu.nokada@softhome.net wrote: > Hi, > > At Tue, 8 Jun 2004 12:36:28 +0900, > > Sean O'Dell wrote in [ruby-talk:102735]: > > I'm writing a little lib in C to do this right now. I'm mostly done. I > > am fighting with the Ruby C API's class variable access, otherwise I'd be > > finished. > > See variable.c: > > VALUE rb_cvar_defined _((VALUE, ID)); > #define RB_CVAR_SET_4ARGS 1 > void rb_cvar_set _((VALUE, ID, VALUE, int)); > VALUE rb_cvar_get _((VALUE, ID)); > void rb_cv_set _((VALUE, const char*, VALUE)); > VALUE rb_cv_get _((VALUE, const char*)); > void rb_define_class_variable _((VALUE, const char*, VALUE)); > VALUE rb_mod_class_variables _((VALUE)); > VALUE rb_mod_remove_cvar _((VALUE, VALUE)); I have the docs. What's wrong is, in an instance method, I can't seem to access the class variable from the C API. In Ruby, instance methods can see the instance variables just fine, so I know that part of my code is working with them right. Sean O'Dell