Breaks ABI! Add identification slots to abstract groups and elliptic
[u/mdw/catacomb] / group.h
diff --git a/group.h b/group.h
index 9578f33..aae0e60 100644 (file)
--- a/group.h
+++ b/group.h
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: group.h,v 1.5 2004/04/17 09:58:37 mdw Exp $
+ * $Id$
  *
  * General cyclic group abstraction
  *
@@ -80,7 +80,11 @@ typedef struct group_expfactor {
 } group_expfactor;
 
 typedef struct group_ops {
+
+  /* --- General information --- */
+
   unsigned ty;                         /* Type of this group */
+  const char *name;                    /* Textual name string */
 
   /* --- Memory management --- */
 
@@ -136,6 +140,9 @@ enum {
   GTY_EC                               /* Elliptic curve group */
 };
 
+#define G_NAME(g)              (g)->ops->name
+#define G_TYPE(g)              (g)->ops->ty
+
 #define G_DESTROYGROUP(g)      (g)->ops->destroygroup((g))
 #define G_CREATE(g)            (g)->ops->create((g))
 #define G_COPY(g, d, x)                (g)->ops->copy((g), (d), (x))