Subject: [clisp-list] Re: Problem with module: SUBR limited to at most 6 required argum ents

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Mon Apr 15 04:34:04 2002

Hi,

> I have noticed a bug on m$ windows, when linking to modules containing
> functions with more
> than 6 arguments.  I get the error message : Unknown 
> signature of a SUBR

It seems like a fundamental restriction in CLISP (not only MS-Windows: all). Witness pieces of lispbibl.d, spvw.d and eval.d. Don't dream of seeing this changed (bytecodes etc. probably depend on this).

# the argtype component is a uintW, while we really mean:
  typedef enum {
    subr_argtype_0_0,
    subr_argtype_1_0,
    subr_argtype_2_0,
    subr_argtype_3_0,
    subr_argtype_4_0,
    subr_argtype_5_0,
    subr_argtype_6_0,
    ....
                        switch (req_anz)
                          { case 0: return(subr_argtype_0_0);
                            case 1: return(subr_argtype_1_0);
                            case 2: return(subr_argtype_2_0);
                            case 3: return(subr_argtype_3_0);
                            case 4: return(subr_argtype_4_0);
                            case 5: return(subr_argtype_5_0);
                            case 6: return(subr_argtype_6_0);
                            default: goto illegal;

This sounds like a show-stopper.

SUBR (internal and module functions) appear less flexible in this aspect than LISP ones, or even those called via FFI. Uh. Oh.
&rest arguments maybe left as an option. Not as nice.

Regards,
	Jorg Hohle.