diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-09-26 10:21:50 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-09-26 10:21:50 +0000 |
commit | 3d76853f2ba25cc9699cf098371070e4651e154f (patch) | |
tree | 642530689aef60363b778e613095b897ee359ed4 /hv.h | |
parent | 6f47696963057ac118d1f5f49ebe66a858dd9e42 (diff) | |
download | perl-3d76853f2ba25cc9699cf098371070e4651e154f.tar.gz |
Change the way of determining the MRO algorithm used from an enum
defined in the header, to a pointer to a structure. This allows the
flexibility to easily add more MROs in the future, and to provide an
API to do so. Dispatch in mro.c is now via the structure pointed to,
rather than switch statements on the value of the enum.
p4raw-id: //depot/perl@31977
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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. |