[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Getting source location information
From: |
Ludovic Courtès |
Subject: |
Getting source location information |
Date: |
Wed, 30 Nov 2005 15:44:40 +0100 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
Bruce Korb <address@hidden> writes:
> Because the file is mostly *NOT* scheme.
I did say that you could use "Scheme constructs", "be it from Scheme
o[r] C code". In other words, you can either write `(read)' in a piece
of Scheme code, or call `scm_read ()' from your C code: both are
strictly equivalent (well, almost).
The point is: do not rewrite what already exists because *this* is hard
to maintain.
Actually, what you want is `primitive-load' + `read' (which handles
piggy-backing of source location information as I said). It is true,
however, that `primitive-load' (or, rather, `open-input-file') is not
guaranteed to use `mmap ()' the way you do it currently[*]. So if you
do want to make sure that the input file is `mmap'd the way you like,
then you may want to write your own variant of `primitive-load' (see
`libguile/load.c').
In any case, I can hardly imagine how Guile itself could be more helpful
than this. ;-)
Thanks,
Ludovic.
[*] Actually, Guile currently does not use `mmap ()' at all. Perhaps
file ports should be revised to take advantage of this where
available.
- I don't want to maintain this, Bruce Korb, 2005/11/27
- I don't want to maintain this, Bruce Korb, 2005/11/28
- Re: I don't want to maintain this, Ludovic Courtès, 2005/11/29
- Re: I don't want to maintain this, Bruce Korb, 2005/11/29
- Re: I don't want to maintain this, Ludovic Courtès, 2005/11/30
- Re: I don't want to maintain this, Bruce Korb, 2005/11/30
- Re: I don't want to maintain this, Ludovic Courtès, 2005/11/30
- Re: I don't want to maintain this, Bruce Korb, 2005/11/30
- Getting source location information,
Ludovic Courtès <=
- Re: Getting source location information, Bruce Korb, 2005/11/30
- Re: Getting source location information, Ludovic Courtès, 2005/11/30
- Re: Getting source location information, Bruce Korb, 2005/11/30
- Re: Getting source location information, Ludovic Courtès, 2005/11/30
- Re: Getting source location information, Rob Browning, 2005/11/30
- Re: Getting source location information, Bruce Korb, 2005/11/30
- Re: Getting source location information, Rob Browning, 2005/11/30
- Re: Getting source location information, Bruce Korb, 2005/11/30
- Re: Getting source location information, Han-Wen Nienhuys, 2005/11/30
Re: I don't want to maintain this, Kevin Ryde, 2005/11/30