Skip to content

Instantly share code, notes, and snippets.

@rurban
Created May 29, 2014 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rurban/dc54228fcb521009ff7d to your computer and use it in GitHub Desktop.
Save rurban/dc54228fcb521009ff7d to your computer and use it in GitHub Desktop.
parrot
diff --git src/pmc/integer.pmc src/pmc/integer.pmc
index e43e90b..3ca3679 100644
--- src/pmc/integer.pmc
+++ src/pmc/integer.pmc
@@ -417,17 +417,16 @@ Adds C<value> to C<SELF> inplace.
MULTI void i_add(Complex value) {
const INTVAL a = SELF.get_integer();
- UNUSED(a);
-
Parrot_pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
VTABLE_set_number_native(INTERP, SELF,
- SELF.get_integer() + VTABLE_get_number(INTERP, value));
+ a + VTABLE_get_number(INTERP, value));
}
MULTI void i_add(DEFAULT value) {
+ const INTVAL a = SELF.get_integer();
VTABLE_set_number_native(INTERP, SELF,
- SELF.get_integer() + VTABLE_get_number(INTERP, value));
+ a + VTABLE_get_number(INTERP, value));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment