Commit e1d55de9 authored by thomas's avatar thomas
Browse files

no message


git-svn-id: https://svn.grrrr.org/ext/trunk@366 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 58deb167
No preview for this file type
......@@ -118,13 +118,6 @@ bool flext_base::SetAttrib(const t_symbol *tag,int argc,const t_atom *argv)
}
else ok = false;
break;
case a_bool:
if(argc == 1 && CanbeBool(argv[0])) {
any.bt = GetABool(argv[0]);
((methfun_1)a->sfun)(this,any);
}
else ok = false;
break;
case a_symbol:
if(argc == 1 && IsSymbol(argv[0])) {
any.st = GetSymbol(argv[0]);
......@@ -176,12 +169,6 @@ bool flext_base::GetAttrib(const t_symbol *tag,int argc,const t_atom *argv)
SetInt(la[0],any.it);
break;
}
case a_bool: {
((methfun_1)a->gfun)(this,any);
la(1);
SetInt(la[0],any.bt);
break;
}
case a_symbol: {
((methfun_1)a->gfun)(this,any);
la(1);
......
......@@ -301,7 +301,7 @@ public:
enum metharg {
a_null = 0,
a_float,a_int,a_bool,
a_float,a_int,
a_symbol,a_pointer,
a_list,a_any,
a_LIST,a_ANY
......@@ -509,7 +509,7 @@ protected:
struct xlet {
enum type {
tp_none = 0,
tp_float,tp_int,tp_bool,tp_sym,tp_list,tp_any,
tp_float,tp_int,tp_sym,tp_list,tp_any,
tp_LIST,tp_ANY, // use AtomList and AtomAnything
tp_sig
};
......@@ -528,7 +528,6 @@ protected:
void AddAttrib(const char *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(attr,a_float,(methfun)get,(methfun)set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(attr,a_int,(methfun)get,(methfun)set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,bool &),bool (*set)(flext_base *,bool &)) { AddAttrib(attr,a_bool,(methfun)get,(methfun)set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(attr,a_symbol,(methfun)get,(methfun)set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,t_symbol *&),bool (*set)(flext_base *,t_symbol *&)) { AddAttrib(attr,a_symbol,(methfun)get,(methfun)set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(attr,a_LIST,(methfun)get,(methfun)set); }
......@@ -617,7 +616,6 @@ private:
union t_any {
float ft;
int it;
bool bt;
t_symbol *st;
#ifdef PD
t_gpointer *pt;
......
......@@ -884,9 +884,9 @@ FLEXT_CALLSET_(SFUN,float)
FLEXT_CALLSET_(SFUN,int)
//! Declare a set function for a boolean attribute
#define FLEXT_CALLSET_B(SFUN) \
\
FLEXT_CALLSET_(SFUN,bool)
#define FLEXT_CALLSET_B(FUN) \
static bool FLEXT_SET_PRE(FUN)(flext_base *c,int &arg) \
{ bool b = arg != 0; FLEXT_CAST<thisType *>(c)->FUN(b); return true; }
//! Declare a set function for an enum attribute
#define FLEXT_CALLSET_E(SFUN,TP) \
......@@ -920,9 +920,9 @@ FLEXT_CALLGET_(GFUN,float)
FLEXT_CALLGET_(GFUN,int)
//! Declare a get function for a boolean attribute
#define FLEXT_CALLGET_B(GFUN) \
\
FLEXT_CALLGET_(GFUN,bool)
#define FLEXT_CALLGET_B(FUN) \
static bool FLEXT_GET_PRE(FUN)(flext_base *c,int &arg) \
{ bool b; FLEXT_CAST<thisType *>(c)->FUN(b); arg = b?1:0; return true; }
//! Declare a get function for an enum attribute
#define FLEXT_CALLGET_E(GFUN,TP) \
......@@ -1000,8 +1000,8 @@ FLEXT_ATTRSET_(VAR,t_symptr)
//! Declare an implicite set function for a boolean attribute
#define FLEXT_ATTRSET_B(VAR) \
\
FLEXT_ATTRSET_(VAR,bool)
static bool FLEXT_SET_PRE(VAR)(flext_base *c,int &arg) \
{ FLEXT_CAST<thisType *>(c)->VAR = arg != 0; return true; }
//! Declare an implicite set function for an enum attribute
#define FLEXT_ATTRSET_E(VAR,TP) \
......@@ -1036,8 +1036,8 @@ FLEXT_ATTRGET_(VAR,t_symptr)
//! Declare an implicite get function for a boolean attribute
#define FLEXT_ATTRGET_B(VAR) \
\
FLEXT_ATTRGET_(VAR,bool)
static bool FLEXT_GET_PRE(VAR)(flext_base *c,int &arg) \
{ arg = FLEXT_CAST<thisType *>(c)->VAR?1:0; return true; }
//! Declare an implicite get function for an enum attribute
#define FLEXT_ATTRGET_E(VAR,TP) \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment