]> www.ginac.de Git - cln.git/blob - src/base/hash/cl_rcpointer2_hashweak_rcpointer.cc
Replace unused macro with cl_unused.
[cln.git] / src / base / hash / cl_rcpointer2_hashweak_rcpointer.cc
1 // class cl_wht_from_rcpointer2_to_rcpointer.
2
3 // General includes.
4 #include "base/cl_sysdep.h"
5
6 // Specification.
7 #include "base/hash/cl_rcpointer2_hashweak_rcpointer.h"
8
9
10 // Implementation.
11
12 #include "base/hash/cl_hash2weak.h"
13
14 namespace cln {
15
16 static void cl_weak_hashtable_from_rcpointer2_to_rcpointer_destructor (cl_heap* pointer)
17 {
18         (*(cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer).~cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer();
19 }
20
21 cl_class cl_class_weak_hashtable_from_rcpointer2_to_rcpointer = {
22         cl_weak_hashtable_from_rcpointer2_to_rcpointer_destructor,
23         0
24 };
25
26 // These are not inline, because they tend to duplicate a lot of template code.
27
28 cl_wht_from_rcpointer2_to_rcpointer::cl_wht_from_rcpointer2_to_rcpointer (bool (*maygc_htentry) (const cl_htentry_from_rcpointer2_to_rcpointer&))
29 {
30         var cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer* ht = new cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer (maygc_htentry);
31         ht->refcount = 1;
32         ht->type = &cl_class_weak_hashtable_from_rcpointer2_to_rcpointer;
33         pointer = ht;
34 }
35
36 cl_rcpointer * cl_wht_from_rcpointer2_to_rcpointer::get (const cl_rcpointer& x, const cl_rcpointer& y) const
37 {
38         return ((cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer)->get(x,y);
39 }
40
41 void cl_wht_from_rcpointer2_to_rcpointer::put (const cl_rcpointer& x, const cl_rcpointer& y, const cl_rcpointer& z) const
42 {
43         ((cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer)->put(x,y,z);
44 }
45
46 }  // namespace cln