unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* C extensions
@ 2021-02-21  3:56 Tim Meehan
  2021-02-21  4:10 ` Nala Ginrut
  2021-02-21 16:00 ` Olivier Dion via General Guile related discussions
  0 siblings, 2 replies; 6+ messages in thread
From: Tim Meehan @ 2021-02-21  3:56 UTC (permalink / raw)
  To: guile-user

I'm trying my hand a writing C extensions.
I've done this for stuff like Matlab before, and was wondering how you do
the usual checking of the arguments that are passed in from Guile.

In the manual, 6.13.13.1 "C Support" has a few functions.
libguile/numbers.h has a bunch more ...

What I have is an extension function, sort of like the bessel function in
the tutorial:
https://www.gnu.org/software/guile/manual/html_node/A-Sample-Guile-Extension.html

What I would like to do is verify that the first argument is an inexact
number, larger than 0. How would I go about that? Perhaps some of it could
be:
SCM_REALP
scm_misc_error

Any tips?


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-21 22:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-21  3:56 C extensions Tim Meehan
2021-02-21  4:10 ` Nala Ginrut
2021-02-21 16:00 ` Olivier Dion via General Guile related discussions
2021-02-21 21:58   ` Tim Meehan
2021-02-21 22:18     ` Tim Meehan
2021-02-21 22:41     ` Olivier Dion via General Guile related discussions

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).