[lua] Fix a bug in SWIG_ALLOC_ARRAY()
improved the error messages for incorrect arguments. Changed the output of swig_type() to use the human readable form of the type, rather than the raw swig type. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9863 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d269f9cd16
commit
c3ec8fdce3
8 changed files with 58 additions and 14 deletions
|
|
@ -175,7 +175,7 @@ int SWIG_read_NAME_num_array(lua_State* L,int index,TYPE *array,int size);
|
|||
%{
|
||||
|
||||
#ifdef __cplusplus /* generic alloc/dealloc fns*/
|
||||
#define SWIG_ALLOC_ARRAY(TYPE,LEN) new (TYPE)[LEN]
|
||||
#define SWIG_ALLOC_ARRAY(TYPE,LEN) new TYPE[LEN]
|
||||
#define SWIG_FREE_ARRAY(PTR) if(PTR){delete[] PTR;}
|
||||
#else
|
||||
#define SWIG_ALLOC_ARRAY(TYPE,LEN) (TYPE *)malloc(LEN*sizeof(TYPE))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue