chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] How does Chicken know the # of arguments to a functi


From: felix winkelmann
Subject: Re: [Chicken-users] How does Chicken know the # of arguments to a function
Date: Sun, 19 Dec 2004 11:20:56 +0100

On Sat, 18 Dec 2004 13:30:02 +0000, Joel Reymont <address@hidden> wrote:
> Howdy!
> 
> How does Chicken know that number of arguments that a function takes?
> 
> SWIG creates function wrappers and registers them with Chicken but I
> can't figure out where exactly it tells Chicken the number of arguments.
> 

Every primitive Chicken function takes one argument (the first one, 
actually) that holds the number of arguments passed. Usually, Chicken
procedures have the following signature:

void procedure(C_word argc, C_word closure, C_word continuation,
C_word arg1, ...)

(where C_word is a generic data type that fits in a machine word)


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]