From 1439a8f7c94fffab4bbafaf49f3dd6ba3526080c Mon Sep 17 00:00:00 2001 From: John Lenz Date: Sun, 2 May 2004 22:20:53 +0000 Subject: [PATCH] Updated chicken documentation git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5899 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Doc/Manual/Chicken.html | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/Doc/Manual/Chicken.html b/Doc/Manual/Chicken.html index 9ff33699a..6ba9f0662 100644 --- a/Doc/Manual/Chicken.html +++ b/Doc/Manual/Chicken.html @@ -65,7 +65,7 @@ CHICKEN support was introduced to SWIG in version 1.3.18. SWIG relies on some recent additions to CHICKEN, which are only present in releases of CHICKEN with version number - greater than or equal to 1.0. + greater than or equal to 1.40.

CHICKEN can be downloaded from http://www.call-with-current-continuation.org/chicken.html @@ -495,8 +495,8 @@ CHICKEN_HOME=/usr/local/share/chicken For pointer types, SWIG uses CHICKEN tagged pointers. A tagged pointer is an ordinary CHICKEN pointer with an - extra slot for an arbitrary Scheme object. With SWIG - CHICKEN, this Scheme object is a reference to a type-info + extra slot for a void *. With SWIG + CHICKEN, this void * is a pointer to a type-info structure. So each pointer used as input or output from the SWIG-generated CHICKEN wrappers will have type information attached to it. This will let the wrappers @@ -506,22 +506,20 @@ CHICKEN_HOME=/usr/local/share/chicken

To construct a Scheme object from a C pointer, the wrapper code - calls the function swig_new_pointer_obj(), passing - stack allocation space of size SWIG_ALLOCSZ_POINTER (see - definition in Lib/chicken/chickenrun.swg and also - C_alloc() in the CHICKEN documentation) and a - pointer to a struct representing the pointer type. + calls the function + SWIG_NewPointerObj(void *ptr, swig_type_info *type, int owner), + The function that calls SWIG_NewPointerObj must have a variable declared + C_word *known_space = C_alloc(C_SIZEOF_SWIG_POINTER); + It is ok to call SWIG_NewPointerObj more than once, + just make sure known_space has enough space for all the created pointers.

To get the pointer represented by a CHICKEN tagged pointer, the - wrapper code calls the function swig_convert_ptr(), + wrapper code calls the function + SWIG_ConvertPtr(C_word s, void **result, swig_type_info *type, int flags), passing a pointer to a struct representing the expected pointer - type. If the Scheme object passed was not a tagged pointer - representing a compatible pointer, a non-zero value is returned. + type.

-

Warning: The Chicken typechecking code seems - to be broken (Bug #782468), so that type errors may not be - reported.

25.8 Unsupported features

@@ -530,4 +528,4 @@ CHICKEN_HOME=/usr/local/share/chicken
  • No exception handling.
  • - \ No newline at end of file +