Fixed [ 651355 ] Syntax error with cstring.i
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4264 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
dd2cedbd36
commit
b8000dcfef
1 changed files with 2 additions and 2 deletions
|
|
@ -121,7 +121,7 @@
|
|||
%typemap(in) TYPEMAP {
|
||||
char *t = PyString_AsString($input);
|
||||
int n = PyString_Size($input);
|
||||
if (PyErr_Occurred()) return SWIG_fail;
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
$1 = ($1_ltype) t;
|
||||
#if #__VA_ARGS__ == ""
|
||||
#if __cplusplus
|
||||
|
|
@ -166,7 +166,7 @@
|
|||
%define %cstring_output_maxsize(TYPEMAP, SIZE)
|
||||
%typemap(in) (TYPEMAP, SIZE) {
|
||||
$2 = PyInt_AsLong($input);
|
||||
if (PyErr_Occurred()) return SWIG_fail;
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
#ifdef __cplusplus
|
||||
$1 = ($1_ltype) new char[$2+1];
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue