Scheme_Object * scheme_make_prim_w_arity(Scheme_Prim *prim, char *name,
short mina, short maxa)
Creates a primitive procedure value, given the C function pointer prim. The form of prim is defined by:
Scheme_Object *Scheme_Prim(int argc, Scheme_Object *argv[]);
The value mina should be the minimum number of arguments that must be supplied to the procedure. The value maxa should be the maximum number of arguments that can be suplied to the procedure, or -1 if the procedure can take any number of arguments. The values are used for automatically checking arguments before the primitive is invoked, and for the Scheme arity procedure.
Scheme_Object * scheme_make_folding_prim(Scheme_Prim *prim, char *name,
short mina, short maxa, short folding)
Like scheme_make_prim_w_arity, but if folding is non-zero, an application of the procedure to constant values can be folded to a constant. For example, +, zero?, and string-length are folding primitives, but display, cons, and string-ref are not. (Constant strings are currently mutable in MzScheme.)
Scheme_Object * scheme_make_prim(Scheme_Prim *prim)
Same as scheme_make_prim_w_arity, but the arity (0, -1) and the name ``UNKNOWN'' is assumed. This function is provided for backward compatibility only.
Scheme_Object * scheme_make_noneternal_prim_w_arity( Scheme_Prim *prim, char *name, short mina, short maxa)
Creates a primitive procedure value that can be garbage-collected.
Scheme_Object * scheme_make_noneternal_prim(Scheme_Prim *prim)
Creates a primitive procedure value that can be garbage-collected. This function is provided for backward compatibility only.
Scheme_Object * scheme_make_closed_prim_w_arity(Scheme_Closed_Prim *prim, void *data,
char *name, short mina, short maxa)
Creates a primitive procedure value; when the C function prim is invoked, data is passed as the first parameter. The form of prim is defined by:
Scheme_Object *Scheme_Closed_Prim(void *data, int argc, Scheme_Object *argv[]);
Scheme_Object * scheme_make_closed_prim(Scheme_Closed_Prim *prim, void *data)
Creates a closed primitive procedure value. This function is provided for backward compatibility only.