[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

rdoc with c extensions

snacktime

9/22/2006 7:32:00 PM

I'm trying to figure out the best way to have docs for a c extension
generated when a gem is installed. Ideally I'd like to document the
methods in modname.rb, but I can't because if I define the methods in
modname.rb they will override the c functions. If I document the c
source, which is what I'm doing now, I'm not sure how to make my gem
automatically generate the rdoc from the c source. Also, rdoc doesn't
doesn't pick up the parameter names in a c function, it just calls
them p1,p2,p3,etc..

Chris

1 Answer

Eric Hodel

10/15/2006 5:07:00 AM

0

On Sep 22, 2006, at 12:32 PM, snacktime wrote:

> If I document the c source, which is what I'm doing now, I'm not
> sure how to make my gem
> automatically generate the rdoc from the c source.

Include the .c file in the RDoc file list and it will get scanned for
RDoc.

> Also, rdoc doesn't doesn't pick up the parameter names in a c
> function, it just calls
> them p1,p2,p3,etc..

Use :call-seq:, see array.c in ruby for an example.

--
Eric Hodel - drbrain@segment7.net - http://blog.se...
This implementation is HODEL-HASH-9600 compliant

http://trackmap.rob...