void factor_vm::primitive_bignum_less() {
POP_BIGNUMS(x, y);
- ctx->replace(tag_boolean(bignum_compare(x, y) == bignum_comparison_less));
+ ctx->replace(tag_boolean(bignum_compare(x, y) == BIGNUM_COMPARISON_LESS));
}
void factor_vm::primitive_bignum_lesseq() {
POP_BIGNUMS(x, y);
- ctx->replace(tag_boolean(bignum_compare(x, y) != bignum_comparison_greater));
+ ctx->replace(tag_boolean(bignum_compare(x, y) != BIGNUM_COMPARISON_GREATER));
}
void factor_vm::primitive_bignum_greater() {
POP_BIGNUMS(x, y);
- ctx->replace(tag_boolean(bignum_compare(x, y) == bignum_comparison_greater));
+ ctx->replace(tag_boolean(bignum_compare(x, y) == BIGNUM_COMPARISON_GREATER));
}
void factor_vm::primitive_bignum_greatereq() {
POP_BIGNUMS(x, y);
- ctx->replace(tag_boolean(bignum_compare(x, y) != bignum_comparison_less));
+ ctx->replace(tag_boolean(bignum_compare(x, y) != BIGNUM_COMPARISON_LESS));
}
void factor_vm::primitive_bignum_not() {
try {
localized_stream.imbue(std::locale(locale));
} catch (const runtime_error&) {
- byte_array* array = allot_byte_array(1);
- array->data<char>()[0] = '\0';
+ byte_array* array = allot_byte_array(0);
ctx->replace(tag<byte_array>(array));
return;
}
localized_stream << std::setfill(fill[0]);
}
if (width >= 0) {
- localized_stream << std::setw(width);
+ localized_stream << std::setw(static_cast<int>(width));
}
if (precision >= 0) {
- localized_stream << std::setprecision(precision);
+ localized_stream << std::setprecision(static_cast<int>(precision));
}
localized_stream << value;
const std::string& tmp = localized_stream.str();
const char* cstr = tmp.c_str();
- size_t size = tmp.length()+1;
+ size_t size = tmp.length();
byte_array* array = allot_byte_array(size);
memcpy(array->data<char>(), cstr, size);
ctx->replace(tag<byte_array>(array));