Add newmemory parameter for SWIG_TypeCast
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10240 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c47f473b3c
commit
a91e4906b5
12 changed files with 51 additions and 13 deletions
|
|
@ -14,6 +14,7 @@ extern "C" {
|
|||
#include <Rdefines.h>
|
||||
#include <Rversion.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define SWIGR 1
|
||||
|
||||
|
|
@ -289,7 +290,9 @@ SWIG_R_ConvertPtr(SEXP obj, void **ptr, swig_type_info *ty, int flags) {
|
|||
if (ptr) *ptr = vptr;
|
||||
} else {
|
||||
swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
|
||||
if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
|
||||
int newmemory = 0;
|
||||
if (ptr) *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
|
||||
assert(!newmemory); /* newmemory handling not yet implemented */
|
||||
}
|
||||
} else {
|
||||
if (ptr) *ptr = vptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue