8 // Symbols are just strings, uniquified through a global hash table.
10 #if (defined(__alpha__) && !defined(__GNUC__))
14 struct cl_symbol : public cl_rcpointer {
16 // Conversion to string.
17 operator cl_string () const;
19 cl_symbol (const cl_string&); // create or lookup a symbol from its name
20 cl_symbol (const cl_symbol&);
21 // Assignment operators.
22 cl_symbol& operator= (const cl_symbol&);
23 // Private pointer manipulations.
24 cl_symbol (cl_private_thing p) : cl_rcpointer (p) {}
26 // Create a new symbol given its name.
27 cl_symbol (struct hashuniq * null, const cl_string& s);
29 CL_DEFINE_COPY_CONSTRUCTOR2(cl_symbol,cl_rcpointer)
30 CL_DEFINE_ASSIGNMENT_OPERATOR(cl_symbol,cl_symbol)
32 // A symbol points to a string, so to convert cl_symbol -> cl_string, we just
33 // take the pointer and put it into a cl_string.
34 inline cl_symbol::operator cl_string () const
36 return cl_string(_as_cl_private_thing());
40 inline bool equal (const cl_symbol& s1, const cl_symbol& s2)
42 return (s1.pointer == s2.pointer);
46 extern unsigned long hashcode (const cl_symbol& s);
50 #endif /* _CL_SYMBOL_H */