Ticket #452: integer_nommd_is_equal.patch
File integer_nommd_is_equal.patch, 1.2 KB (added by cotto, 13 years ago) 


src/pmc/integer.pmc
1149 1149 1150 1150 */ 1151 1151 1152 MULTI INTVAL is_equal(BigInt value) { 1153 PMC * const temp = pmc_new(INTERP, enum_class_BigInt); 1154 VTABLE_set_integer_native(INTERP, temp, SELF.get_integer()); 1155 return Parrot_BigInt_multi_is_equal_BigInt(INTERP, temp, value); 1156 } 1152 VTABLE INTVAL is_equal(PMC *value) { 1153 PMC *temp; 1157 1154 1158 1159 MULTI INTVAL is_equal(DEFAULT value) { 1160 return (VTABLE_get_integer(INTERP, SELF) 1161 == VTABLE_get_integer(INTERP, value)); 1155 switch (value>vtable>base_type) { 1156 case enum_class_BigInt: 1157 temp = pmc_new(INTERP, enum_class_BigInt); 1158 VTABLE_set_integer_native(INTERP, temp, SELF.get_integer()); 1159 return Parrot_BigInt_multi_is_equal_BigInt(INTERP, temp, value); 1160 break; 1161 default: 1162 return (VTABLE_get_integer(INTERP, SELF) 1163 == VTABLE_get_integer(INTERP, value)); 1164 break; 1165 } 1162 1166 } 1163 1167 1164 1168