Hi,
Dan McMahill [EMAIL PROTECTED] writes:
I can do something like
SCM scm_myfn(SCM flags)
{
myfn (scm_num2int (flags, SCM_ARG1, myfn));
return SCM_BOOLEAN_T;
}
but I'm not sure of the best way to define the flags in scheme. Or
maybe this is not the scheme way.
What you
On Tue, 2006-05-02 at 08:25 -0400, Dan McMahill wrote:
Hello,
I'm sure this is a very basic question about passing or-able flags to
a function. In C I might do something like:
...snip...
You can make the flags available to scheme as numbers, and then the
Scheme users can use Guile's
Ludovic Courtès wrote:
Hi,
Dan McMahill [EMAIL PROTECTED] writes:
I can do something like
SCM scm_myfn(SCM flags)
{
myfn (scm_num2int (flags, SCM_ARG1, myfn));
return SCM_BOOLEAN_T;
}
but I'm not sure of the best way to define the flags in scheme. Or
maybe this is not the scheme way.
Ludovic Courtès wrote:
Hi,
Dan McMahill [EMAIL PROTECTED] writes:
Thanks for the reply. Could you show a short example of what the
scheme function call might look like?
Are you meaning
(foo (list 'flag1 'flag2 'someotherflag))
Rather, it would look like:
(foo 'flag1 'flag2
Hi,
I am trying to add a new number class, export generic
methods from a module and import them into another one. If I
ignore the GOOPS tutorial and read only the reference, it is
my understanting that I should do:
;;
;; exporting.scm
Hello,
I use the MIT MPB package on a machine running guile
1.6 and Debian-Linux 3.1r0a. Apparently, I generate a memory link while
executing a do loop (although I have not tracked the memory usage yet). When I
run the loop, the process is aborted before the end of the iteration.
Dan McMahill [EMAIL PROTECTED] writes:
SCM scm_myfn(SCM flags)
{
myfn (scm_num2int (flags, SCM_ARG1, myfn));
Various things in the guile core are done like that, stuff like O_RDWR
for `open'. The list of symbols Ludovic described is done in the
guile-gtk interface and works nicely too.
If
Stephane Chatigny [EMAIL PROTECTED] writes:
(although I have not tracked the memory usage yet).
You'll probably have to use one of the various malloc debugging
packages to find who has allocated the memory that's never freed, to
see who's supposed to be responsible for that.
[EMAIL PROTECTED] wrote:
I do not understand why the first solution does not work;
I've tried different combinations of functions but there is
something I am missing.
Damn... it seems to work if I do not EXPORT the generic
methods.
--
Marco Maggi