[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
docstrings and snarfing
From: |
Dave Griffiths |
Subject: |
docstrings and snarfing |
Date: |
Thu, 13 Jul 2006 11:15:05 +0100 (BST) |
User-agent: |
SquirrelMail/1.4.6 |
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
- docstrings and snarfing,
Dave Griffiths <=