aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2004-08-11 04:04:25 +0000
committerThomas Grill <xovo@users.sourceforge.net>2004-08-11 04:04:25 +0000
commit0112dbebebb521254d2935fb4980a16bce97d32f (patch)
treeefffb6c7f92dcfaa38acfd7dd990ee8f25c6850c /externals/grill/flext/source
parente1828edbfd94e93e2728bdfaf8b13913bb2e3502 (diff)
""
svn path=/trunk/; revision=1937
Diffstat (limited to 'externals/grill/flext/source')
-rw-r--r--externals/grill/flext/source/flbase.cpp9
-rw-r--r--externals/grill/flext/source/flmap.h5
-rw-r--r--externals/grill/flext/source/flstdc.h8
-rw-r--r--externals/grill/flext/source/flsupport.cpp8
4 files changed, 23 insertions, 7 deletions
diff --git a/externals/grill/flext/source/flbase.cpp b/externals/grill/flext/source/flbase.cpp
index 04bad89f..12e13fdf 100644
--- a/externals/grill/flext/source/flbase.cpp
+++ b/externals/grill/flext/source/flbase.cpp
@@ -2,7 +2,7 @@
flext - C++ layer for Max/MSP and pd (pure data) externals
-Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
+Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.
@@ -135,7 +135,12 @@ bool flext_obj::GetParamSym(t_atom &dst,const t_symbol *sym,t_canvas *c)
#if FLEXT_SYS == FLEXT_SYS_PD
// this declaration is missing in m_pd.h (0.37-0 and -1)
-extern "C" void canvas_getargs(int *argcp, t_atom **argvp);
+// but it is there in 0.37-2 (but how to tell which micro-version?)
+extern "C"
+#ifdef _MSC_VER
+__declspec(dllimport)
+#endif
+void canvas_getargs(int *argcp, t_atom **argvp);
#endif
diff --git a/externals/grill/flext/source/flmap.h b/externals/grill/flext/source/flmap.h
index e93b5466..c20b5ade 100644
--- a/externals/grill/flext/source/flmap.h
+++ b/externals/grill/flext/source/flmap.h
@@ -48,9 +48,10 @@ public:
iterator() {}
#if defined(_MSC_VER) && (_MSC_VER < 0x1300)
// with the MSVC6 STL implementation iterators can't be initialized...
- iterator(AnyMap::iterator &it) { static_cast<AnyMap::iterator &>(*this) = it; }
+ iterator(AnyMap::iterator it) { static_cast<AnyMap::iterator &>(*this) = it; }
#else
- iterator(AnyMap::iterator &it): AnyMap::iterator(it) {}
+ // note: &it doesn't work for gcc (i don't know why it doesn't...)
+ iterator(AnyMap::iterator it): AnyMap::iterator(it) {}
#endif
inline K &key() const { return *(K *)&((*this)->first); }
diff --git a/externals/grill/flext/source/flstdc.h b/externals/grill/flext/source/flstdc.h
index 92ea3fe8..5f503f1f 100644
--- a/externals/grill/flext/source/flstdc.h
+++ b/externals/grill/flext/source/flstdc.h
@@ -126,10 +126,12 @@ typedef t_int t_flint;
typedef t_symbol *t_symtype;
typedef t_object *t_thing;
-#if FLEXT_OS == FLEXT_OS_WIN
-typedef void *t_qelem; // qelem not defined in Windows SDK
-#else
+// for the following to work for Max for OSX you should have the latest SDK
+#if FLEXT_OS == FLEXT_OS_MAC && !defined(MAC_VERSION)
+// Max for OS9 SDK
typedef qelem t_qelem;
+#else
+typedef void *t_qelem;
#endif
typedef method t_method;
diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp
index abec1994..8aa12fb0 100644
--- a/externals/grill/flext/source/flsupport.cpp
+++ b/externals/grill/flext/source/flsupport.cpp
@@ -161,6 +161,8 @@ void *flext_root::operator new(size_t bytes)
#if FLEXT_SYS == FLEXT_SYS_JMAX
blk = (char *)::fts_malloc(bytes);
+#elif defined(FLEXT_USECMEM)
+ blk = (char *)::malloc(bytes);
#else
blk = (char *)::getbytes(bytes);
#endif
@@ -194,6 +196,8 @@ void flext_root::operator delete(void *blk)
#if FLEXT_SYS == FLEXT_SYS_JMAX
::fts_free(ori);
+#elif defined(FLEXT_USECMEM)
+ ::free(ori);
#else
::freebytes(ori,bytes);
#endif
@@ -222,6 +226,8 @@ void *flext_root::NewAligned(size_t bytes,int bitalign)
#if FLEXT_SYS == FLEXT_SYS_JMAX
blk = (char *)::fts_malloc(bytes);
+#elif defined(FLEXT_USECMEM)
+ blk = (char *)::malloc(bytes);
#else
blk = (char *)::getbytes(bytes);
#endif
@@ -256,6 +262,8 @@ void flext_root::FreeAligned(void *blk)
#if FLEXT_SYS == FLEXT_SYS_JMAX
::fts_free(ori);
+#elif defined(FLEXT_USECMEM)
+ ::free(ori);
#else
::freebytes(ori,bytes);
#endif