[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GC ??
From: |
dv . praveen |
Subject: |
GC ?? |
Date: |
Tue, 2 Dec 2003 17:29:44 +0530 |
hi,
I am using guile 1.6.0. and programming in C.
I am using scm_boot_guile and scm_shell in the function
I pass to scm_boot_guile. All the SCM objects that are
created, say using 'scm_make_string', 'scm_make_vector'
etc, and assigned to globals don't seem to exist after
call to scm_shell is made. My code looks something like
this..
#include <libguile.h>
static SCM vector;
static SCM
retVec()
{
return vector;
}
static void
CreateVector()
{
vector = scm_make_vector(SCM_MAKINUM(2), SCM_EOL);
}
static void innerMain(void *closure,
int argc,
char **argv)
{
CreateVector();
scm_c_define_gsubr("retVec", 0, 0, 0, retVec);
scm_shell(argc, argv);
}
main(int argc, char **argv)
{
scm_boot_guile(argc,argv,innerMain,0);
}
After I built the program, and call (retVec) on the
'guile>' promt, it doesn't return vector
'#(() ())' Then I tried to create guardian and protect
'vector' but it doesn't work. As far as I understood
GC, it should not free any global variables. Am I missing
something in my understanding? Any suggestion on how to
make this work would be helpful.
BTW, after I create guardian I used gh_call1 to call the
guardian procedure.(depreciated, but I could not figure out
how to call using SCM interface)
regards,
Praveen
- GC ??,
dv . praveen <=
- Re: GC ??, Andreas Rottmann, 2003/12/03
- Re: GC ??, dv . praveen, 2003/12/03