Author: petdance
Date: Fri Jul 6 15:08:24 2007
New Revision: 19656
Modified:
trunk/include/parrot/datatypes.h
trunk/include/parrot/hash.h
trunk/include/parrot/list.h
trunk/src/hash.c
trunk/src/list.c
trunk/src/pmc/lexinfo.pmc
Log:
Renamed PARROT_DATA_TYPES to PARROT_DATA_TYPE, and put it into the List and
Hash structures instead of naked int
Modified: trunk/include/parrot/datatypes.h
==============================================================================
--- trunk/include/parrot/datatypes.h (original)
+++ trunk/include/parrot/datatypes.h Fri Jul 6 15:08:24 2007
@@ -66,7 +66,7 @@
enum_type_sized, /* arbitrary size type for list_new */
enum_last_type /* + one */
-} PARROT_DATA_TYPES;
+} PARROT_DATA_TYPE;
/* &end_gen */
struct _data_types {
Modified: trunk/include/parrot/hash.h
==============================================================================
--- trunk/include/parrot/hash.h (original)
+++ trunk/include/parrot/hash.h Fri Jul 6 15:08:24 2007
@@ -64,7 +64,7 @@
UINTVAL mask; /* alloced - 1 */
PMC *container; /* e.g. the PerlHash PMC */
Hash_key_type key_type; /* cstring, ascii-string, utf8-string */
- PARROT_DATA_TYPES entry_type; /* type of value */
+ PARROT_DATA_TYPE entry_type;/* type of value */
size_t seed; /* randomizes the hash_key generation
updated for each new hash */
hash_comp_fn compare; /* compare two keys, 0 = equal */
@@ -158,7 +158,7 @@
void parrot_new_hash_x(
Hash **hptr /*NN*/,
- PARROT_DATA_TYPES val_type,
+ PARROT_DATA_TYPE val_type,
Hash_key_type hkey_type,
hash_comp_fn compare,
hash_hash_key_fn keyhash )
@@ -166,7 +166,7 @@
void parrot_new_pmc_hash_x( Interp *interp,
PMC *container /*NN*/,
- PARROT_DATA_TYPES val_type,
+ PARROT_DATA_TYPE val_type,
Hash_key_type hkey_type,
hash_comp_fn compare,
hash_hash_key_fn keyhash )
Modified: trunk/include/parrot/list.h
==============================================================================
--- trunk/include/parrot/list.h (original)
+++ trunk/include/parrot/list.h Fri Jul 6 15:08:24 2007
@@ -34,7 +34,7 @@
UINTVAL length; /* number of items in list */
UINTVAL start; /* offset, where array[0] is */
PMC * container; /* the Array PMC */
- int item_type; /* item type */
+ PARROT_DATA_TYPE item_type; /* item type */
int item_size; /* item size */
int items_per_chunk; /* override defaults */
UINTVAL cap; /* list capacity in items */
@@ -125,13 +125,13 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-PARROT_API List * list_new( Interp *interp /*NN*/, PARROT_DATA_TYPES type )
+PARROT_API List * list_new( Interp *interp /*NN*/, PARROT_DATA_TYPE type )
__attribute__nonnull__(1)
__attribute__malloc__
__attribute__warn_unused_result__;
PARROT_API List * list_new_init( Interp *interp /*NN*/,
- INTVAL type,
+ PARROT_DATA_TYPE type,
PMC *init /*NN*/ )
__attribute__nonnull__(1)
__attribute__nonnull__(3)
Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c (original)
+++ trunk/src/hash.c Fri Jul 6 15:08:24 2007
@@ -60,7 +60,7 @@
static void init_hash(
Hash *hash /*NN*/,
- PARROT_DATA_TYPES val_type,
+ PARROT_DATA_TYPE val_type,
Hash_key_type hkey_type,
hash_comp_fn compare,
hash_hash_key_fn keyhash )
@@ -556,7 +556,7 @@
static void
init_hash(Hash *hash /*NN*/,
- PARROT_DATA_TYPES val_type,
+ PARROT_DATA_TYPE val_type,
Hash_key_type hkey_type,
hash_comp_fn compare, hash_hash_key_fn keyhash)
{
@@ -645,7 +645,7 @@
void
parrot_new_hash_x(Hash **hptr /*NN*/,
- PARROT_DATA_TYPES val_type,
+ PARROT_DATA_TYPE val_type,
Hash_key_type hkey_type,
hash_comp_fn compare, hash_hash_key_fn keyhash)
{
@@ -666,7 +666,7 @@
void
parrot_new_pmc_hash_x(SHIM_INTERP, PMC *container /*NN*/,
- PARROT_DATA_TYPES val_type,
+ PARROT_DATA_TYPE val_type,
Hash_key_type hkey_type,
hash_comp_fn compare, hash_hash_key_fn keyhash)
{
Modified: trunk/src/list.c
==============================================================================
--- trunk/src/list.c (original)
+++ trunk/src/list.c Fri Jul 6 15:08:24 2007
@@ -1163,7 +1163,7 @@
PARROT_API
List *
-list_new(Interp *interp /*NN*/, PARROT_DATA_TYPES type)
+list_new(Interp *interp /*NN*/, PARROT_DATA_TYPE type)
/* MALLOC, WARN_UNUSED */
{
List * const list = (List *)new_bufferlike_header(interp, sizeof (*list));
@@ -1235,7 +1235,7 @@
PARROT_API
List *
-list_new_init(Interp *interp /*NN*/, INTVAL type, PMC *init /*NN*/)
+list_new_init(Interp *interp /*NN*/, PARROT_DATA_TYPE type, PMC *init /*NN*/)
/* WARN_UNUSED */
{
List *list;
Modified: trunk/src/pmc/lexinfo.pmc
==============================================================================
--- trunk/src/pmc/lexinfo.pmc (original)
+++ trunk/src/pmc/lexinfo.pmc Fri Jul 6 15:08:24 2007
@@ -74,7 +74,7 @@
assert(PObj_constant_TEST(SELF));
PMC_pmc_val(SELF) = sub;
parrot_new_pmc_hash_x(INTERP, SELF,
- (PARROT_DATA_TYPES)enum_hash_int,
+ (PARROT_DATA_TYPE)enum_hash_int,
Hash_key_type_STRING,
(hash_comp_fn)string_equal, /* STRING compare */
key_hash_STRING); /* hash */