diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:41 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:41 +0200 |
| commit | 520f54d6219b7c625b4e07463ac393e6982ddab6 (patch) | |
| tree | 74b4483786b3842b1a0384fd33deb7483276bea1 /src/maps | |
| parent | ae4e87df37ed8904de92c7cf2f3a11128cda2a21 (diff) | |
tagging ychat-0.7.1ychat-0.7.1
Diffstat (limited to 'src/maps')
| -rw-r--r-- | src/maps/hmap.tmpl | 4 | ||||
| -rw-r--r-- | src/maps/mtools.h | 4 | ||||
| -rw-r--r-- | src/maps/nmap.h | 3 | ||||
| -rw-r--r-- | src/maps/smap.h | 2 | ||||
| -rw-r--r-- | src/maps/smap.tmpl | 4 |
5 files changed, 17 insertions, 0 deletions
diff --git a/src/maps/hmap.tmpl b/src/maps/hmap.tmpl index cc2ec24..dcd0426 100644 --- a/src/maps/hmap.tmpl +++ b/src/maps/hmap.tmpl @@ -286,4 +286,8 @@ hmap<obj_type, key_type>::get_size() return size; } + + + #endif + diff --git a/src/maps/mtools.h b/src/maps/mtools.h index 6062191..f32a49e 100644 --- a/src/maps/mtools.h +++ b/src/maps/mtools.h @@ -1,6 +1,7 @@ #ifndef MTOOLS_H #define MTOOLS_H + template <class type_> struct mtools { @@ -8,4 +9,7 @@ struct mtools }; #include "mtools.tmpl" + #endif + + diff --git a/src/maps/nmap.h b/src/maps/nmap.h index e29da3b..56d30f5 100644 --- a/src/maps/nmap.h +++ b/src/maps/nmap.h @@ -19,4 +19,7 @@ class nmap : public smap<obj_type, key_type> }; #include "nmap.tmpl" + #endif + + diff --git a/src/maps/smap.h b/src/maps/smap.h index a3ee89d..2096139 100644 --- a/src/maps/smap.h +++ b/src/maps/smap.h @@ -13,6 +13,7 @@ template <class obj_type, class key_type> class smap : public hmap<obj_type, key_type> { + private: pthread_mutex_t mut_smap; @@ -52,4 +53,5 @@ class smap : public hmap<obj_type, key_type> }; #include "smap.tmpl" + #endif diff --git a/src/maps/smap.tmpl b/src/maps/smap.tmpl index 670b84d..5ec7d38 100644 --- a/src/maps/smap.tmpl +++ b/src/maps/smap.tmpl @@ -15,6 +15,7 @@ smap<obj_type, key_type>::~smap() pthread_mutex_destroy( &mut_smap ); } + template <class obj_type, class key_type> void smap<obj_type, key_type>::lock_mutex() { pthread_mutex_lock( &mut_smap ); @@ -164,6 +165,7 @@ void smap<obj_type, key_type>::make_empty_insecure( void (*func)(key_type) ) hmap<obj_type,key_type>::make_empty( func ); } + template <class obj_type, class key_type> void smap<obj_type, key_type>::add_elem_insecure( const obj_type &x, const key_type &k ) { @@ -212,4 +214,6 @@ smap<obj_type, key_type>::get_key_vector_insecure() return hmap<obj_type,key_type>::get_key_vector(); } + #endif + |
