#1914: Dead code in src/pmc/Capture.pmc
------------------------+---------------------------------------------------
Reporter: DavidCzech | Type: bug
Status: new | Priority: normal
Milestone: | Component: none
Version: 2.10.0 | Severity: medium
Keywords: | Lang:
Patch: | Platform:
------------------------+---------------------------------------------------
The functions in src/pmc/Capture.pmc:
{{{
get_number_keyed_str
get_integer_keyed_str
get_pmc_keyed_str
get_string_keyed_str
}}}
and respective setter functions
{{{
set_number_keyed_str
set_integer_keyed_str
set_pmc_keyed_str
set_string_keyed_str
}}}
cannot be accessed by PIR code, and as such are dead code. A simple test
that should call these functions calls get_number_keyed instead.
{{{
.sub 'test_set_keyed_str'
.local pmc capt
capt = new ['Capture']
set capt["number test"], 2.23
set capt["integer test"],1337
set capt["string test"], "This is a test"
$N0 = capt["number test"]
say $N0
is($N0, 2.23, "get/set_number_keyed_str works")
$I0 = capt["integer test"]
is($I0, 1337, "get/set_integer_keyed_str works")
$S0 = capt["string test"]
is($S0, "This is a test", "get/set_string_keyed_str works")
.end
}}}
Removing these functions results in t/pmc/capture.t still passing, proof
that they are not being used.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1914>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets