aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--externals/grill/flext/source/flatom_pr.cpp22
-rw-r--r--externals/grill/flext/source/flbase.h6
-rwxr-xr-xexternals/grill/flext/source/fllib.cpp8
-rwxr-xr-xexternals/grill/flext/source/flproxy.cpp18
-rw-r--r--externals/grill/flext/source/flstdc.h4
-rw-r--r--externals/grill/flext/source/flthr.cpp1
6 files changed, 30 insertions, 29 deletions
diff --git a/externals/grill/flext/source/flatom_pr.cpp b/externals/grill/flext/source/flatom_pr.cpp
index 303be710..4b939386 100644
--- a/externals/grill/flext/source/flatom_pr.cpp
+++ b/externals/grill/flext/source/flatom_pr.cpp
@@ -33,18 +33,16 @@ bool flext::PrintAtom(const t_atom &a,char *buf,size_t bufsz)
ok = STD::snprintf(buf,bufsz,"%i",GetInt(a)) > 0;
}
else if(IsSymbol(a)) {
- if(!FLEXT_ASSERT(GetSymbol(a)))
- *buf = 0;
- else {
- const char *c = GetString(a);
- size_t len = strlen(c);
- if(len < bufsz) {
- memcpy(buf,c,len); buf[len] = 0;
- ok = true;
- }
- else
- ok = false;
- }
+ FLEXT_ASSERT(IsSymbol(a));
+
+ const char *c = GetString(a);
+ size_t len = strlen(c);
+ if(len < bufsz) {
+ memcpy(buf,c,len); buf[len] = 0;
+ ok = true;
+ }
+ else
+ ok = false;
}
#if FLEXT_SYS == FLEXT_SYS_PD
#ifndef FLEXT_COMPATIBLE
diff --git a/externals/grill/flext/source/flbase.h b/externals/grill/flext/source/flbase.h
index 6b5eba51..c37036c1 100644
--- a/externals/grill/flext/source/flbase.h
+++ b/externals/grill/flext/source/flbase.h
@@ -199,12 +199,12 @@ class FLEXT_SHARE FLEXT_CLASSDEF(flext_obj):
protected:
- //! pointer to flext class definition
- flext_class *clss;
-
//! backpointer to object header
mutable flext_hdr *x_obj;
+ //! pointer to flext class definition
+ flext_class *clss;
+
// static bool process_attributes;
private:
diff --git a/externals/grill/flext/source/fllib.cpp b/externals/grill/flext/source/fllib.cpp
index 13690a24..ff70da2f 100755
--- a/externals/grill/flext/source/fllib.cpp
+++ b/externals/grill/flext/source/fllib.cpp
@@ -128,15 +128,17 @@ class flext_class:
public:
flext_class(t_class *&cl,flext_obj *(*newf)(int,t_atom *),void (*freef)(flext_hdr *));
+ t_class *const &clss;
+
flext_obj *(*newfun)(int,t_atom *);
void (*freefun)(flext_hdr *c);
- t_class *const &clss;
- flext_library *lib;
- bool dsp,attr,dist;
int argc;
int *argv;
+ flext_library *lib;
+ bool dsp,attr,dist;
+
flext_base::ItemCont meths,attrs;
};
diff --git a/externals/grill/flext/source/flproxy.cpp b/externals/grill/flext/source/flproxy.cpp
index d542fe66..08bf1352 100755
--- a/externals/grill/flext/source/flproxy.cpp
+++ b/externals/grill/flext/source/flproxy.cpp
@@ -124,20 +124,22 @@ void flext_base::cb_bang(flext_hdr *c)
void flext_base::cb_px_in ## IX(flext_hdr *c,long v) { t_atom atom; SetInt(atom,v); thisObject(c)->CbMethodHandler(IX,sym_int,1,&atom); } \
void flext_base::cb_px_ft ## IX(flext_hdr *c,double v) { t_atom atom; SetFloat(atom,v); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); }
-//void flext_base::cb_px_in ## IX(flext_hdr *c,long v) { t_atom atom; SetInt(atom,v); thisObject(c)->CbMethodHandler(IX,sym_int,1,&atom); } \
-//void flext_base::cb_px_ft ## IX(flext_hdr *c,double v) { t_atom atom; SetFloat(atom,v); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); }
-
+/*
+void flext_base::cb_px_in ## IX(flext_hdr *c,long v) { t_atom atom; SetInt(atom,v); thisObject(c)->CbMethodHandler(IX,sym_int,1,&atom); } \
+void flext_base::cb_px_ft ## IX(flext_hdr *c,double v) { t_atom atom; SetFloat(atom,v); thisObject(c)->CbMethodHandler(IX,sym_float,1,&atom); }
+*/
#define ADD_PROXYMSG(c,IX) \
addinx((method)(cb_px_in ## IX),IX); \
addftx((method)(cb_px_ft ## IX),IX)
-//add_method1(c,cb_px_in ## IX,"in" #IX,A_INT); \
-//add_method1(c,cb_px_ft ## IX,"ft" #IX,A_FLOAT)
-
-//AddMethod(c,0,flext::MakeSymbol("in" #IX),cb_px_in ## IX); \
-//AddMethod(c,0,flext::MakeSymbol("ft" #IX),cb_px_ft ## IX)
+/*
+add_method1(c,cb_px_in ## IX,"in" #IX,A_INT); \
+add_method1(c,cb_px_ft ## IX,"ft" #IX,A_FLOAT)
+AddMethod(c,0,flext::MakeSymbol("in" #IX),cb_px_in ## IX); \
+AddMethod(c,0,flext::MakeSymbol("ft" #IX),cb_px_ft ## IX)
+*/
#endif
diff --git a/externals/grill/flext/source/flstdc.h b/externals/grill/flext/source/flstdc.h
index 4d913afe..b993dd96 100644
--- a/externals/grill/flext/source/flstdc.h
+++ b/externals/grill/flext/source/flstdc.h
@@ -251,11 +251,11 @@ typedef t_symbol *t_symptr;
#ifdef FLEXT_DEBUG
#ifdef _MSC_VER
-#define FLEXT_ASSERT(b) (!(b)?_CrtDbgReport(_CRT_ASSERT,__FILE__,__LINE__,"flext",#b):1)
+#define FLEXT_ASSERT(b) do { if(!(b)) _CrtDbgReport(_CRT_ASSERT,__FILE__,__LINE__,"flext",#b); } while(false)
#define FLEXT_WARN(str) _CrtDbgReport(_CRT_WARN,__FILE__,__LINE__,"flext",NULL)
#define FLEXT_ERROR(str) _CrtDbgReport(_CRT_ERROR,__FILE__,__LINE__,"flext",NULL)
#else
-#define FLEXT_ASSERT(b) (!(b)?(error("Assertion failed: " #b " - in " __FILE__ " line %i",(int)__LINE__),0):1)
+#define FLEXT_ASSERT(b) do { if(!(b)) error("Assertion failed: " #b " - in " __FILE__ " line %i",(int)__LINE__); } while(false)
#define FLEXT_WARN(str) error("Warning: in " __FILE__ " line %i",(int)__LINE__)
#define FLEXT_ERROR(str) error("Error: in " __FILE__ " line %i",(int)__LINE__)
#endif
diff --git a/externals/grill/flext/source/flthr.cpp b/externals/grill/flext/source/flthr.cpp
index da40d240..36559997 100644
--- a/externals/grill/flext/source/flthr.cpp
+++ b/externals/grill/flext/source/flthr.cpp
@@ -352,7 +352,6 @@ bool flext_base::StopThreads()
// first search pending queue
// --------------------------
- bool found = false;
while((ti = thrpending.Pop()) != NULL)
if(ti->This() == this)
// found -> thread hasn't started -> just delete