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:
William S Fulton 2008-02-10 00:35:11 +00:00
commit a91e4906b5
12 changed files with 51 additions and 13 deletions

View file

@ -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;

View file

@ -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;