diff options
Diffstat (limited to 'externals/grill/flext/source/flutil.cpp')
-rw-r--r-- | externals/grill/flext/source/flutil.cpp | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/externals/grill/flext/source/flutil.cpp b/externals/grill/flext/source/flutil.cpp index 09c75377..be9329cd 100644 --- a/externals/grill/flext/source/flutil.cpp +++ b/externals/grill/flext/source/flutil.cpp @@ -15,27 +15,44 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "flext.h" #include <string.h> +#if FLEXT_OS == FLEXT_OS_WIN +#include <windows.h> +#endif + void flext::CopyMem(void *dst,const void *src,int bytes) { +#if FLEXT_OS == FLEXT_OS_WIN + MoveMemory(dst,src,bytes); +#elif FLEXT_OS == FLEXT_OS_MAC + BlockMoveData(src,dst,bytes); +#else memcpy(dst,src,bytes); +#endif } void flext::ZeroMem(void *dst,int bytes) { +#if FLEXT_OS == FLEXT_OS_WIN + ZeroMemory(dst,bytes); +#elif FLEXT_OS == FLEXT_OS_MAC + BlockZero(dst,bytes); +#else memset(dst,0,bytes); +#endif } -bool flext::Forward(const t_symbol *recv,int argc,const t_atom *argv) +bool flext::Forward(const t_symbol *recv,const t_symbol *s,int argc,const t_atom *argv) { - t_class **cl = (t_class **)recv->s_thing; + void *cl = recv->s_thing; if(!cl) return false; #if FLEXT_SYS == FLEXT_SYS_PD - pd_forwardmess(cl,argc,(t_atom *)argv); + pd_typedmess((t_class **)cl,(t_symbol *)s,argc,(t_atom *)argv); +#elif FLEXT_SYS == FLEXT_SYS_MAX + typedmess(recv->s_thing,(t_symbol *)s,argc,(t_atom *)argv); #else - #error Not implemented +#error Not implemented #endif - - return true; + return true; } |