Skip to content

Commit

Permalink
Add new getprop variant and deprecate old one. Part of #351
Browse files Browse the repository at this point in the history
  • Loading branch information
bacek committed Mar 4, 2012
1 parent c7f99d7 commit 4a482c7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/ops/pmc.ops
Expand Up @@ -493,12 +493,23 @@ op setprop(invar PMC, in STR, invar PMC) {

Get property $2 of PMC $3 and put it in $1.

Deprecated.

=item B<getprop>(out PMC, invar PMC, in STR)

Get property $3 of PMC $2 and put it in $1.

=cut

op getprop(out PMC, in STR, invar PMC) {
op getprop(out PMC, in STR, invar PMC) :deprecated {
Parrot_warn_deprecated(interp, "getprop_p_s_p is deprecated. Use getprop_p_p_s instead");
$1 = Parrot_pmc_getprop(interp, $3, $2);
}

op getprop(out PMC, invar PMC, in STR) {
$1 = Parrot_pmc_getprop(interp, $2, $3);
}

########################################

=item B<delprop>(invar PMC, in STR)
Expand Down

0 comments on commit 4a482c7

Please sign in to comment.