From: Paul Brannan Date: 2001-10-26T03:00:06+09:00 Subject: [ruby-talk:23325] Re: () vs (...) in header files On Fri, 26 Oct 2001, ts wrote: > Well, it was never defined which functions can be called from an > extension. Perhaps these functions must first be defined. I don't know if > matz is really interested in doing this (this is fastidious, not really > interesting, ...) Hmm. The Pickaxe book does try to specify which functions and macros would be useful for extensions. It does, however, mention functions like rb_ary_new2, which have the problem that has been brought up on the list before; if Array is redefined, then the old array gets instantiated, not the new one. So some functions are okay to be called, and others are okay, but are less so. Certainly functions that are used for defining Ruby methods should be callable. Any exception-handling functions and iterating functions should be callable. rb_thread_select is very useful. There are some functions that are not available, but it would be nice if they were, though I can't remember what these are off the top of my head. Generally, I get the feeling that anything in ruby.h should be okay to use in an extension, but sometimes I need to use stuff from intern.h (which gives me this funny feeling in my stomach...). Interesting question though; Ruby doesn't seem to have a well-defined line between which functions are for use in an extension and which are for use in the interpreter only. Paul