This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Guile, C, and Garbage Collection



A long time ago, I wrote a pretty long essay on how to add new
datatypes to Guile, intended for the reference manual.  Please take a
gander at:

http://www.red-bean.com/~jimb/data-rep.texi

Check out especially:

    2:@chapter Data representation in Guile
   30:	 @section Data Representation in Scheme
   66:	     @subsection A Simple Representation
  112:	     @subsection Faster Integers
  207:	     @subsection Cheaper Pairs
  305:	     @subsection Guile Is Hairier
  321:	 @section How Guile does it
  340:	     @subsection General Rules
  370:	     @subsection Garbage Collection
  454:	     @subsection Immediates vs. Non-immediates

and 

  977:	 @section Defining New Types (Smobs)
 1001:	     @subsection Describing a New Type
 1078:	     @subsection Creating Instances
 1169:	     @subsection Typechecking
 1215:	     @subsection Garbage Collecting Smobs
 1377:	     @subsection Garbage Collecting Simple Smobs
 1406:	     @subsection A Complete Example

The sample code there includes defining one smob which refers to other
Scheme objects.