Skip to content
This repository has been archived by the owner on Jun 9, 2018. It is now read-only.

Commit

Permalink
replace deprecated PMC Array
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Nov 18, 2009
1 parent 6cb69ad commit f30ecdf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dynext/pmc/luanumber.pmc
Expand Up @@ -1126,7 +1126,7 @@ Used to unarchive the number.
const FLOATVAL _y = frexp(VTABLE_get_number(INTERP, SELF), &_e);
PMC * const y = pmc_new(INTERP, dynpmc_LuaNumber);
PMC * const expn = pmc_new(INTERP, dynpmc_LuaNumber);
PMC * const retval = pmc_new(INTERP, enum_class_Array);
PMC * const retval = pmc_new(INTERP, enum_class_FixedPMCArray);

VTABLE_set_number_native(INTERP, y, _y);
VTABLE_set_integer_native(INTERP, expn, _e);
Expand Down Expand Up @@ -1305,7 +1305,7 @@ Used to unarchive the number.
const FLOATVAL _y = modf(VTABLE_get_number(INTERP, SELF), &_d);
PMC * const y = pmc_new(INTERP, dynpmc_LuaNumber);
PMC * const d = pmc_new(INTERP, dynpmc_LuaNumber);
PMC * const retval = pmc_new(INTERP, enum_class_Array);
PMC * const retval = pmc_new(INTERP, enum_class_FixedPMCArray);

VTABLE_set_number_native(INTERP, y, _y);
VTABLE_set_number_native(INTERP, d, _d);
Expand Down
2 changes: 1 addition & 1 deletion dynext/pmc/luatable.pmc
Expand Up @@ -730,7 +730,7 @@ The C<==> operation. Compares reference (not in depth).
Node * const n = lua_next(INTERP, PARROT_LUATABLE(SELF), index);

if (n) {
PMC * const retval = pmc_new(INTERP, enum_class_Array);
PMC * const retval = pmc_new(INTERP, enum_class_FixedPMCArray);
VTABLE_set_integer_native(INTERP, retval, 2);
VTABLE_set_pmc_keyed_int(INTERP, retval, 0, n->key);
VTABLE_set_pmc_keyed_int(INTERP, retval, 1, n->val);
Expand Down
4 changes: 2 additions & 2 deletions t/pmc/userdata.t
Expand Up @@ -62,15 +62,15 @@ Tests C<userdata> type

.sub 'check_get_bool'
$P0 = new 'LuaUserdata'
$P1 = new 'Array'
$P1 = new 'FileHandle'
setattribute $P0, 'data', $P1
$I0 = istrue $P0
is($I0, 1, "check get_bool")
.end

.sub 'check_logical_not'
$P0 = new 'LuaUserdata'
$P1 = new 'Array'
$P1 = new 'FileHandle'
setattribute $P0, 'data', $P1
$P2 = not $P0
isa_ok($P2, 'LuaBoolean', "check logical_not")
Expand Down
6 changes: 3 additions & 3 deletions t/pmc/userdata_hll.t
Expand Up @@ -30,14 +30,14 @@ Tests C<userdata> type

.sub 'check_HLL'
$P0 = new 'LuaUserdata'
$P1 = new 'Array'
$P1 = new 'FileHandle'
setattribute $P0, 'data', $P1
isa_ok($P0, 'LuaUserdata', "check HLL")
.end

.sub 'check_tostring'
$P0 = new 'LuaUserdata'
$P1 = new 'Array'
$P1 = new 'FileHandle'
setattribute $P0, 'data', $P1
$S0 = $P0
like($S0, '^userdata: <[0..9A..Fa..f]>*', "check tostring")
Expand All @@ -49,7 +49,7 @@ Tests C<userdata> type

.sub 'check_tonumber'
$P0 = new 'LuaUserdata'
$P1 = new 'Array'
$P1 = new 'FileHandle'
setattribute $P0, 'data', $P1
$P2 = $P0.'tonumber'()
isa_ok($P2, 'LuaNil', "check tonumber")
Expand Down

0 comments on commit f30ecdf

Please sign in to comment.