Update of /cvsroot/pure-data/externals/grill/flext/source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7123/source
Modified Files:
flqueue.cpp flsupport.cpp flsupport.h
Log Message:
new flext::CopyAtoms function
fixed dangerous spot (also memory leak) with message queuing
flext::Forward has more incarnations now
added message bundles (flext::MsgBundle)
fixes for gcc 3.3, changing FLEXT_USECMEM to FLEXT_USE_CMEMw
fixed initialization of message bundle items
Index: flqueue.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flqueue.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** flqueue.cpp 14 Dec 2005 01:51:36 -0000 1.36
--- flqueue.cpp 15 Dec 2005 23:04:06 -0000 1.37
***************
*** 50,61 ****
public:
inline bool Empty() const { return Size() == 0; }
!
! inline void Push(MsgBundle *m)
! {
! if(m) {
! Put(m);
! Trigger();
! }
! }
};
--- 50,55 ----
public:
inline bool Empty() const { return Size() == 0; }
!
! inline void Push(MsgBundle *m); // defined after MsgBundle (gcc 3.3. won't take it otherwise...)
};
***************
*** 267,270 ****
--- 261,271 ----
};
+ inline void Queue::Push(MsgBundle *m)
+ {
+ if(m) {
+ Put(m);
+ Trigger();
+ }
+ }
#if FLEXT_QMODE == 2
Index: flsupport.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsupport.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** flsupport.cpp 12 Dec 2005 00:18:21 -0000 1.56
--- flsupport.cpp 15 Dec 2005 23:04:06 -0000 1.57
***************
*** 107,111 ****
#define LARGEALLOC 32000
! #ifndef FLEXT_USECMEM
#ifdef FLEXT_DEBUGMEM
--- 107,111 ----
#define LARGEALLOC 32000
! #ifndef FLEXT_USE_CMEM
#ifdef FLEXT_DEBUGMEM
***************
*** 132,136 ****
SYSLOCK();
! #if defined(FLEXT_USECMEM)
blk = (char *)::malloc(bytes);
#else
--- 132,136 ----
SYSLOCK();
! #if defined(FLEXT_USE_CMEM)
blk = (char *)::malloc(bytes);
#else
***************
*** 176,180 ****
SYSLOCK();
! #if defined(FLEXT_USECMEM)
::free(ori);
#else
--- 176,180 ----
SYSLOCK();
! #if defined(FLEXT_USE_CMEM)
::free(ori);
#else
***************
*** 218,222 ****
SYSLOCK();
! #if defined(FLEXT_USECMEM)
blk = (char *)::malloc(bytes);
#else
--- 218,222 ----
SYSLOCK();
! #if defined(FLEXT_USE_CMEM)
blk = (char *)::malloc(bytes);
#else
***************
*** 252,256 ****
SYSLOCK();
! #if defined(FLEXT_USECMEM)
::free(ori);
#else
--- 252,256 ----
SYSLOCK();
! #if defined(FLEXT_USE_CMEM)
::free(ori);
#else
Index: flsupport.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsupport.h,v
retrieving revision 1.102
retrieving revision 1.103
diff -C2 -d -r1.102 -r1.103
*** flsupport.h 12 Dec 2005 00:18:21 -0000 1.102
--- flsupport.h 15 Dec 2005 23:04:06 -0000 1.103
***************
*** 48,56 ****
#ifdef FLEXT_NOGLOBALNEW
! #error FLEXT_NOGLOBALNEW is deprecated, define FLEXT_USECMEM instead
! #define FLEXT_USECMEM
#endif
! #ifdef FLEXT_USECMEM
inline void *operator new(size_t bytes) { return ::operator new(bytes); }
inline void operator delete(void *blk) { ::operator delete(blk); }
--- 48,56 ----
#ifdef FLEXT_NOGLOBALNEW
! #error FLEXT_NOGLOBALNEW is deprecated, define FLEXT_USE_CMEM instead
! #define FLEXT_USE_CMEM
#endif
! #ifdef FLEXT_USE_CMEM
inline void *operator new(size_t bytes) { return ::operator new(bytes); }
inline void operator delete(void *blk) { ::operator delete(blk); }
***************
*** 105,109 ****
};
! #ifndef FLEXT_USECMEM
/************************************************************************/
// MFC doesn't like global overloading of allocators
--- 105,109 ----
};
! #ifndef FLEXT_USE_CMEM
/************************************************************************/
// MFC doesn't like global overloading of allocators
***************
*** 126,130 ****
#endif
! #endif // FLEXT_USECMEM
/************************************************************************/
--- 126,130 ----
#endif
! #endif // FLEXT_USE_CMEM
/************************************************************************/