diff options
-rwxr-xr-x | externals/grill/flext/source/fllib.cpp | 26 | ||||
-rwxr-xr-x | externals/grill/flext/source/flprefix.h | 2 | ||||
-rwxr-xr-x | externals/grill/flext/source/flsimd.cpp | 3 | ||||
-rw-r--r-- | externals/grill/flext/source/flstdc.h | 6 | ||||
-rw-r--r-- | externals/grill/flext/source/flsupport.h | 4 | ||||
-rw-r--r-- | externals/grill/flext/source/flthr.cpp | 3 |
6 files changed, 27 insertions, 17 deletions
diff --git a/externals/grill/flext/source/fllib.cpp b/externals/grill/flext/source/fllib.cpp index 242591b3..a6d95895 100755 --- a/externals/grill/flext/source/fllib.cpp +++ b/externals/grill/flext/source/fllib.cpp @@ -102,9 +102,9 @@ bool flext::chktilde(const char *objname) // this class stands for one registered object // it holds the class, type flags, constructor and destructor of the object and the creation arg types // it will never be destroyed -class libobject { +class libclass { public: - libobject(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*freef)(flext_hdr *)); + libclass(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*freef)(flext_hdr *)); flext_obj *(*newfun)(int,t_atom *); void (*freefun)(flext_hdr *c); @@ -115,7 +115,7 @@ public: int *argv; }; -libobject::libobject(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*freef)(flext_hdr *)): +libclass::libclass(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*freef)(flext_hdr *)): newfun(newf),freefun(freef), clss(cl), argc(0),argv(NULL) @@ -127,13 +127,13 @@ libobject::libobject(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*freef) class libname { public: const t_symbol *name; - libobject *obj; + libclass *obj; static void add(libname *n); - static libname *Find(const t_symbol *s,libobject *o = NULL); + static libname *Find(const t_symbol *s,libclass *o = NULL); protected: - libname(const t_symbol *n,libobject *o): name(n),obj(o),nxt(NULL) {} + libname(const t_symbol *n,libclass *o): name(n),obj(o),nxt(NULL) {} static int Hash(const t_symbol *s); int Hash() const { return Hash(name); } @@ -146,9 +146,6 @@ protected: static libname **root; }; -libname **libname::root = NULL; - - void libname::Add(libname *n) { if(nxt) nxt->Add(n); else nxt = n; } int libname::Hash(const t_symbol *s) @@ -156,7 +153,7 @@ int libname::Hash(const t_symbol *s) return flext::FoldBits(reinterpret_cast<unsigned long>(s),HASHBITS); } -libname *libname::Find(const t_symbol *s,libobject *o) +libname *libname::Find(const t_symbol *s,libclass *o) { if(!root) { root = new libname *[HASHSIZE]; @@ -181,6 +178,9 @@ libname *libname::Find(const t_symbol *s,libobject *o) return a; } +libname **libname::root = NULL; + + // for Max/MSP, the library is represented by a special object (class) registered at startup // all objects in the library are clones of that library object - they share the same class @@ -189,7 +189,7 @@ static t_class *lib_class = NULL; static const t_symbol *lib_name = NULL; flext_obj::t_classid flext_obj::thisClassId() const { return libname::Find(thisNameSym())->obj; } -t_class *flext_obj::getClass(t_classid id) { return reinterpret_cast<libobject *>(id)->clss; } +t_class *flext_obj::getClass(t_classid id) { return reinterpret_cast<libclass *>(id)->clss; } #endif void flext_obj::lib_init(const char *name,void setupfun(),bool attr) @@ -254,7 +254,7 @@ void flext_obj::obj_add(bool lib,bool dsp,bool attr,const char *idname,const cha #endif // make new dynamic object - libobject *lo = new libobject(*cl,newfun,freefun); + libclass *lo = new libclass(*cl,newfun,freefun); lo->lib = lib; lo->dsp = dsp; lo->attr = process_attributes; @@ -340,7 +340,7 @@ flext_hdr *flext_obj::obj_new(const t_symbol *s,int _argc_,t_atom *argv) if(l) { bool ok = true; t_atom args[FLEXT_MAXNEWARGS]; - libobject *lo = l->obj; + libclass *lo = l->obj; int argc = _argc_; if(lo->attr) { diff --git a/externals/grill/flext/source/flprefix.h b/externals/grill/flext/source/flprefix.h index 6c2e2999..67046319 100755 --- a/externals/grill/flext/source/flprefix.h +++ b/externals/grill/flext/source/flprefix.h @@ -84,7 +84,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #endif #endif -#if defined(_DEBUG) +#if defined(_DEBUG) && !defined(FLEXT_DEBUG) #define FLEXT_DEBUG #endif diff --git a/externals/grill/flext/source/flsimd.cpp b/externals/grill/flext/source/flsimd.cpp index 756f28c7..f5db9f5e 100755 --- a/externals/grill/flext/source/flsimd.cpp +++ b/externals/grill/flext/source/flsimd.cpp @@ -34,6 +34,9 @@ static unsigned long setsimdcaps(); */ unsigned long flext::simdcaps = setsimdcaps(); +unsigned long flext::GetSIMDCapabilities() { return simdcaps; } + + #if FLEXT_CPU == FLEXT_CPU_INTEL diff --git a/externals/grill/flext/source/flstdc.h b/externals/grill/flext/source/flstdc.h index e6a75a9e..8f53bb96 100644 --- a/externals/grill/flext/source/flstdc.h +++ b/externals/grill/flext/source/flstdc.h @@ -199,7 +199,11 @@ typedef t_symbol *t_symptr; #ifdef _MSC_VER #ifdef FLEXT_SHARED - #define FLEXT_SHARE __declspec(dllexport) + #ifdef FLEXT_DLL + #define FLEXT_SHARE __declspec(dllexport) + #else + #define FLEXT_SHARE __declspec(dllimport) + #endif #else #define FLEXT_SHARE #endif diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h index 867e2859..64c19cf8 100644 --- a/externals/grill/flext/source/flsupport.h +++ b/externals/grill/flext/source/flsupport.h @@ -572,7 +572,7 @@ public: /*! \brief Get system thread id */ - static thrid_t GetSysThreadId() { return thrid; } + static thrid_t GetSysThreadId(); //! Check if current thread is the realtime system's thread static bool IsThread(thrid_t t,thrid_t ref = GetThreadId()) { @@ -940,7 +940,7 @@ public: simd_altivec = 0x10 }; - static unsigned long GetSIMDCapabilities() { return simdcaps; } + static unsigned long GetSIMDCapabilities(); //! @} FLEXT_S_SIMD diff --git a/externals/grill/flext/source/flthr.cpp b/externals/grill/flext/source/flthr.cpp index 7f9564d5..5c4a31c8 100644 --- a/externals/grill/flext/source/flthr.cpp +++ b/externals/grill/flext/source/flthr.cpp @@ -39,6 +39,9 @@ static bool thrhelpexit = false; static flext::ThrCond *thrhelpcond = NULL; +flext::thrid_t flext::GetSysThreadId() { return thrid; } + + //! Start helper thread bool flext::StartHelper() { |