mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
A few updates to the guile hacking document
This commit is contained in:
parent
d69d1f6a32
commit
de2a1e9e67
@ -33,10 +33,6 @@ either end. Guile supports a superset of R4RS (the Scheme standard).
|
|||||||
For initial experimentation, you can use Guile as an interactive Scheme
|
For initial experimentation, you can use Guile as an interactive Scheme
|
||||||
shell to play around with the system.
|
shell to play around with the system.
|
||||||
|
|
||||||
SLIB is a library for Scheme implementations (including guile)
|
|
||||||
that implements a large collection of useful data structures
|
|
||||||
and algorithms.
|
|
||||||
|
|
||||||
FIXME: Starting gnucash as a guile shell. ..
|
FIXME: Starting gnucash as a guile shell. ..
|
||||||
|
|
||||||
While the Guile documentation (in info format) explains
|
While the Guile documentation (in info format) explains
|
||||||
@ -50,18 +46,6 @@ FAQs, online copies of the Scheme standard (which is actually
|
|||||||
quite readable and useful), and pointers to web tutorials
|
quite readable and useful), and pointers to web tutorials
|
||||||
and other resources.
|
and other resources.
|
||||||
|
|
||||||
g-wrap
|
|
||||||
------
|
|
||||||
|
|
||||||
Note: gwrap has been replaced by swig and dropped completely in
|
|
||||||
SVN-trunk on 2006-10-20 and for gnucash-2.2.0.
|
|
||||||
|
|
||||||
(Old info: g-wrap is the tool used to automate the wrapping of C
|
|
||||||
functions to make them callable from the guile code. g-wrap is
|
|
||||||
now maintained by Rob Browning and is available from
|
|
||||||
ftp://ftp.gnucash.org/pub/g-wrap )
|
|
||||||
|
|
||||||
|
|
||||||
Garbage collection:
|
Garbage collection:
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
@ -97,14 +81,10 @@ use it.
|
|||||||
The moral of this story is that if you need to have the C side ferret
|
The moral of this story is that if you need to have the C side ferret
|
||||||
away a scheme item for later, you must also keep at least one
|
away a scheme item for later, you must also keep at least one
|
||||||
reference to that item on the guile side until the C side is finished
|
reference to that item on the guile side until the C side is finished
|
||||||
with it. I believe that the guile people have recently come up with a
|
with it.
|
||||||
nice general solution to this problem, but until that's generally
|
|
||||||
available, there are a number of ways you can solve this.
|
|
||||||
|
|
||||||
If nothing else, you can just create a global hash on the guile side,
|
|
||||||
place the object in question in the hash table, and then have the
|
|
||||||
C-side delete that item from the hash when it's finished with it.
|
|
||||||
|
|
||||||
|
You can protect an object using scm_gc_protect_object. When you're done
|
||||||
|
with it you can release it using scm_gc_unprotect_object.
|
||||||
|
|
||||||
Guile Interrupts:
|
Guile Interrupts:
|
||||||
-----------------
|
-----------------
|
||||||
|
Loading…
Reference in New Issue
Block a user