X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=interfaces%2Fch%2Fc%2Fhandmade%2Fcxcore%2FcvSetMemoryManager_chdl.c;fp=interfaces%2Fch%2Fc%2Fhandmade%2Fcxcore%2FcvSetMemoryManager_chdl.c;h=0000000000000000000000000000000000000000;hb=e4c14cdbdf2fe805e79cd96ded236f57e7b89060;hp=99a4fc246611fc8e65c34b5d2e7ea2f2e2ffb522;hpb=454138ff8a20f6edb9b65a910101403d8b520643;p=opencv diff --git a/interfaces/ch/c/handmade/cxcore/cvSetMemoryManager_chdl.c b/interfaces/ch/c/handmade/cxcore/cvSetMemoryManager_chdl.c deleted file mode 100644 index 99a4fc2..0000000 --- a/interfaces/ch/c/handmade/cxcore/cvSetMemoryManager_chdl.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (c) 2001-2002 by SoftIntegration, Inc. All Rights Reserved */ -#include -#include - -typedef void* (CV_CDECL *allocFunc)(size_t, void*); -typedef int (CV_CDECL *freeFunc)(void*, void*); - -static ChInterp_t interp; -static void* allocFunc_funarg(size_t Arg1, void* Arg2); -static void* setallocFunc_funptr; - -static int freeFunc_funarg(void* Arg1, void* Arg2); -static void* setfreeFunc_funptr; - - -EXPORTCH void cvSetMemoryManager_chdl(void *varg) { - va_list ap; - allocFunc allocFuncptr_ch, allocFuncptr_c=NULL; - freeFunc freeFuncptr_ch, freeFuncptr_c=NULL; - void *userdata = NULL; - - Ch_VaStart(interp, ap, varg); - - allocFuncptr_ch = Ch_VaArg(interp, ap, allocFunc ); - setallocFunc_funptr = (void *)allocFuncptr_ch; - if (allocFuncptr_ch != NULL) { - allocFuncptr_c = (allocFunc)allocFunc_funarg; - } - - freeFuncptr_ch = Ch_VaArg(interp, ap, freeFunc); - setfreeFunc_funptr = (void *)freeFuncptr_ch; - if (freeFuncptr_ch != NULL) { - freeFuncptr_c = (freeFunc)freeFunc_funarg; - } - - userdata = Ch_VaArg(interp, ap, void*); - - cvSetMemoryManager(allocFuncptr_c, freeFuncptr_c, userdata); - Ch_VaEnd(interp, ap); -} - -static void* allocFunc_funarg(size_t Arg1, void* Arg2) { - void* retval; - Ch_CallFuncByAddr(interp, setallocFunc_funptr, &retval, Arg1, Arg2); - return retval; -} - -static int freeFunc_funarg(void* Arg1, void* Arg2) { - int retval; - Ch_CallFuncByAddr(interp, setfreeFunc_funptr, &retval, Arg1, Arg2); - return retval; -}