[svn:parrot] r45387 - in trunk/src: . pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Fri Apr 2 22:22:55 UTC 2010
Author: NotFound
Date: Fri Apr 2 22:22:55 2010
New Revision: 45387
URL: https://trac.parrot.org/parrot/changeset/45387
Log:
some more init_int usages
Modified:
trunk/src/hll.c
trunk/src/library.c
trunk/src/pmc/namespace.pmc
trunk/src/pmc/orderedhash.pmc
Modified: trunk/src/hll.c
==============================================================================
--- trunk/src/hll.c Fri Apr 2 20:27:12 2010 (r45386)
+++ trunk/src/hll.c Fri Apr 2 22:22:55 2010 (r45387)
@@ -88,7 +88,8 @@
PMC *entry_id;
- PMC * const entry = Parrot_pmc_new_constant(interp, enum_class_FixedPMCArray);
+ PMC * const entry = Parrot_pmc_new_constant_init_int(interp,
+ enum_class_FixedPMCArray, e_HLL_MAX);
if (entry_name && !STRING_IS_EMPTY(entry_name)) {
VTABLE_set_pmc_keyed_str(interp, hll_info, entry_name, entry);
@@ -96,8 +97,6 @@
else
VTABLE_push_pmc(interp, hll_info, entry);
- VTABLE_set_integer_native(interp, entry, e_HLL_MAX);
-
entry_id = Parrot_pmc_new_constant(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, entry_id, id);
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_id, entry_id);
Modified: trunk/src/library.c
==============================================================================
--- trunk/src/library.c Fri Apr 2 20:27:12 2010 (r45386)
+++ trunk/src/library.c Fri Apr 2 22:22:55 2010 (r45387)
@@ -168,9 +168,8 @@
(INTVAL)IGLOBALS_CONFIG_HASH);
/* create the lib_paths array */
- PMC * const lib_paths = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
-
- VTABLE_set_integer_native(interp, lib_paths, PARROT_LIB_PATH_SIZE);
+ PMC * const lib_paths = Parrot_pmc_new_init_int(interp,
+ enum_class_FixedPMCArray, PARROT_LIB_PATH_SIZE);
VTABLE_set_pmc_keyed_int(interp, iglobals,
IGLOBALS_LIB_PATHS, lib_paths);
Modified: trunk/src/pmc/namespace.pmc
==============================================================================
--- trunk/src/pmc/namespace.pmc Fri Apr 2 20:27:12 2010 (r45386)
+++ trunk/src/pmc/namespace.pmc Fri Apr 2 22:22:55 2010 (r45387)
@@ -397,13 +397,12 @@
}
else {
/* create new tuple */
- new_tuple = Parrot_pmc_new(INTERP, enum_class_FixedPMCArray);
+ /* for a fully typed namespace, we'd need 3 or 4 */
+ new_tuple = Parrot_pmc_new_init_int(INTERP,
+ enum_class_FixedPMCArray, NS_max_slots);
/* flag it as special */
PObj_get_FLAGS(new_tuple) |= FPA_is_ns_ext;
-
- /* for a fully typed namespace, we'd need 3 or 4 */
- VTABLE_set_integer_native(INTERP, new_tuple, NS_max_slots);
}
}
Modified: trunk/src/pmc/orderedhash.pmc
==============================================================================
--- trunk/src/pmc/orderedhash.pmc Fri Apr 2 20:27:12 2010 (r45386)
+++ trunk/src/pmc/orderedhash.pmc Fri Apr 2 22:22:55 2010 (r45387)
@@ -338,8 +338,8 @@
}
/* Create new entry */
- list_entry = Parrot_pmc_new(INTERP, enum_class_FixedPMCArray);
- VTABLE_set_integer_native(INTERP, list_entry, ORDERED_HASH_ITEM_MAX);
+ list_entry = Parrot_pmc_new_init_int(INTERP,
+ enum_class_FixedPMCArray, ORDERED_HASH_ITEM_MAX);
VTABLE_set_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_VALUE, value);
VTABLE_set_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_KEY, key);
More information about the parrot-commits
mailing list