Compare commits
2 commits
master
...
remove-big
Author | SHA1 | Date | |
---|---|---|---|
|
15ea77ded5 | ||
|
89f667fe6e |
8 changed files with 2 additions and 45 deletions
|
@ -406,7 +406,6 @@ opts.AddVariables(
|
||||||
BoolVariable('SVG2PNG', 'Compile and install a utility to generate render an svg file to a png on the command line', 'False'),
|
BoolVariable('SVG2PNG', 'Compile and install a utility to generate render an svg file to a png on the command line', 'False'),
|
||||||
BoolVariable('MAPNIK_RENDER', 'Compile and install a utility to render a map to an image', 'True'),
|
BoolVariable('MAPNIK_RENDER', 'Compile and install a utility to render a map to an image', 'True'),
|
||||||
BoolVariable('COLOR_PRINT', 'Print build status information in color', 'True'),
|
BoolVariable('COLOR_PRINT', 'Print build status information in color', 'True'),
|
||||||
BoolVariable('BIGINT', 'Compile support for 64-bit integers in mapnik::value', 'True'),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# variables to pickle after successful configure step
|
# variables to pickle after successful configure step
|
||||||
|
@ -471,7 +470,6 @@ pickle_store = [# Scons internal variables
|
||||||
'SVG_RENDERER',
|
'SVG_RENDERER',
|
||||||
'SQLITE_LINKFLAGS',
|
'SQLITE_LINKFLAGS',
|
||||||
'BOOST_LIB_VERSION_FROM_HEADER',
|
'BOOST_LIB_VERSION_FROM_HEADER',
|
||||||
'BIGINT',
|
|
||||||
'HOST'
|
'HOST'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1379,9 +1377,6 @@ if not preconfigured:
|
||||||
if not conf.harfbuzz_with_freetype_support():
|
if not conf.harfbuzz_with_freetype_support():
|
||||||
env['MISSING_DEPS'].append('harfbuzz-with-freetype-support')
|
env['MISSING_DEPS'].append('harfbuzz-with-freetype-support')
|
||||||
|
|
||||||
if env['BIGINT']:
|
|
||||||
env.Append(CPPDEFINES = '-DBIGINT')
|
|
||||||
|
|
||||||
if env['THREADING'] == 'multi':
|
if env['THREADING'] == 'multi':
|
||||||
thread_flag = thread_suffix
|
thread_flag = thread_suffix
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -32,11 +32,7 @@
|
||||||
|
|
||||||
namespace mapnik {
|
namespace mapnik {
|
||||||
|
|
||||||
#ifdef BIGINT
|
|
||||||
using grid_renderer_base_type = agg::renderer_base<mapnik::pixfmt_gray64>;
|
using grid_renderer_base_type = agg::renderer_base<mapnik::pixfmt_gray64>;
|
||||||
#else
|
|
||||||
using grid_renderer_base_type = agg::renderer_base<mapnik::pixfmt_gray32>;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,10 +45,8 @@ MAPNIK_DECL bool string2bool(const char * iter, const char * end, bool & result)
|
||||||
MAPNIK_DECL bool string2int(std::string const& value, int & result);
|
MAPNIK_DECL bool string2int(std::string const& value, int & result);
|
||||||
MAPNIK_DECL bool string2int(const char * iter, const char * end, int & result);
|
MAPNIK_DECL bool string2int(const char * iter, const char * end, int & result);
|
||||||
|
|
||||||
#ifdef BIGINT
|
|
||||||
MAPNIK_DECL bool string2int(std::string const& value, mapnik::value_integer & result);
|
MAPNIK_DECL bool string2int(std::string const& value, mapnik::value_integer & result);
|
||||||
MAPNIK_DECL bool string2int(const char * iter, const char * end, mapnik::value_integer & result);
|
MAPNIK_DECL bool string2int(const char * iter, const char * end, mapnik::value_integer & result);
|
||||||
#endif
|
|
||||||
|
|
||||||
MAPNIK_DECL bool string2double(std::string const& value, double & result);
|
MAPNIK_DECL bool string2double(std::string const& value, double & result);
|
||||||
MAPNIK_DECL bool string2double(const char * iter, const char * end, double & result);
|
MAPNIK_DECL bool string2double(const char * iter, const char * end, double & result);
|
||||||
|
@ -57,9 +55,7 @@ MAPNIK_DECL bool string2float(std::string const& value, float & result);
|
||||||
MAPNIK_DECL bool string2float(const char * iter, const char * end, float & result);
|
MAPNIK_DECL bool string2float(const char * iter, const char * end, float & result);
|
||||||
|
|
||||||
MAPNIK_DECL bool to_string(std::string & str, int value);
|
MAPNIK_DECL bool to_string(std::string & str, int value);
|
||||||
#ifdef BIGINT
|
|
||||||
MAPNIK_DECL bool to_string(std::string & str, mapnik::value_integer value);
|
MAPNIK_DECL bool to_string(std::string & str, mapnik::value_integer value);
|
||||||
#endif
|
|
||||||
MAPNIK_DECL bool to_string(std::string & str, unsigned value);
|
MAPNIK_DECL bool to_string(std::string & str, unsigned value);
|
||||||
MAPNIK_DECL bool to_string(std::string & str, bool value);
|
MAPNIK_DECL bool to_string(std::string & str, bool value);
|
||||||
MAPNIK_DECL bool to_string(std::string & str, double value);
|
MAPNIK_DECL bool to_string(std::string & str, double value);
|
||||||
|
|
|
@ -44,16 +44,8 @@ namespace U_ICU_NAMESPACE {
|
||||||
|
|
||||||
namespace mapnik {
|
namespace mapnik {
|
||||||
|
|
||||||
#ifdef BIGINT
|
|
||||||
//using value_integer = boost::long_long_type;
|
|
||||||
//using value_integer = long long;
|
|
||||||
using value_integer = std::int64_t;
|
using value_integer = std::int64_t;
|
||||||
using value_integer_pixel = gray64s_t;
|
using value_integer_pixel = gray64s_t;
|
||||||
#else
|
|
||||||
//using value_integer = int;
|
|
||||||
using value_integer = std::int32_t;
|
|
||||||
using value_integer_pixel = gray32s_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using value_double = double;
|
using value_double = double;
|
||||||
using value_unicode_string = U_NAMESPACE_QUALIFIER UnicodeString;
|
using value_unicode_string = U_NAMESPACE_QUALIFIER UnicodeString;
|
||||||
|
|
|
@ -100,8 +100,7 @@ struct do_xml_attribute_cast<int>
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef BIGINT
|
// specialization for mapnik::value_integer
|
||||||
// specialization for long long
|
|
||||||
template <>
|
template <>
|
||||||
struct do_xml_attribute_cast<mapnik::value_integer>
|
struct do_xml_attribute_cast<mapnik::value_integer>
|
||||||
{
|
{
|
||||||
|
@ -114,8 +113,6 @@ struct do_xml_attribute_cast<mapnik::value_integer>
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// specialization for unsigned
|
// specialization for unsigned
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
|
|
@ -49,9 +49,7 @@ namespace util {
|
||||||
using namespace boost::spirit;
|
using namespace boost::spirit;
|
||||||
|
|
||||||
auto INTEGER = qi::int_type();
|
auto INTEGER = qi::int_type();
|
||||||
#ifdef BIGINT
|
|
||||||
auto LONGLONG = qi::long_long_type();
|
auto LONGLONG = qi::long_long_type();
|
||||||
#endif
|
|
||||||
auto FLOAT = qi::float_type();
|
auto FLOAT = qi::float_type();
|
||||||
auto DOUBLE = qi::double_type();
|
auto DOUBLE = qi::double_type();
|
||||||
|
|
||||||
|
@ -98,7 +96,6 @@ bool string2int(std::string const& value, int & result)
|
||||||
return r && (str_beg == str_end);
|
return r && (str_beg == str_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BIGINT
|
|
||||||
bool string2int(const char * iter, const char * end, mapnik::value_integer & result)
|
bool string2int(const char * iter, const char * end, mapnik::value_integer & result)
|
||||||
{
|
{
|
||||||
ascii::space_type space;
|
ascii::space_type space;
|
||||||
|
@ -114,7 +111,6 @@ bool string2int(std::string const& value, mapnik::value_integer & result)
|
||||||
bool r = qi::phrase_parse(str_beg,str_end,LONGLONG,space,result);
|
bool r = qi::phrase_parse(str_beg,str_end,LONGLONG,space,result);
|
||||||
return r && (str_beg == str_end);
|
return r && (str_beg == str_end);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
bool string2double(std::string const& value, double & result)
|
bool string2double(std::string const& value, double & result)
|
||||||
{
|
{
|
||||||
|
@ -175,14 +171,12 @@ bool to_string(std::string & str, int value)
|
||||||
return karma::generate(sink, value);
|
return karma::generate(sink, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BIGINT
|
|
||||||
bool to_string(std::string & str, mapnik::value_integer value)
|
bool to_string(std::string & str, mapnik::value_integer value)
|
||||||
{
|
{
|
||||||
namespace karma = boost::spirit::karma;
|
namespace karma = boost::spirit::karma;
|
||||||
std::back_insert_iterator<std::string> sink(str);
|
std::back_insert_iterator<std::string> sink(str);
|
||||||
return karma::generate(sink, value);
|
return karma::generate(sink, value);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
bool to_string(std::string & str, unsigned value)
|
bool to_string(std::string & str, unsigned value)
|
||||||
{
|
{
|
||||||
|
@ -216,7 +210,6 @@ bool to_string(std::string & s, int val)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BIGINT
|
|
||||||
bool to_string(std::string & s, mapnik::value_integer val)
|
bool to_string(std::string & s, mapnik::value_integer val)
|
||||||
{
|
{
|
||||||
s.resize(s.capacity());
|
s.resize(s.capacity());
|
||||||
|
@ -232,7 +225,6 @@ bool to_string(std::string & s, mapnik::value_integer val)
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
bool to_string(std::string & s, unsigned val)
|
bool to_string(std::string & s, unsigned val)
|
||||||
{
|
{
|
||||||
|
|
|
@ -71,9 +71,7 @@ DEFINE_NAME_TRAIT( unsigned, "unsigned")
|
||||||
DEFINE_NAME_TRAIT( int, "int")
|
DEFINE_NAME_TRAIT( int, "int")
|
||||||
DEFINE_NAME_TRAIT( bool, "bool")
|
DEFINE_NAME_TRAIT( bool, "bool")
|
||||||
DEFINE_NAME_TRAIT( boolean_type, "boolean_type")
|
DEFINE_NAME_TRAIT( boolean_type, "boolean_type")
|
||||||
#ifdef BIGINT
|
|
||||||
DEFINE_NAME_TRAIT( mapnik::value_integer, "long long" )
|
DEFINE_NAME_TRAIT( mapnik::value_integer, "long long" )
|
||||||
#endif
|
|
||||||
DEFINE_NAME_TRAIT( std::string, "string" )
|
DEFINE_NAME_TRAIT( std::string, "string" )
|
||||||
DEFINE_NAME_TRAIT( color, "color" )
|
DEFINE_NAME_TRAIT( color, "color" )
|
||||||
DEFINE_NAME_TRAIT( expression_ptr, "expression_ptr" )
|
DEFINE_NAME_TRAIT( expression_ptr, "expression_ptr" )
|
||||||
|
@ -416,9 +414,7 @@ compile_get_opt_attr(mapnik::value_bool);
|
||||||
compile_get_opt_attr(std::string);
|
compile_get_opt_attr(std::string);
|
||||||
compile_get_opt_attr(int);
|
compile_get_opt_attr(int);
|
||||||
compile_get_opt_attr(unsigned);
|
compile_get_opt_attr(unsigned);
|
||||||
#ifdef BIGINT
|
|
||||||
compile_get_opt_attr(mapnik::value_integer);
|
compile_get_opt_attr(mapnik::value_integer);
|
||||||
#endif
|
|
||||||
compile_get_opt_attr(float);
|
compile_get_opt_attr(float);
|
||||||
compile_get_opt_attr(double);
|
compile_get_opt_attr(double);
|
||||||
compile_get_opt_attr(color);
|
compile_get_opt_attr(color);
|
||||||
|
|
|
@ -249,7 +249,6 @@ SECTION("to string") {
|
||||||
REQUIRE( out == "4294967295" );
|
REQUIRE( out == "4294967295" );
|
||||||
out.clear();
|
out.clear();
|
||||||
|
|
||||||
#ifdef BIGINT
|
|
||||||
// long long
|
// long long
|
||||||
to_string(out,mapnik::value_integer(-0));
|
to_string(out,mapnik::value_integer(-0));
|
||||||
REQUIRE( out == "0" );
|
REQUIRE( out == "0" );
|
||||||
|
@ -262,13 +261,7 @@ SECTION("to string") {
|
||||||
to_string(out,mapnik::value_integer(9223372036854775807));
|
to_string(out,mapnik::value_integer(9223372036854775807));
|
||||||
REQUIRE( out == "9223372036854775807" );
|
REQUIRE( out == "9223372036854775807" );
|
||||||
out.clear();
|
out.clear();
|
||||||
#else
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma NOTE("BIGINT not defined so skipping large number conversion tests")
|
|
||||||
#else
|
|
||||||
#warning BIGINT not defined so skipping large number conversion tests
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
// bool
|
// bool
|
||||||
to_string(out, true);
|
to_string(out, true);
|
||||||
REQUIRE( out == "true" );
|
REQUIRE( out == "true" );
|
||||||
|
|
Loading…
Reference in a new issue