[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to correctly define using scm_define ?
From: |
Tano Fotang |
Subject: |
how to correctly define using scm_define ? |
Date: |
Tue, 02 Nov 2004 16:54:48 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20040728 |
I am trying to define some variable (libguile 1.7.1) but it's going the
wrong way all day:
SCM tt;
void set_tt(SCM proc){ //called often to set tt
assert(scm_is_true(scm_procedure_p((proc)))); //passes
scm_define(tt, proc);
assert(scm_is_true(scm_procedure_p((tt)))); //fails
}
So I decide to skip scm_define and just do:
tt = proc;
That appears okay until the following line is seen some minutes later:
scm_apply_0(tt, args)
then this error is displayed:
wrong-type-arg: [apply] Wrong type argument in position 1: #<freed cell
0x406303b0; GC missed a reference>
I'd be glad for any pointers on how to proceed.
/fotang
- how to correctly define using scm_define ?,
Tano Fotang <=