Skip to content

Commit

Permalink
[pdd15oo] Resolving a problem with classes that inherit from Integer.…
Browse files Browse the repository at this point in the history
… The MMD methods need to access the integer value through get_integer, instead of directly poking into the union value. Resolves RT#46541.

git-svn-id: https://svn.parrot.org/parrot/trunk@22405 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
allisonrandal committed Oct 22, 2007
1 parent d13001b commit 3dd64f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pmc/integer.pmc
Expand Up @@ -323,7 +323,7 @@ MMD_Integer: {
* so we can't used PMC_int_val(SELF) in any of these
* Integer methods
*
* RT#46627
* RT#46627
* check for exact Integer type
* e.g. MMD_Integer_EXACT
*/
Expand Down Expand Up @@ -1142,7 +1142,7 @@ MMD_BigInt: {
return Parrot_BigInt_is_equal_BigInt(INTERP, temp, value);
}
MMD_DEFAULT: {
return (INTVAL)(PMC_int_val(SELF) ==
return (VTABLE_get_integer(INTERP, SELF) ==
VTABLE_get_integer(INTERP, value));
}
}
Expand Down
2 changes: 1 addition & 1 deletion t/pmc/objects.t
Expand Up @@ -1665,7 +1665,7 @@ CODE
1 * 1 = 1
OUTPUT

pir_output_is( <<'CODE', <<'OUTPUT', 'equality of subclassed Integer', todo => 'RT #46541' );
pir_output_is( <<'CODE', <<'OUTPUT', 'equality of subclassed Integer' );
.sub main :main
.local pmc class
class = subclass "Integer", "LispInteger"
Expand Down

0 comments on commit 3dd64f1

Please sign in to comment.