Ticket #1914 (closed RFC: fixed)
Dead code in src/pmc/Capture.pmc
| Reported by: | DavidCzech | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | core | Version: | master |
| Severity: | low | Keywords: | pmc |
| Cc: | Language: | ||
| Patch status: | Platform: |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.
