[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: RDOC: several related modules in several C files

Victor 'Zverok' Shepelev

3/16/2007 4:11:00 PM

From: list-bounce@example.com [mailto:list-bounce@example.com] On Behalf Of
Max Lapshin
Sent: Friday, March 16, 2007 6:00 PM
>
>
>> as in my sources there are many other problems for RDoc, like shortcut
>> macro
>
>These shortcuts seems to be one of the greatest problem. The only way to
>bypass them is to use some sort of C->xml compilers in RDoc (to make it
>very complicated), or to create some sort of explicit binding C
>functions to ruby methods
>

Aha. I've ended with having something like

//real definition
DEF_METHOD(method, c_method, 1);

#ifdef MAKIN_RDOC_HAPPY // MAKIN_RDOC_HAPPY isn't defined :)

//fake definition
rb_define_method(rb_cMyClass, "method", c_method, 1);

#endif

My DEF_METHOD definitons (even if they are many) looks much more DRY (I have
to write only differing parts of each definition).

BTW, I've found even \t (Tab) symbol in sources confuses RDoc

V.


1 Answer

???? ??????

3/16/2007 4:16:00 PM

0


> BTW, I've found even \t (Tab) symbol in sources confuses RDoc
>

Yes, RDoc seems to be a rather confusable thing =)
I think, that there is no use in trying to make a perfect RDoc for C
extensions, so You hack is OK. You can also make the following:
preprecess sources before RDoc-ing them. Thus, all You macroses will be
expanded to rb_define_method

--
Posted via http://www.ruby-....