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 via email to