Update of /cvsroot/pure-data/externals/grill/flext/source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12239/source
Modified Files:
flclass.h fldefs_methadd.h flmeth.cpp flmsg.cpp flprefix.h
Log Message:
PD: possibility to create DSP objects without main DSP inlet (use FLEXT_DSP0_NEW or similar)
switching OSX builds to -bundle to avoid symbol clashes for different flext versions
small fix for branch hints
Index: flmsg.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flmsg.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** flmsg.cpp 31 Oct 2006 00:30:57 -0000 1.22
--- flmsg.cpp 22 Feb 2007 00:15:15 -0000 1.23
***************
*** 132,136 ****
// if nothing found try any inlet
! if(methhead && (lst = methhead->FindList(s,-1)) != NULL && TryMethTag(lst,s,argc,argv)) return true;
if((lst = clmethhead->FindList(s,-1)) != NULL && TryMethTag(lst,s,argc,argv)) return true;
--- 132,136 ----
// if nothing found try any inlet
! if(UNLIKELY(methhead) && (lst = methhead->FindList(s,-1)) != NULL && TryMethTag(lst,s,argc,argv)) return true;
if((lst = clmethhead->FindList(s,-1)) != NULL && TryMethTag(lst,s,argc,argv)) return true;
***************
*** 147,151 ****
// if nothing found try any inlet
! if(methhead && (lst = methhead->FindList(sym_anything,-1)) != NULL && TryMethAny(lst,s,argc,argv)) return true;
if((lst = clmethhead->FindList(sym_anything,-1)) != NULL && TryMethAny(lst,s,argc,argv)) return true;
--- 147,151 ----
// if nothing found try any inlet
! if(UNLIKELY(methhead) && (lst = methhead->FindList(sym_anything,-1)) != NULL && TryMethAny(lst,s,argc,argv)) return true;
if((lst = clmethhead->FindList(sym_anything,-1)) != NULL && TryMethAny(lst,s,argc,argv)) return true;
***************
*** 163,170 ****
curtag = s;
! // post("methodmain inlet:%i args:%i symbol:%s",inlet,argc,s?GetString(s):"");
try {
ret = FindMeth(inlet,s,argc,argv);
if(ret) goto end;
--- 163,175 ----
curtag = s;
! #ifdef FLEXT_LOG_MSGS
! post("methodmain inlet:%i args:%i symbol:%s",inlet,argc,s?GetString(s):"");
! #endif
try {
ret = FindMeth(inlet,s,argc,argv);
+ #ifdef FLEXT_LOG_MSGS
+ if(ret) post("found %s message in %s,%i",GetString(s),__FILE__,__LINE__);
+ #endif
if(ret) goto end;
***************
*** 226,229 ****
--- 231,237 ----
SetSymbol(at,s);
ret = FindMeth(inlet,sym_list,1,&at);
+ #ifdef FLEXT_LOG_MSGS
+ if(ret) post("found %s message in %s,%i",GetString(sym_list),__FILE__,__LINE__);
+ #endif
if(ret) goto end;
}
Index: flprefix.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flprefix.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** flprefix.h 31 Oct 2006 00:30:57 -0000 1.38
--- flprefix.h 22 Feb 2007 00:15:15 -0000 1.39
***************
*** 408,423 ****
// std namespace
#ifdef __MWERKS__
! #define STD std
#else
! #define STD
#endif
// branching hints
#ifdef __GNUC__
! #define LIKELY(expression) (__builtin_expect(!!(expression), 1))
! #define UNLIKELY(expression) (__builtin_expect(!!(expression), 0))
#else
! #define LIKELY(expression) (expression)
! #define UNLIKELY(expression) (expression)
#endif
--- 408,431 ----
// std namespace
#ifdef __MWERKS__
! # define STD std
#else
! # define STD
#endif
// branching hints
#ifdef __GNUC__
! # ifndef LIKELY
! # define LIKELY(expression) (__builtin_expect(!!(expression), 1))
! # endif
! # ifndef UNLIKELY
! # define UNLIKELY(expression) (__builtin_expect(!!(expression), 0))
! # endif
#else
! # ifndef LIKELY
! # define LIKELY(expression) (expression)
! # endif
! # ifndef UNLIKELY
! # define UNLIKELY(expression) (expression)
! # endif
#endif
Index: fldefs_methadd.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/fldefs_methadd.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fldefs_methadd.h 26 Jan 2005 05:01:45 -0000 1.4
--- fldefs_methadd.h 22 Feb 2007 00:15:15 -0000 1.5
***************
*** 24,34 ****
*/
! //! Add a method handler for bang
#define FLEXT_CADDBANG(CL,IX,M_FUN) \
\
! AddMethod(CL,IX,flext::sym_bang,FLEXT_CALL_PRE(M_FUN))
//! Add a handler for a method with either no, list or anything arguments
#define FLEXT_CADDMETHOD(CL,IX,M_FUN) \
AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN))
--- 24,37 ----
*/
! /*! Add a method handler for bang
! \note This is for compatibility - better use the method below
! */
#define FLEXT_CADDBANG(CL,IX,M_FUN) \
\
! AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN))
//! Add a handler for a method with either no, list or anything arguments
#define FLEXT_CADDMETHOD(CL,IX,M_FUN) \
+ \
AddMethod(CL,IX,FLEXT_CALL_PRE(M_FUN))
Index: flclass.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flclass.h,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** flclass.h 31 Oct 2006 00:30:57 -0000 1.71
--- flclass.h 22 Feb 2007 00:15:15 -0000 1.72
***************
*** 867,870 ****
--- 867,871 ----
static ItemCont *ClMeths(t_classid c);
+ //! \brief This is the central function to add message handlers. It is used by all other AddMethod incarnations.
static void AddMethod(ItemCont *ma,int inlet,const t_symbol *tag,methfun fun,metharg tp,...);
Index: flmeth.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flmeth.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** flmeth.cpp 15 May 2006 23:03:52 -0000 1.22
--- flmeth.cpp 22 Feb 2007 00:15:15 -0000 1.23
***************
*** 40,43 ****
--- 40,47 ----
void flext_base::AddMethod(ItemCont *ma,int inlet,const t_symbol *tag,methfun fun,metharg tp,...)
{
+ #ifdef FLEXT_LOG_MSGS
+ post("addmethod %i:%s",inlet,GetString(tag));
+ #endif
+
va_list marker;