swig/Lib/guile/guiledec.swg
Thien-Thi Nguyen a7a9b355b9 Use the `SWIG_NOINCLUDE' preprocessor symbol to indicate that
SWIG runtime functions are imported from a different module, as
it is done in other language modules.  This primarily affects
the preprocessor symbol `SWIGSTATIC'.

(SWIG_init): Make this function globally visible only in simple
linkage (the user should rename the function by a #define in
this case).  In other linkages, this func is static.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@413 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-04-12 11:27:47 +00:00

107 lines
3.2 KiB
C

/* -*- c -*-
* -----------------------------------------------------------------------
* swig_lib/guile/guiledec.swg
* Copyright (C) 2000 Matthias Koeppe
*
* Guile configuration file -- declarations
* ----------------------------------------------------------------------- */
#define SWIGGUILE
#include "guile/gh.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
#if defined(SWIG_NOINCLUDE)
# define SWIGSTATIC
#elif defined(SWIG_GLOBAL)
# define SWIGSTATIC
#else
# define SWIGSTATIC static
#endif
#define GH_NOT_PASSED SCM_UNDEFINED
#define GH_UNSPECIFIED SCM_UNSPECIFIED
#define GUILE_APPEND_RESULT(object) \
if (gswig_result == GH_UNSPECIFIED) \
gswig_result = object; \
else { \
if (!gh_pair_p(gswig_result)) \
gswig_result = gh_list(gswig_result, object, GH_NOT_PASSED); \
else \
gswig_result = gh_append2(gswig_result, \
gh_list(object, GH_NOT_PASSED)); \
}
static char *
GSWIG_scm2str (SCM s)
{
int len = scm_string_length (s);
return gh_scm2newstr (s, &len);
}
typedef struct SwigPtrType SwigPtrType;
/* Register a new type-mapping with the type-checker. origtype is the
original datatype and newtype is an equivalent type. cast is optional
pointer to a function to cast pointer values between types (this is
typically used to cast pointers from derived classes to base classes in
C++). */
SWIGSTATIC
void SWIG_RegisterMapping (char *origtype, char *newtype,
void *(*cast)(void *));
/* Register SWIG smobs with Guile */
SWIGSTATIC
void SWIG_Guile_Init();
/* Initialization function for this SWIG module; actually renamed by a
#define */
/* extern void SWIG_init(); */
/* OBSOLESCENT functions (from swigptr.swg, still used unless -with-smobs) */
/* Makes a pointer string from a pointer and typestring. The result is
returned in buffer which is assumed to hold enough space for the result. */
SWIGSTATIC
void SWIG_MakePtr(char *_c, const void *_ptr, char *type);
/* Gets a pointer value from a string. If there is a type-mismatch, returns a
character string to the received type. On success, returns NULL. */
SWIGSTATIC
char *SWIG_GetPtr(char *_c, void **ptr, char *_t);
/* TRANSITIONAL functions (used if -with-smobs) */
/* Makes a smob from a pointer and typestring. */
SWIGSTATIC
SCM SWIG_Guile_MakePtr_Str(void *ptr, char *typestring,
char *prettytypestring);
/* Gets a pointer value from a string. If there is a type-mismatch, returns
nonzero; on success, return 0. */
SWIGSTATIC
int SWIG_Guile_GetPtr_Str(SCM s, void **result, char *typestring);
/* UPCOMING functions (not yet used) */
SWIGSTATIC
int SWIG_Guile_GetPtr(SCM s, void **result, SwigPtrType *type);
SWIGSTATIC
SCM SWIG_Guile_MakePtr(void *ptr, SwigPtrType *type);
#ifdef __cplusplus
}
#endif
/* guiledec.swg ends here */