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:
parent
e0d84d4be9
commit
d84772ce6f
9 changed files with 25 additions and 25 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue