From: P Pareit <pieter.pareit@planetinternet.be>
Subject: [guile/scwm] SCM_HOOKP changed?
Date: Sun, 15 Sep 2002 15:01:24 +0200 [thread overview]
Message-ID: <200209151501.24373.pieter.pareit@planetinternet.be> (raw)
Hey,
I have a lot of code depending on SCM_HOOKP, has SCM_HOOKP changed in any way?
I also seen it is not documented, so I guess it should not be used, is
scm_hook_p the right alternative?
The following program should show my problem:
// make-hook test program
//
#include <stdio.h>
#include <libguile.h>
#ifndef SCM_MAGIC_SNARFER
#define SCWM_GLOBAL_HOOK(var, name, args, docstring) \
SCM var
#else
#define SCWM_GLOBAL_HOOK(var, name, args, docstring) \
SCM_VARIABLE_INIT(var, name, scm_make_hook(SCM_MAKINUM(args)))
#endif
SCWM_GLOBAL_HOOK(error_hook, "error-hook", 1, "...");
void inner_main(void* closure, int argc, char** argv)
{
#ifndef SCM_MAGIC_SNARFER
#include "main.x"
#endif
if (!SCM_HOOKP(error_hook)) {
fprintf(stderr, "SCM_HOOKP(error_hook) returns false!\n");
}
if (!scm_hook_p(error_hook)) {
fprintf(stderr, "scm_hook_p(error_hook) returns false!\n");
}
}
int main(int argc, char* argv[])
{
scm_boot_guile(argc, argv, inner_main, NULL);
}
and can be compiled with the following Makefile:
test: main.o
gcc -g -o test main.c `guile-config link`
main.o: main.c main.x
gcc -g -c main.c `guile-config compile`
main.x: main.c
guile-snarf -o main.x main.c
clean:
rm -f *.o
rm -f *.x
pieter;
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user
next reply other threads:[~2002-09-15 13:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-15 13:01 P Pareit [this message]
2002-09-15 20:56 ` [guile/scwm] SCM_HOOKP changed? Thien-Thi Nguyen
2002-09-15 21:28 ` Thien-Thi Nguyen
2002-09-16 4:39 ` Thien-Thi Nguyen
2002-09-16 9:50 ` Marius Vollmer
2002-09-16 11:35 ` Thien-Thi Nguyen
2002-09-19 20:20 ` Neil Jerram
2002-09-15 23:59 ` Marius Vollmer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200209151501.24373.pieter.pareit@planetinternet.be \
--to=pieter.pareit@planetinternet.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).