aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/flext')
-rw-r--r--externals/grill/flext/changes.txt1
-rw-r--r--externals/grill/flext/source/flattr.cpp13
-rw-r--r--externals/grill/flext/source/flclass.h3
3 files changed, 11 insertions, 6 deletions
diff --git a/externals/grill/flext/changes.txt b/externals/grill/flext/changes.txt
index 4e3796b6..71164338 100644
--- a/externals/grill/flext/changes.txt
+++ b/externals/grill/flext/changes.txt
@@ -26,6 +26,7 @@ Version history:
- fixed buffer overrun problems with flext::post, flext::error... (but still to improve)
- improved handling of patcher arguments
- also initialize flext::sym_int as MakeSymbol("int") for PD (since the variable is there anyhow)
+- fixed bug with attribute dumping
0.4.5:
- added some more SIMD functions
diff --git a/externals/grill/flext/source/flattr.cpp b/externals/grill/flext/source/flattr.cpp
index 7cb3a7b9..4890e62a 100644
--- a/externals/grill/flext/source/flattr.cpp
+++ b/externals/grill/flext/source/flattr.cpp
@@ -25,10 +25,10 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#define STD
#endif
-flext_base::AttrItem::AttrItem(metharg tp,methfun f,int fl):
+flext_base::AttrItem::AttrItem(const t_symbol *t,metharg tp,methfun f,int fl):
Item(NULL),index(0),
flags(fl|afl_shown),
- argtp(tp),fun(f),
+ argtp(tp),fun(f),tag(t),
counter(NULL)
{}
@@ -50,7 +50,7 @@ void flext_base::AddAttrib(ItemCont *aa,ItemCont *ma,const char *attr,metharg tp
if(sfun) // if commented out, there will be a warning at run-time (more user-friendly)
{
- a = new AttrItem(tp,sfun,AttrItem::afl_set);
+ a = new AttrItem(asym,tp,sfun,AttrItem::afl_set);
a->index = aa->Members();
aa->Add(a,asym);
@@ -64,7 +64,7 @@ void flext_base::AddAttrib(ItemCont *aa,ItemCont *ma,const char *attr,metharg tp
if(gfun) // if commented out, there will be a warning at run-time (more user-friendly)
{
- b = new AttrItem(tp,gfun,AttrItem::afl_get);
+ b = new AttrItem(asym,tp,gfun,AttrItem::afl_get);
b->index = aa->Members();
aa->Add(b,asym);
@@ -337,11 +337,14 @@ bool flext_base::GetAttrib(const t_symbol *s,AtomList &a) const
return attr && GetAttrib(s,attr,a);
}
+//! \param tag symbol "get[attribute]"
bool flext_base::DumpAttrib(const t_symbol *tag,AttrItem *a) const
{
AtomList la;
bool ret = GetAttrib(tag,a,la);
- if(ret) ToOutAnything(GetOutAttr(),tag,la.Count(),la.Atoms());
+ if(ret) {
+ ToOutAnything(GetOutAttr(),a->tag,la.Count(),la.Atoms());
+ }
return ret;
}
diff --git a/externals/grill/flext/source/flclass.h b/externals/grill/flext/source/flclass.h
index 0102784f..f49341e1 100644
--- a/externals/grill/flext/source/flclass.h
+++ b/externals/grill/flext/source/flclass.h
@@ -677,7 +677,7 @@ protected:
public Item
{
public:
- AttrItem(metharg tp,methfun fun,int flags);
+ AttrItem(const t_symbol *tag,metharg tp,methfun fun,int flags);
enum {
afl_get = 0x01, afl_set = 0x02,
@@ -696,6 +696,7 @@ protected:
metharg argtp;
methfun fun;
AttrItem *counter;
+ const t_symbol *tag;
};
//! Represent a data value of an attribute