Another try. Builds and pass tests both with C and C++.
Index: src/string.c =================================================================== --- src/string.c (revisión: 28565) +++ src/string.c (copia de trabajo) @@ -265,7 +265,7 @@ /* Set up the cstring cache, then load the basic encodings and charsets */ if (!interp->parent_interpreter) { parrot_new_cstring_hash(interp, &const_cstring_hash); - interp->const_cstring_hash = (struct Hash *)const_cstring_hash; + interp->const_cstring_hash = (Hash *)const_cstring_hash; Parrot_charsets_encodings_init(interp); } /* initialize the constant string table */ Index: include/parrot/parrot.h =================================================================== --- include/parrot/parrot.h (revisión: 28565) +++ include/parrot/parrot.h (copia de trabajo) @@ -274,6 +274,7 @@ #define PACKAGE "parrot" #define LOCALEDIR "." +typedef struct _hash Hash; #include "parrot/settings.h" #include "parrot/enums.h" Index: include/parrot/hash.h =================================================================== --- include/parrot/hash.h (revisión: 28565) +++ include/parrot/hash.h (copia de trabajo) @@ -56,7 +56,7 @@ void *value; } HashBucket; -typedef struct _hash { +struct _hash { HashBucket *bs; /* store of buckets */ HashBucket **bi; /* list of Bucket pointers */ HashBucket *free_list; /* empty buckets */ @@ -69,7 +69,7 @@ updated for each new hash */ hash_comp_fn compare; /* compare two keys, 0 = equal */ hash_hash_key_fn hash_val; /* generate a hash value for key */ -} Hash; +}; /* HEADERIZER BEGIN: src/hash.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ Index: include/parrot/interpreter.h =================================================================== --- include/parrot/interpreter.h (revisión: 28565) +++ include/parrot/interpreter.h (copia de trabajo) @@ -388,7 +388,7 @@ struct _Caches * caches; /* see caches.h */ STRING **const_cstring_table; /* CONST_STRING(x) items */ - struct Hash *const_cstring_hash; /* cache of const_string items */ + Hash *const_cstring_hash; /* cache of const_string items */ struct QUEUE* task_queue; /* per interpreter queue */ struct _handler_node_t *exit_handler_list;/* exit.c */