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
|
|
@ -12,6 +12,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -161,7 +162,9 @@ SWIG_Guile_ConvertPtr(swig_module_info *module, SCM s, void **result,
|
|||
if (type) {
|
||||
cast = SWIG_TypeCheckStruct(from, type);
|
||||
if (cast) {
|
||||
*result = SWIG_TypeCast(cast, (void *) SCM_CDR(s));
|
||||
int newmemory = 0;
|
||||
*result = SWIG_TypeCast(cast, (void *) SCM_CDR(s), &newmemory);
|
||||
assert(!newmemory); /* newmemory handling not yet implemented */
|
||||
return SWIG_OK;
|
||||
} else {
|
||||
return SWIG_ERROR;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -163,7 +164,9 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
|
|||
if (type) {
|
||||
cast = SWIG_TypeCheckStruct(from, type);
|
||||
if (cast) {
|
||||
*result = SWIG_TypeCast(cast, (void *) SCM_CELL_WORD_1(smob));
|
||||
int newmemory = 0;
|
||||
*result = SWIG_TypeCast(cast, (void *) SCM_CELL_WORD_1(smob), &newmemory);
|
||||
assert(!newmemory); /* newmemory handling not yet implemented */
|
||||
return SWIG_OK;
|
||||
} else {
|
||||
return SWIG_ERROR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue