Eric Hofreiter wrote:
> I'm doing some experimenting with writing C extensions, and so far it is fairly simple and intuitive.  However, there is one thing that I cannot figure out.  In ruby.h there are the native types define as T_STRING, T_FIXNUM, etc., allowing you to take an argument and see if it is a string or fixnum and act accordingly.  How would I go about testing if the argument is a user-defined type?  Is this even possible?  Thanks in advance.
> 
> 		
> ---------------------------------
>  Yahoo! FareChase - Search multiple travel sites in one click.  

CLASS_OF(obj) == my_class

where 'my_class' is a class object VALUE such as that returned by 
rb_define_class or rb_const_get (if the class is defined in Ruby).