gecko/mfbt/double-conversion/add-mfbt-api-markers.patch

95 lines
4.6 KiB
Diff
Raw Normal View History

diff --git a/mfbt/double-conversion/double-conversion.h b/mfbt/double-conversion/double-conversion.h
index f98edae..c62b16b 100644
--- a/mfbt/double-conversion/double-conversion.h
+++ b/mfbt/double-conversion/double-conversion.h
@@ -28,6 +28,7 @@
#ifndef DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_
#define DOUBLE_CONVERSION_DOUBLE_CONVERSION_H_
+#include "mozilla/Types.h"
#include "utils.h"
namespace double_conversion {
@@ -129,7 +130,7 @@ class DoubleToStringConverter {
}
// Returns a converter following the EcmaScript specification.
- static const DoubleToStringConverter& EcmaScriptConverter();
+ static MFBT_API const DoubleToStringConverter& EcmaScriptConverter();
// Computes the shortest string of digits that correctly represent the input
// number. Depending on decimal_in_shortest_low and decimal_in_shortest_high
@@ -197,7 +198,7 @@ class DoubleToStringConverter {
// The last two conditions imply that the result will never contain more than
// 1 + kMaxFixedDigitsBeforePoint + 1 + kMaxFixedDigitsAfterPoint characters
// (one additional character for the sign, and one for the decimal point).
- bool ToFixed(double value,
+ MFBT_API bool ToFixed(double value,
int requested_digits,
StringBuilder* result_builder) const;
@@ -229,7 +230,7 @@ class DoubleToStringConverter {
// kMaxExponentialDigits + 8 characters (the sign, the digit before the
// decimal point, the decimal point, the exponent character, the
// exponent's sign, and at most 3 exponent digits).
- bool ToExponential(double value,
+ MFBT_API bool ToExponential(double value,
int requested_digits,
StringBuilder* result_builder) const;
@@ -267,7 +268,7 @@ class DoubleToStringConverter {
// The last condition implies that the result will never contain more than
// kMaxPrecisionDigits + 7 characters (the sign, the decimal point, the
// exponent character, the exponent's sign, and at most 3 exponent digits).
- bool ToPrecision(double value,
+ MFBT_API bool ToPrecision(double value,
int precision,
StringBuilder* result_builder) const;
@@ -292,7 +293,7 @@ class DoubleToStringConverter {
// kBase10MaximalLength.
// Note that DoubleToAscii null-terminates its input. So the given buffer
// should be at least kBase10MaximalLength + 1 characters long.
- static const int kBase10MaximalLength = 17;
+ static const MFBT_DATA int kBase10MaximalLength = 17;
// Converts the given double 'v' to ascii. 'v' must not be NaN, +Infinity, or
// -Infinity. In SHORTEST_SINGLE-mode this restriction also applies to 'v'
@@ -332,7 +333,7 @@ class DoubleToStringConverter {
// terminating null-character when computing the maximal output size.
// The given length is only used in debug mode to ensure the buffer is big
// enough.
- static void DoubleToAscii(double v,
+ static MFBT_API void DoubleToAscii(double v,
DtoaMode mode,
int requested_digits,
char* buffer,
@@ -343,7 +344,7 @@ class DoubleToStringConverter {
private:
// Implementation for ToShortest and ToShortestSingle.
- bool ToShortestIeeeNumber(double value,
+ MFBT_API bool ToShortestIeeeNumber(double value,
StringBuilder* result_builder,
DtoaMode mode) const;
@@ -351,15 +352,15 @@ class DoubleToStringConverter {
// corresponding string using the configured infinity/nan-symbol.
// If either of them is NULL or the value is not special then the
// function returns false.
- bool HandleSpecialValues(double value, StringBuilder* result_builder) const;
+ MFBT_API bool HandleSpecialValues(double value, StringBuilder* result_builder) const;
// Constructs an exponential representation (i.e. 1.234e56).
// The given exponent assumes a decimal point after the first decimal digit.
- void CreateExponentialRepresentation(const char* decimal_digits,
+ MFBT_API void CreateExponentialRepresentation(const char* decimal_digits,
int length,
int exponent,
StringBuilder* result_builder) const;
// Creates a decimal representation (i.e 1234.5678).
- void CreateDecimalRepresentation(const char* decimal_digits,
+ MFBT_API void CreateDecimalRepresentation(const char* decimal_digits,
int length,
int decimal_point,
int digits_after_point,