From 599cf52a50dc1e17360c355ce2ef01be5a90dfbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Wed, 18 Jun 2003 13:16:23 +0000 Subject: [PATCH] Moved #defines for SWIG_malloc, SWIG_ConvertPtr et al. from %runtime block into runtime file. This fixes the build of the runtime library. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4912 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Lib/guile/guile_gh.swg | 16 ++++------------ SWIG/Lib/guile/guile_gh_run.swg | 11 +++++++++++ SWIG/Lib/guile/guile_scm.swg | 16 ++++------------ 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/SWIG/Lib/guile/guile_gh.swg b/SWIG/Lib/guile/guile_gh.swg index ddc394c19..4d95f4b76 100644 --- a/SWIG/Lib/guile/guile_gh.swg +++ b/SWIG/Lib/guile/guile_gh.swg @@ -1,15 +1,7 @@ -%runtime %{ -#define SWIG_malloc(size) \ - SCM_MUST_MALLOC(size) -#define SWIG_free(mem) \ - scm_must_free(mem) -#define SWIG_ConvertPtr(s, result, type, flags) \ - SWIG_Guile_GetPtr(s, result, type) -#define SWIG_MustGetPtr(s, type, argnum, flags) \ - SWIG_Guile_MustGetPtr(s, type, argnum, FUNC_NAME) -#define SWIG_NewPointerObj(ptr, type, owner) \ - SWIG_Guile_MakePtr((void*)ptr, type) -%} +/* -*- c -*- + This SWIG interface file is processed if the Guile module is run + with gh_ flavor. +*/ %runtime "guile_gh_run.swg" %include "guile.i" diff --git a/SWIG/Lib/guile/guile_gh_run.swg b/SWIG/Lib/guile/guile_gh_run.swg index 29a217468..a7ae2af4a 100644 --- a/SWIG/Lib/guile/guile_gh_run.swg +++ b/SWIG/Lib/guile/guile_gh_run.swg @@ -15,6 +15,17 @@ extern "C" { #endif +#define SWIG_malloc(size) \ + SCM_MUST_MALLOC(size) +#define SWIG_free(mem) \ + scm_must_free(mem) +#define SWIG_ConvertPtr(s, result, type, flags) \ + SWIG_Guile_GetPtr(s, result, type) +#define SWIG_MustGetPtr(s, type, argnum, flags) \ + SWIG_Guile_MustGetPtr(s, type, argnum, FUNC_NAME) +#define SWIG_NewPointerObj(ptr, type, owner) \ + SWIG_Guile_MakePtr((void*)ptr, type) + #if defined(SWIG_NOINCLUDE) # define SWIGSTATIC #elif defined(SWIG_GLOBAL) diff --git a/SWIG/Lib/guile/guile_scm.swg b/SWIG/Lib/guile/guile_scm.swg index 8b37ccc12..245370ccb 100644 --- a/SWIG/Lib/guile/guile_scm.swg +++ b/SWIG/Lib/guile/guile_scm.swg @@ -1,15 +1,7 @@ -%runtime %{ -#define SWIG_malloc(size) \ - SCM_MUST_MALLOC(size) -#define SWIG_free(mem) \ - scm_must_free(mem) -#define SWIG_ConvertPtr(s, result, type, flags) \ - SWIG_Guile_ConvertPtr(s, result, type, flags) -#define SWIG_MustGetPtr(s, type, argnum, flags) \ - SWIG_Guile_MustGetPtr(s, type, argnum, flags, FUNC_NAME) -#define SWIG_NewPointerObj(ptr, type, owner) \ - SWIG_Guile_NewPointerObj((void*)ptr, type, owner) -%} +/* -*- c -*- + This SWIG interface file is processed if the Guile module is run + with SCM_ flavor. +*/ %runtime "common.swg" %runtime "guile_scm_run.swg"