From: David Fang <fang@csl.cornell.edu>
To: <dsmich@adelphia.net>
Cc: guile-user@gnu.org
Subject: Re: modules and C,C++
Date: Thu, 22 Mar 2007 19:19:57 -0500 (EST) [thread overview]
Message-ID: <20070322190908.R48706-100000@shannon.csl.cornell.edu> (raw)
In-Reply-To: <99336.1174522676123.JavaMail.root@web30>
> ....
> > What do I need to do to export my scm_c_define_gsubr'd
> > functions to the module? Must I wrap them into another module in C, and
> > use-module it? (Would I expect the same problem with mixing
> > load-extensions with modules?)
>
> You will want to read about scm_c_export() and scm_c_call_with_current_module in http://www.gnu.org/software/guile/manual/html_node/Dynamic-Linking-and-Compiled-Code-Modules.html
> and http://www.gnu.org/software/guile/manual/html_node/Accessing-Modules-from-C.html
Thanks for the pointer. What I ended up doing was wrapping the
scm_c_define_gsubr initialization routine (along with scm_c_export's)
inside a scm_c_define_module("foo bar-primitives", ...) to distinguish the
primitives from the non-primitives in a pure scheme module that calls the
primitives. This way I don't end up throwing things into the default
(guile-user) top module. Works quite well.
Fang
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
prev parent reply other threads:[~2007-03-23 0:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-22 0:17 modules and C dsmich
2007-03-23 0:19 ` David Fang [this message]
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=20070322190908.R48706-100000@shannon.csl.cornell.edu \
--to=fang@csl.cornell.edu \
--cc=dsmich@adelphia.net \
--cc=guile-user@gnu.org \
/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).