chiark / gitweb /
buf: Fix two embarassing bugs found while writing Lisp bindings.
[mLib] / assoc.h
diff --git a/assoc.h b/assoc.h
index 6eea33af9b397c27176e7b9214dd16eb048c5735..efc3f0cb408393e2ee34e78f24701a2c2e87356d 100644 (file)
--- a/assoc.h
+++ b/assoc.h
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: assoc.h,v 1.1 2001/01/20 11:50:58 mdw Exp $
+ * $Id: assoc.h,v 1.3 2004/04/08 01:36:11 mdw Exp $
  *
  * Assocation tables
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: assoc.h,v $
- * Revision 1.1  2001/01/20 11:50:58  mdw
- * Hash tables indexed by atoms, to avoid expense of hashing keys on each
- * lookup, and to reduce storage used by key texts.
- *
- */
-
 #ifndef MLIB_ASSOC_H
 #define MLIB_ASSOC_H
 
@@ -67,6 +58,8 @@ typedef struct assoc_base {
 
 typedef struct { hash_iter i; } assoc_iter;
 
+#define ASSOC_ATOM(p) (((assoc_base *)(p))->a + 0)
+
 /*----- Functions provided ------------------------------------------------*/
 
 /* --- @assoc_create@ --- *