fix #if __cplusplus problem

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6347 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-06 16:51:22 +00:00
commit d84772ce6f
9 changed files with 25 additions and 25 deletions

View file

@ -124,13 +124,13 @@
if (SWIG_arg_fail($argnum)) SWIG_fail;
$1 = ($1_ltype) t;
#if #__VA_ARGS__ == ""
#if __cplusplus
#ifdef __cplusplus
$1 = ($1_ltype) new char[n+1];
#else
$1 = ($1_ltype) malloc(n+1);
#endif
#else
#if __cplusplus
#ifdef __cplusplus
$1 = ($1_ltype) new char[n+1+__VA_ARGS__];
#else
$1 = ($1_ltype) malloc(n+1+__VA_ARGS__);
@ -144,7 +144,7 @@
PyObject *o;
o = PyString_FromString($1);
$result = t_output_helper($result,o);
#if __cplusplus
#ifdef __cplusplus
delete[] $1;
#else
free($1);