Am 30.07.2005 um 03:58 schrieb Stephen Deasey:


[ccall [type int] Ns_ConnLocationAppend [type Ns_Conn] [arg *connPtr]
[type Ns_DString] [arg dest]]

A C-call always has a name, always returns something (even if it's
just void), all args are typed and named, etc., and a lot of that can
be inferred from position and so on.  But in the above,  the doc
writer must redundantly specify [type Ns_Conn] [arg *connPtr].

Couldn't the macro ccall just handle a lot of this transparently?
Something like:

[ccall int Ns_ConnLocationAppend {
    {Ns_Conn *connPtr}
    {Ns_DString *dest}
} {
    Describe me here...
}]


Of course it could. This is how I did it in the first place.
But, I'm still not sure and will have to investigate this,
but it appears to me that other parts of the engine (TOC and Index
generators) can take advantage of those [type] declarations.
If this is not true, then there is absolutely no reason why
not to code like that. I made the [ccall] resemble the [call]
but there is no reason why one could/should not make it like:

ccall int Ns_ConnLocationAppend {{Ns_Conn *connPtr} {Ns_DString *dest}}

I will put this into and give another round.

Zoran

Reply via email to