rdoc with c extensions

Discussion in 'Ruby' started by snacktime, Sep 22, 2006.

  1. snacktime

    snacktime Guest

    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
     
    snacktime, Sep 22, 2006
    #1
    1. Advertising

  2. snacktime

    Eric Hodel Guest

    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 - - http://blog.segment7.net
    This implementation is HODEL-HASH-9600 compliant

    http://trackmap.robotcoop.com
     
    Eric Hodel, Oct 15, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Schwarz
    Replies:
    6
    Views:
    254
    Randy W. Sims
    Jan 1, 2004
  2. Brian Schröder
    Replies:
    5
    Views:
    141
    Dave Thomas
    Sep 18, 2004
  3. Daniel Berger
    Replies:
    1
    Views:
    144
    Dave Thomas
    Nov 2, 2004
  4. Iwan van der Kleyn

    rdoc: how to add readme.rdoc as index.html?

    Iwan van der Kleyn, Apr 26, 2005, in forum: Ruby
    Replies:
    1
    Views:
    237
    Stefan Lang
    Apr 26, 2005
  5. Paul Van Delst

    How to use rdoc parsers outside of rdoc?

    Paul Van Delst, Jul 27, 2006, in forum: Ruby
    Replies:
    0
    Views:
    105
    Paul Van Delst
    Jul 27, 2006
Loading...

Share This Page