rdoc with c extensions

S

snacktime

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
 
E

Eric Hodel

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,048
Members
48,769
Latest member
Clifft

Latest Threads

Top