Commit e75ced4c authored by thomas's avatar thomas
Browse files

no message


git-svn-id: https://svn.grrrr.org/ext/trunk@411 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 1f5dcd4b
...@@ -97,8 +97,10 @@ Version history: ...@@ -97,8 +97,10 @@ Version history:
0.4.1: 0.4.1:
- fixed crash issue in flext_dsp when there are NO signal inlets or outlets defined - fixed crash issue in flext_dsp when there are NO signal inlets or outlets defined
(this is possibly only a problem for the signal2 tutorial example) (this is possibly only a problem for the signal2 tutorial example)
- added flext::GetType(t_atom &) - added flext::GetType(t_atom &), flext::ZeroMem
- added flext::ZeroMem - put the clock_delay for the message queue inside the thread-locked area
- BACKWARDS-INCOMPATIBLE CHANGE: flext_base::m_methodmain and flext_base::m_method_ have got
const modifiers.... these virtual methods are used rarely (for example in py/pyext)
0.4.0: 0.4.0:
- the use of the const keyword is enforced (e.g. the preferred type for symbols is now "const t_symbol *") - the use of the const keyword is enforced (e.g. the preferred type for symbols is now "const t_symbol *")
......
...@@ -87,12 +87,12 @@ public: ...@@ -87,12 +87,12 @@ public:
\return True if a handler was found and called \return True if a handler was found and called
\todo Once, there should be a const modifier for argv \todo Once, there should be a const modifier for argv
*/ */
virtual bool m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv); virtual bool m_methodmain(int inlet,const t_symbol *s,int argc,const t_atom *argv);
/*! \brief Called for every unhandled message (by m_methodmain) /*! \brief Called for every unhandled message (by m_methodmain)
\todo Once, there should be a const modifier for argv \todo Once, there should be a const modifier for argv
*/ */
virtual bool m_method_(int inlet,const t_symbol *s,int argc,t_atom *argv); virtual bool m_method_(int inlet,const t_symbol *s,int argc,const t_atom *argv);
//! @} FLEXT_C_VIRTUAL //! @} FLEXT_C_VIRTUAL
......
...@@ -509,7 +509,7 @@ void flext_base::m_help() ...@@ -509,7 +509,7 @@ void flext_base::m_help()
/*! \brief All the message processing /*! \brief All the message processing
The messages of all the inlets go here and are promoted to the registered callback functions The messages of all the inlets go here and are promoted to the registered callback functions
*/ */
bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv) bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,const t_atom *argv)
{ {
static bool trap = false; static bool trap = false;
bool ret = false; bool ret = false;
...@@ -524,10 +524,10 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv) ...@@ -524,10 +524,10 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv)
LOG4("found method tag %s: inlet=%i, symbol=%s, argc=%i",m->tag->s_name,inlet,s->s_name,argc); LOG4("found method tag %s: inlet=%i, symbol=%s, argc=%i",m->tag->s_name,inlet,s->s_name,argc);
if(m->argc == 1 && m->args[0] == a_list) { if(m->argc == 1 && m->args[0] == a_list) {
ret = ((methfun_V)m->fun)(this,argc,argv); ret = ((methfun_V)m->fun)(this,argc,const_cast<t_atom *>(argv));
} }
else if(m->argc == 1 && m->args[0] == a_any) { else if(m->argc == 1 && m->args[0] == a_any) {
ret = ((methfun_A)m->fun)(this,s,argc,argv); ret = ((methfun_A)m->fun)(this,s,argc,const_cast<t_atom *>(argv));
} }
else if(argc == m->argc) { else if(argc == m->argc) {
int ix; int ix;
...@@ -594,7 +594,7 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv) ...@@ -594,7 +594,7 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv)
// any // any
LOG4("found any method for %s: inlet=%i, symbol=%s, argc=%i",m->tag->s_name,inlet,s->s_name,argc); LOG4("found any method for %s: inlet=%i, symbol=%s, argc=%i",m->tag->s_name,inlet,s->s_name,argc);
ret = ((methfun_A)m->fun)(this,s,argc,argv); ret = ((methfun_A)m->fun)(this,s,argc,const_cast<t_atom *>(argv));
} }
} }
...@@ -675,7 +675,7 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv) ...@@ -675,7 +675,7 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv)
return ret; // true if appropriate handler was found and called return ret; // true if appropriate handler was found and called
} }
bool flext_base::m_method_(int inlet,const t_symbol *s,int argc,t_atom *argv) bool flext_base::m_method_(int inlet,const t_symbol *s,int argc,const t_atom *argv)
{ {
//#ifdef _DEBUG //#ifdef _DEBUG
post("%s: message unhandled - inlet:%i args:%i symbol:%s",thisName(),inlet,argc,s?s->s_name:""); post("%s: message unhandled - inlet:%i args:%i symbol:%s",thisName(),inlet,argc,s?s->s_name:"");
......
...@@ -156,9 +156,6 @@ void flext_base::Queue(qmsg *m) ...@@ -156,9 +156,6 @@ void flext_base::Queue(qmsg *m)
if(qtail) qtail->nxt = m; if(qtail) qtail->nxt = m;
else qhead = m; else qhead = m;
qtail = m; qtail = m;
#ifdef FLEXT_THREADS
qmutex.Unlock();
#endif
#ifdef PD #ifdef PD
clock_delay(qclk,0); clock_delay(qclk,0);
#elif defined(MAXMSP) #elif defined(MAXMSP)
...@@ -166,6 +163,9 @@ void flext_base::Queue(qmsg *m) ...@@ -166,6 +163,9 @@ void flext_base::Queue(qmsg *m)
#else #else
#error "To implement!" #error "To implement!"
#endif #endif
#ifdef FLEXT_THREADS
qmutex.Unlock();
#endif
} }
void flext_base::ToQueueBang(outlet *o) const void flext_base::ToQueueBang(outlet *o) const
......
Supports Markdown
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