From: Ken Bloom Date: 2006-07-13T07:40:13+09:00 Subject: rdoc and constructs like DL::Import's extern I'm wrapping a C library (link-grammar, to be specific) in an object-oriented ruby interface using DL::Import. The library is a very well designed object-oriented C library, which is to say it uses very consistent naming and calling conventions. Thus, the library lends itself very well to automation when wrapping the the library in object-oriented code. I use DL::Import to create a CLib module containing all of the functions in the C library. (Actually, I've wrapped extern in another function which automatically defines certain things like safe string handling where necessary, and automatic assignment of free functions) In the various classes which call the functions in CLib, there was also a lot to be gained by writing an extern-like function to automate the work. For example, in the ParseOptions class, class ParseOptions def initialize @optsptr=CLib.parse_options_create() end attr_reader :optsptr class <