unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Dave Griffiths" <dave@pawfal.org>
Subject: docstrings and snarfing
Date: Thu, 13 Jul 2006 11:15:05 +0100 (BST)	[thread overview]
Message-ID: <29874.193.203.82.226.1152785705.squirrel@www.webmail.pawfal.org> (raw)

Hi all,

I want to implement docstrings for my extension functions, but for various
reasons I can't use snarfing (the array it generates has problems with C++
namespaces).

So I had a look through the macros for SCM_DEFINE to find out what it does
with the DOCSTRING argument, and got lost pretty quickly, so I tried
running the example through the C preprocessor, and it seems the docstring
is lost anyway:

 static const char s_clear_image [] = "clear-image"; SCM clear_image (SCM
image_smob)


 {

 }

 void
 init_image_type ()
 {
# 1 "clear-image.x" 1

 scm_c_define_gsubr (s_clear_image, 1, 0, 0, (SCM (*)()) clear_image); ;
# 14 "clear-image.c" 2
 }

after snarfing and cpping the example code:

#include <libguile.h>

SCM_DEFINE (clear_image, "clear-image", 1, 0, 0,
             (SCM image_smob),
             "Clear the image.")
 {
   /* C code to clear the image in image_smob... */
 }

 void
 init_image_type ()
 {
 #include "clear-image.x"
 }

Any pointers to what happens with the docstring, or how I can implement
them for my functions?

Many thanks,

dave



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


             reply	other threads:[~2006-07-13 10:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-13 10:15 Dave Griffiths [this message]
2006-07-15  1:57 ` docstrings and snarfing Kevin Ryde
  -- strict thread matches above, loose matches on Subject: below --
2006-07-15 18:21 dsmich
2006-07-15 21:19 dsmich
2006-07-16 21:48 ` dave
2006-07-18 17:14   ` Neil Jerram

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=29874.193.203.82.226.1152785705.squirrel@www.webmail.pawfal.org \
    --to=dave@pawfal.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).