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
|
|
@ -121,13 +121,13 @@
|
|||
$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__);
|
||||
|
|
@ -141,7 +141,7 @@
|
|||
Tcl_Obj *o;
|
||||
o = Tcl_NewStringObj($1,-1);
|
||||
Tcl_ListObjAppendElement(interp, Tcl_GetObjResult(interp), o);
|
||||
#if __cplusplus
|
||||
#ifdef __cplusplus
|
||||
delete[] $1;
|
||||
#else
|
||||
free($1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue