The ext/Cwd/Cwd.xs part of...
[p5sagit/p5-mst-13.2.git] / hv.h
diff --git a/hv.h b/hv.h
index 163c660..dd35ae5 100644 (file)
--- a/hv.h
+++ b/hv.h
@@ -41,10 +41,9 @@ struct shared_he {
    Use the funcs in mro.c
 */
 
-typedef enum {
-    MRO_DFS, /* 0 */
-    MRO_C3   /* 1 */
-} mro_alg;
+
+/* structure may change, so not public yet */
+struct mro_alg;
 
 struct mro_meta {
     AV      *mro_linear_dfs; /* cached dfs @ISA linearization */
@@ -52,7 +51,7 @@ struct mro_meta {
     HV      *mro_nextmethod; /* next::method caching */
     U32     cache_gen;       /* Bumping this invalidates our method cache */
     U32     pkg_gen;         /* Bumps when local methods/@ISA change */
-    mro_alg mro_which;       /* which mro alg is in use? */
+    const struct mro_alg *mro_which; /* which mro alg is in use? */
 };
 
 /* Subject to change.
@@ -529,6 +528,16 @@ struct refcounted_he {
 #define HV_DELETE              0x40
 
 /*
+=for apidoc newHV
+
+Creates a new HV.  The reference count is set to 1.
+
+=cut
+*/
+
+#define newHV()        ((HV*)newSV_type(SVt_PVHV))
+
+/*
  * Local variables:
  * c-indentation-style: bsd
  * c-basic-offset: 4