[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: snarfing docstrings in c extensions
From: |
Mike Gran |
Subject: |
Re: snarfing docstrings in c extensions |
Date: |
Sat, 7 Apr 2018 19:27:27 -0700 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
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