1 // class cl_wht_from_rcpointer_to_rcpointer.
7 #include "cl_rcpointer_hashweak_rcpointer.h"
12 #include "cl_hash1weak.h"
14 static void cl_weak_hashtable_from_rcpointer_to_rcpointer_destructor (cl_heap* pointer)
16 #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug
17 (*(cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer).~cl_heap_weak_hashtable_1();
19 (*(cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer).~cl_heap_weak_hashtable_from_rcpointer_to_rcpointer();
23 cl_class cl_class_weak_hashtable_from_rcpointer_to_rcpointer = {
24 cl_weak_hashtable_from_rcpointer_to_rcpointer_destructor,
28 // These are not inline, because they tend to duplicate a lot of template code.
30 cl_wht_from_rcpointer_to_rcpointer::cl_wht_from_rcpointer_to_rcpointer (cl_boolean (*maygc_htentry) (const cl_htentry_from_rcpointer_to_rcpointer&))
32 var cl_heap_weak_hashtable_from_rcpointer_to_rcpointer* ht = new cl_heap_weak_hashtable_from_rcpointer_to_rcpointer (maygc_htentry);
34 ht->type = &cl_class_weak_hashtable_from_rcpointer_to_rcpointer;
38 cl_rcpointer * cl_wht_from_rcpointer_to_rcpointer::get (const cl_rcpointer& x) const
40 return ((cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer)->get(x);
43 void cl_wht_from_rcpointer_to_rcpointer::put (const cl_rcpointer& x, const cl_rcpointer& y) const
45 ((cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer)->put(x,y);