Skip to content

Commit

Permalink
Add OpCode.get_number to simplify usage from nqp.
Browse files Browse the repository at this point in the history
  • Loading branch information
bacek committed Mar 20, 2011
1 parent 85e4ffe commit b600dfe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pmc/opcode.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ pmclass Opcode auto_attrs {
return attrs->op_number;
}

VTABLE FLOATVAL get_number() {
STATICSELF.get_integer();
}

VTABLE void set_integer_native(INTVAL value) {
Parrot_Opcode_attributes * const attrs = PARROT_OPCODE(SELF);
if (attrs->info)
Expand Down

0 comments on commit b600dfe

Please sign in to comment.