snam has asked for the wisdom of the Perl Monks concerning the following question:

bool_t rpcb_gettime(timep, ...) time_t timep = NO_INIT PROTOTYPE: $;$ PREINIT: char *host = "localhost"; STRLEN n_a; CODE: if( items > 1 ) host = (char *)SvPV(ST(1), n_a); RETVAL = rpcb_gettime( host, &timep ); OUTPUT: timep RETVAL
What does PROTOTYPE do? I read the perl doc, but can't understand.:)

thx in advance

Title edit by tye

Replies are listed 'Best First'.
Re: XSUBs
by Thelonius (Priest) on May 02, 2003 at 04:31 UTC
    The prototype says that the function takes one scalar argument plus another optional scalar argument. Did you read the perlsub documentation?
Re: XSUBs
by Zaxo (Archbishop) on May 02, 2003 at 04:37 UTC

    The XS PROTOTYPE keyword gives the perl extension function &rpcb_gettime the perl prototype "$;$", a required scalar argument, and an optional one. See perlxs for the docs.

    After Compline,
    Zaxo

Re: XSUBs PROTOTYPE: ? (harmful)
by tye (Sage) on May 02, 2003 at 15:43 UTC
Re: XSUBs
by The Mad Hatter (Priest) on May 02, 2003 at 02:48 UTC
    It is, AFAIK, a labeled block. That should help you in your searching.

    Update Oops.