[PD-cvs] externals/grill/flext/source flattr.cpp, 1.31, 1.32 flbind.cpp, 1.19, 1.20 flclass.h, 1.55, 1.56 flitem.cpp, 1.17, 1.18 fllib.cpp, 1.32, 1.33 flmap.h, 1.13, 1.14 flmeth.cpp, 1.17, 1.18

Thomas Grill xovo at users.sourceforge.net
Sat Apr 16 23:35:08 CEST 2005


Update of /cvsroot/pure-data/externals/grill/flext/source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6844/source

Modified Files:
	flattr.cpp flbind.cpp flclass.h flitem.cpp fllib.cpp flmap.h 
	flmeth.cpp 
Log Message:
updated templates
changed template parameter of TableMap
fixes for OSX
fixed problems with symbol binding


Index: flmap.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flmap.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** flmap.h	9 Apr 2005 21:09:01 -0000	1.13
--- flmap.h	16 Apr 2005 21:35:06 -0000	1.14
***************
*** 249,258 ****
      inline int size() const { return TableAnyMap::size(); }
  
!     inline void insert(K k,T *t) { TableAnyMap::insert(*(size_t *)&k,t); }
  
!     inline T *find(K k) const { return (T *)TableAnyMap::find(*(size_t *)&k); }
  
      inline void erase(K k) { TableAnyMap::erase(*(size_t *)&k); }
!     inline T *remove(K k) { return (T *)TableAnyMap::remove(*(size_t *)&k); }
  
      class iterator
--- 249,258 ----
      inline int size() const { return TableAnyMap::size(); }
  
!     inline void insert(K k,T t) { TableAnyMap::insert(*(size_t *)&k,(void *)t); }
  
!     inline T find(K k) const { return (T)TableAnyMap::find(*(size_t *)&k); }
  
      inline void erase(K k) { TableAnyMap::erase(*(size_t *)&k); }
!     inline T remove(K k) { return (T)TableAnyMap::remove(*(size_t *)&k); }
  
      class iterator
***************
*** 267,271 ****
  
          inline operator bool() const {return TableAnyMap::iterator::operator bool(); }
!         inline T *data() const { return (T *)TableAnyMap::iterator::data(); }
          inline K key() const { return (K)TableAnyMap::iterator::key(); }
  
--- 267,271 ----
  
          inline operator bool() const {return TableAnyMap::iterator::operator bool(); }
!         inline T data() const { return (T)TableAnyMap::iterator::data(); }
          inline K key() const { return (K)TableAnyMap::iterator::key(); }
  
***************
*** 295,299 ****
      { 
  //            FLEXT_ASSERT(ptr);
!         delete (T *)ptr;
      }
  
--- 295,299 ----
      { 
  //            FLEXT_ASSERT(ptr);
!         delete (T)ptr;
      }
  

Index: flitem.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flitem.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** flitem.cpp	31 Mar 2005 03:52:38 -0000	1.17
--- flitem.cpp	16 Apr 2005 21:35:06 -0000	1.18
***************
*** 22,35 ****
  }
  
- /*
- flext_base::ItemSet::ItemSet() {}
- 
- flext_base::ItemSet::~ItemSet()
- {
-     for(iterator it = begin(); it != end(); ++it)
-         if(it.data()) delete it.data();
- }
- */
- 
  flext_base::ItemCont::ItemCont(): 
      members(0),memsize(0),size(0),cont(NULL)
--- 22,25 ----
***************
*** 89,94 ****
                  else if(lit->nxt)
                      set.insert(tag,lit->nxt);
!                 else
!                     set.erase(tag);
  
                  lit->nxt = NULL; 
--- 79,86 ----
                  else if(lit->nxt)
                      set.insert(tag,lit->nxt);
!                 else {
!                     Item *l = set.remove(tag);
!                     FLEXT_ASSERT(l == lit);
!                 }
  
                  lit->nxt = NULL; 
***************
*** 109,113 ****
  // --- class item lists (methods and attributes) ----------------
  
! typedef TablePtrMap<flext_base::t_classid,flext_base::ItemCont,64> ClassMap;
  
  static ClassMap classarr[2];
--- 101,105 ----
  // --- class item lists (methods and attributes) ----------------
  
! typedef TablePtrMap<flext_base::t_classid,flext_base::ItemCont *,64> ClassMap;
  
  static ClassMap classarr[2];

Index: flmeth.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flmeth.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** flmeth.cpp	31 Mar 2005 03:52:38 -0000	1.17
--- flmeth.cpp	16 Apr 2005 21:35:06 -0000	1.18
***************
*** 90,94 ****
  void flext_base::ListMethods(AtomList &la,int inlet) const
  {
! 	typedef TablePtrMap<int,t_symbol,32> MethList;
      MethList list[2];
  
--- 90,94 ----
  void flext_base::ListMethods(AtomList &la,int inlet) const
  {
! 	typedef TablePtrMap<int,const t_symbol *,32> MethList;
      MethList list[2];
  
***************
*** 103,107 ****
                      // check it's not related to an attribute
                      if(!aa->IsAttr()) {
!                         list[i].insert(aa->index,const_cast<t_symbol *>(as.key()));
                          break;
                      }
--- 103,107 ----
                      // check it's not related to an attribute
                      if(!aa->IsAttr()) {
!                         list[i].insert(aa->index,as.key());
                          break;
                      }

Index: flattr.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flattr.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** flattr.cpp	31 Mar 2005 03:52:38 -0000	1.31
--- flattr.cpp	16 Apr 2005 21:35:06 -0000	1.32
***************
*** 104,108 ****
  void flext_base::ListAttrib(AtomList &la) const
  {
! 	typedef TablePtrMap<int,t_symbol,32> AttrList;
  	AttrList list[2];
  
--- 104,108 ----
  void flext_base::ListAttrib(AtomList &la) const
  {
! 	typedef TablePtrMap<int,const t_symbol *,32> AttrList;
  	AttrList list[2];
  
***************
*** 115,119 ****
                  for(Item *al = as.data(); al; al = al->nxt) {
  					AttrItem *aa = (AttrItem *)al;
! 					list[i].insert(aa->index,const_cast<t_symbol *>(as.key()));
                      break;
                  }
--- 115,119 ----
                  for(Item *al = as.data(); al; al = al->nxt) {
  					AttrItem *aa = (AttrItem *)al;
! 					list[i].insert(aa->index,as.key());
                      break;
                  }

Index: flbind.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flbind.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** flbind.cpp	15 Mar 2005 04:56:35 -0000	1.19
--- flbind.cpp	16 Apr 2005 21:35:06 -0000	1.20
***************
*** 63,67 ****
  flext_base::BindItem::~BindItem()
  {
!     if(px) object_free(&px->obj);
  }
  
--- 63,70 ----
  flext_base::BindItem::~BindItem()
  {
!     if(px) {
!         FLEXT_ASSERT(!fun); // check if already unbound
!         object_free(&px->obj);
!     }
  }
  
***************
*** 69,72 ****
--- 72,77 ----
  {
      if(px) {
+         FLEXT_ASSERT(fun);
+ 
  #if FLEXT_SYS == FLEXT_SYS_PD
          pd_unbind(&px->obj.ob_pd,const_cast<t_symbol *>(tag)); 
***************
*** 79,82 ****
--- 84,89 ----
  #           pragma warning("Not implemented")
  #endif
+ 
+         fun = NULL;
      }
  }

Index: flclass.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flclass.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** flclass.h	31 Mar 2005 03:52:38 -0000	1.55
--- flclass.h	16 Apr 2005 21:35:06 -0000	1.56
***************
*** 660,664 ****
  	};
  */
! 	typedef TablePtrMapOwned<const t_symbol *,Item,8> ItemSet;
  
      /*! This class holds hashed item entries
--- 660,664 ----
  	};
  */
! 	typedef TablePtrMapOwned<const t_symbol *,Item *,8> ItemSet;
  
      /*! This class holds hashed item entries
***************
*** 776,780 ****
  	};
  */
! 	typedef TablePtrMapOwned<const t_symbol *,AttrData,8> AttrDataCont;
  
  	// these outlet functions don't check for thread but send directly to the real-time system
--- 776,780 ----
  	};
  */
! 	typedef TablePtrMapOwned<const t_symbol *,AttrData *,8> AttrDataCont;
  
  	// these outlet functions don't check for thread but send directly to the real-time system

Index: fllib.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/fllib.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** fllib.cpp	31 Mar 2005 03:52:38 -0000	1.32
--- fllib.cpp	16 Apr 2005 21:35:06 -0000	1.33
***************
*** 127,131 ****
  
  
! typedef TablePtrMap<const t_symbol *,libclass,8> LibMap;
  
  static LibMap libnames;
--- 127,131 ----
  
  
! typedef TablePtrMap<const t_symbol *,libclass *,8> LibMap;
  
  static LibMap libnames;





More information about the Pd-cvs mailing list