fixes to compile OSS
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7681 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8708bb507e
commit
43f36d52ad
3 changed files with 8 additions and 11 deletions
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#if defined(__cplusplus)
|
||||
# define SWIG_new(Type...) (new Type)
|
||||
# define SWIG_new_copy(val,Type...) (new Type(val))
|
||||
# define SWIG_new_copy(val,Type...) (new Type(SWIG_static_cast(val, const Type&)))
|
||||
# define SWIG_new_array(size,Type...) (new Type[size])
|
||||
# define SWIG_new_copy_array(ptr,size,Type...) SWIG_reinterpret_cast(memcpy(SWIG_new_array(size,Type), ptr, sizeof(Type)*(size)), Type*)
|
||||
# define SWIG_delete(cptr) delete cptr
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@
|
|||
if (SWIG_ConvertPtr($input,&argp,$&descriptor, 0) != SWIG_OK) {
|
||||
SWIG_dout_fail(SWIG_TypeError,"$type");
|
||||
}
|
||||
$result = *(SWIG_reinterpret_cast(argp, $<ype);
|
||||
$result = *(SWIG_reinterpret_cast(argp, $<ype));
|
||||
}
|
||||
%typemap(directorout,noblock=1) SWIGTYPE *(void *argp), SWIGTYPE [](void *argp) {
|
||||
if (SWIG_ConvertPtr($input, &argp, $descriptor, 0) != SWIG_OK) {
|
||||
|
|
|
|||
|
|
@ -89,28 +89,25 @@
|
|||
int res = asval_meth($input, &val);
|
||||
if (res != SWIG_OK) {
|
||||
SWIG_dout_fail(res, "$type");
|
||||
} else {
|
||||
*$result = SWIG_static_cast(val, $type);
|
||||
}
|
||||
}
|
||||
*$result = SWIG_static_cast(val, $type);
|
||||
}
|
||||
%typemap(directorout,noblock=1,fragment=frag) Type {
|
||||
Type val;
|
||||
int res = asval_meth($input, &val);
|
||||
if (res != SWIG_OK) {
|
||||
SWIG_dout_fail(res, "$type");
|
||||
} else {
|
||||
$result = SWIG_static_cast(val,$type);
|
||||
}
|
||||
$result = SWIG_static_cast(val,$type);
|
||||
}
|
||||
%typemap(directorout,noblock=1,fragment=frag,warning=SWIG_WARN_TYPEMAP_THREAD_UNSAFE) const Type& {
|
||||
Type val;
|
||||
int res = asval_meth($input, &val);
|
||||
if (res != SWIG_OK) {
|
||||
SWIG_dout_fail(res, "$type");
|
||||
} else {
|
||||
static $basetype temp = SWIG_static_cast(val, $basetype);
|
||||
$result = &temp;
|
||||
}
|
||||
}
|
||||
static $basetype temp = SWIG_static_cast(val, $basetype);
|
||||
$result = &temp;
|
||||
}
|
||||
%typemap(directorout,fragment=frag) Type &DIRECTOROUT = Type
|
||||
%enddef
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue