unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: "Mike Gran" <spk121@yahoo.com>
To: Samuel Barreto <samuel.barreto8@gmail.com>
Cc: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: snarfing docstrings in c extensions
Date: Sat, 7 Apr 2018 19:27:27 -0700	[thread overview]
Message-ID: <20180408022727.GA5638@joshua.dnsalias.com> (raw)
In-Reply-To: <m27epi6dwr.fsf@macbook-pro-de-samuel.home>

On Sat, Apr 07, 2018 at 08:59:32PM +0200, Samuel Barreto wrote:

> So I do am able to generate the info files that I want. My two problems
> are:
> 
> 1. how to use guile-snarf-docs portably ? (I have hardcoded them in my
>    Makefile for now.)

Since they don't get installed, it is hard to know the most robust method.
They are used as internal tools to Guile.

> ...

> And from a broader perspective, is it the way it is supposed to work ? I
> mean, am I doing it the right way or are other "guile-extension-writers"
> doing it otherwise ?

That is the way it is supposed to work.  But, I stopped doing it that way.
I had the same sort of problems you are having now.

Instead, I started writing scheme wrappers around my C functions. In C,
let's say I had a library with a function named %foo.  In scheme, I would
make a procedure

(define (foo x)
  "docstring"
  (%foo x))

It is a lot of wasted effort that way, but, it is easier to understand
for me.  I'm not sure I should recommend it, tho.

-Mike Gran




  reply	other threads:[~2018-04-08  2:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-07 18:59 snarfing docstrings in c extensions Samuel Barreto
2018-04-08  2:27 ` Mike Gran [this message]
2018-04-09  7:24   ` Samuel Barreto

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=20180408022727.GA5638@joshua.dnsalias.com \
    --to=spk121@yahoo.com \
    --cc=guile-user@gnu.org \
    --cc=samuel.barreto8@gmail.com \
    /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).