1 // class cl_ht_from_integer_to_gcobject.
4 #include "base/cl_sysdep.h"
7 #include "integer/hash/cl_I_hash_gcobject.h"
12 #include "integer/cl_I.h"
13 #include "base/hash/cl_hash1.h"
17 static void cl_hashtable_from_integer_to_gcobject_destructor (cl_heap* pointer)
19 #if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug
20 (*(cl_heap_hashtable_from_integer_to_gcobject*)pointer).~cl_heap_hashtable_1();
22 (*(cl_heap_hashtable_from_integer_to_gcobject*)pointer).~cl_heap_hashtable_from_integer_to_gcobject();
26 cl_class cl_class_hashtable_from_integer_to_gcobject = {
27 cl_hashtable_from_integer_to_gcobject_destructor,
31 // These are not inline, because they tend to duplicate a lot of template code.
33 cl_ht_from_integer_to_gcobject::cl_ht_from_integer_to_gcobject ()
35 var cl_heap_hashtable_from_integer_to_gcobject* ht = new cl_heap_hashtable_from_integer_to_gcobject ();
37 ht->type = &cl_class_hashtable_from_integer_to_gcobject;
41 cl_gcobject * cl_ht_from_integer_to_gcobject::get (const cl_I& x) const
43 return ((cl_heap_hashtable_from_integer_to_gcobject*)pointer)->get(x);
46 void cl_ht_from_integer_to_gcobject::put (const cl_I& x, const cl_gcobject& y) const
48 ((cl_heap_hashtable_from_integer_to_gcobject*)pointer)->put(x,y);