[Top][All Lists]

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

[guile/scwm] What argument type does scm_make_hook expects?

From: P Pareit
Subject: [guile/scwm] What argument type does scm_make_hook expects?
Date: Fri, 13 Sep 2002 11:38:28 +0200
User-agent: KMail/1.4.2


I get the following error:

ERROR: In procedure make-hook:
ERROR: Wrong type argument in position ~A: ~S
Program exited with code 02.

scm_make_hook gets called like this:

SCWM_GLOBAL_HOOK(error_hook, "error-hook", 1, "...);

which expands to the following code during snarfing:

#define SCWM_GLOBAL_HOOK(var, name, args, docstring) \
SCM_VARIABLE_INIT(var, name, scm_make_hook(SCM_MAKINUM(args)))

which gets expanded by guile-snarf to the following code:

 error_hook = scm_permanent_object (scm_c_define ("error-hook", 
scm_make_hook((((SCM) ((((scm_t_signed_bits) (1)) << 2) + 2))))));;

If I step through the code, I can see the argument does not pass this
validation in the function scm_make_hook at hooks.c:

      SCM_VALIDATE_INUM_COPY (SCM_ARG1, n_args, n);

From what I understand, SCM_VALIDATE_INUM_COPY first validates that
n_args is an INUM (which I think it is as I create it with SCM_MAKINUM)
and then copy's the number to the c-type int n.

What am I missing, or doing wrong?


reply via email to

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