Author: jonathan
Date: Sun Apr 1 13:51:19 2007
New Revision: 17932
Modified:
trunk/src/objects.c
trunk/src/pmc/class.pmc
trunk/src/pmc/role.pmc
trunk/t/oo/composition.t
Log:
[PDD15]: Rename without to exclude, to match updated PDD15.
Modified: trunk/src/objects.c
==============================================================================
--- trunk/src/objects.c (original)
+++ trunk/src/objects.c Sun Apr 1 13:51:19 2007
@@ -1848,7 +1848,7 @@
/*
=item C<void Parrot_ComposeRole(Interp *interp, PMC *role,
- PMC *without, int got_without,
+ PMC *exclude, int got_exclude,
PMC *alias, int got_alias,
PMC *methods_hash, PMC *roles_list)>
@@ -1868,7 +1868,7 @@
*/
void Parrot_ComposeRole(Interp *interp, PMC *role,
- PMC *without, int got_without,
+ PMC *exclude, int got_exclude,
PMC *alias, int got_alias,
PMC *methods_hash, PMC *roles_list)
{
@@ -1906,10 +1906,10 @@
STRING *check_name = method_name;
/* Ignore if it's in the exclude list. */
- if (got_without) {
- int without_count = VTABLE_elements(interp, without);
- for (i = 0; i < without_count; i++) {
- STRING *check = VTABLE_get_string_keyed_int(interp, without,
i);
+ if (got_exclude) {
+ int exclude_count = VTABLE_elements(interp, exclude);
+ for (i = 0; i < exclude_count; i++) {
+ STRING *check = VTABLE_get_string_keyed_int(interp, exclude,
i);
if (string_equal(interp, check, method_name) == 0) {
check_name = NULL;
break;
Modified: trunk/src/pmc/class.pmc
==============================================================================
--- trunk/src/pmc/class.pmc (original)
+++ trunk/src/pmc/class.pmc Sun Apr 1 13:51:19 2007
@@ -461,7 +461,7 @@
/*
-=item C<void add_role(PMC* role, PMC* without :optional :named["without"],
+=item C<void add_role(PMC* role, PMC* exclude :optional :named["exclude"],
PMC* alias :optional :named["alias"])>
Compose a role into a class with the given exclusions and aliases.
@@ -470,10 +470,10 @@
*/
PCCMETHOD void add_role(PMC* role,
- PMC* without :optional :named["without"], int got_without
:opt_flag,
+ PMC* exclude :optional :named["exclude"], int got_exclude
:opt_flag,
PMC* alias :optional :named["alias"], int got_alias :opt_flag)
{
Parrot_Class *class = PARROT_CLASS(SELF);
- Parrot_ComposeRole(interp, role, without, got_without, alias,
got_alias,
+ Parrot_ComposeRole(interp, role, exclude, got_exclude, alias,
got_alias,
class->methods, class->roles);
}
Modified: trunk/src/pmc/role.pmc
==============================================================================
--- trunk/src/pmc/role.pmc (original)
+++ trunk/src/pmc/role.pmc Sun Apr 1 13:51:19 2007
@@ -280,7 +280,7 @@
/*
-=item C<void add_role(PMC* role, PMC* without :optional :named["without"],
+=item C<void add_role(PMC* role, PMC* exclude :optional :named["exclude"],
PMC* alias :optional :named["alias"])>
Compose the given role into this one, using the given exclusions and aliases.
@@ -289,10 +289,10 @@
*/
PCCMETHOD void add_role(PMC* role,
- PMC* without :optional :named["without"], int got_without
:opt_flag,
+ PMC* exclude :optional :named["exclude"], int got_exclude
:opt_flag,
PMC* alias :optional :named["alias"], int got_alias :opt_flag) {
Parrot_Role *role_info = PARROT_ROLE(SELF);
- Parrot_ComposeRole(interp, role, without, got_without, alias,
got_alias,
+ Parrot_ComposeRole(interp, role, exclude, got_exclude, alias,
got_alias,
role_info->methods, role_info->roles);
}
Modified: trunk/t/oo/composition.t
==============================================================================
--- trunk/t/oo/composition.t (original)
+++ trunk/t/oo/composition.t Sun Apr 1 13:51:19 2007
@@ -216,7 +216,7 @@
$P0.'add_method'("snake", $P2)
$P3 = new ResizableStringArray
push $P3, "badger"
- $P1.'add_role'($P0, 'without' => $P3)
+ $P1.'add_role'($P0, 'exclude' => $P3)
print "ok 2 - composition worked due to exclusion\n"
$P2 = $P1.'new'()