From a111449e8c150e4baf63bfc82dcf464314d2d7ad Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 22 Nov 2004 16:47:49 +0000 Subject: [PATCH] Prabhu's fixes git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6767 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/python/pyrun.swg | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index 7155e54bd..545206639 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -44,6 +44,9 @@ extern "C" { * Create a new pointer string * ----------------------------------------------------------------------------- */ +#ifndef SWIG_BUFFER_SIZE +#define SWIG_BUFFER_SIZE 1024 +#endif #if defined(SWIG_COBJECT_TYPES) #if !defined(SWIG_COBJECT_PYTHON) @@ -51,10 +54,6 @@ extern "C" { * Implements a simple Swig Object type, and use it instead of PyCObject * ----------------------------------------------------------------------------- */ -#ifndef SWIG_BUFFER_SIZE -#define SWIG_BUFFER_SIZE 1024 -#endif - typedef struct { PyObject_HEAD void *ptr; @@ -285,7 +284,7 @@ PySwigPacked_str(PySwigPacked *v) if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ return PyString_FromFormat("%s%s", result, v->desc); } else { - return PyString_FromFormat("%s%s", v->desc); + return PyString_FromFormat("%s", v->desc); } }