diff options
author | drh <drh@noemail.net> | 2012-04-02 21:35:42 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2012-04-02 21:35:42 +0000 |
commit | f439fbdab56a0db179c15e224e346136ff8cacd3 (patch) | |
tree | f12f457e62df1f513773e6dcd9c50224ab7f033e /src | |
parent | 3b06a2a0564a74c251f1d2505869f4c09bbf6488 (diff) | |
download | sqlite-f439fbdab56a0db179c15e224e346136ff8cacd3.tar.gz sqlite-f439fbdab56a0db179c15e224e346136ff8cacd3.zip |
The SQLITE_RTREE_INT_ONLY compile-time option causes the RTree extension
to use only integer math and store only integer coordinates.
FossilOrigin-Name: 02b7640f5118e0a635b68f65765191bb3171b7bd
Diffstat (limited to 'src')
-rw-r--r-- | src/test_config.c | 6 | ||||
-rw-r--r-- | src/test_rtree.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/test_config.c b/src/test_config.c index 18442a49e..f096ebf23 100644 --- a/src/test_config.c +++ b/src/test_config.c @@ -420,6 +420,12 @@ Tcl_SetVar2(interp, "sqlite_options", "long_double", Tcl_SetVar2(interp, "sqlite_options", "rtree", "0", TCL_GLOBAL_ONLY); #endif +#ifdef SQLITE_RTREE_INT_ONLY + Tcl_SetVar2(interp, "sqlite_options", "rtree_int_only", "1", TCL_GLOBAL_ONLY); +#else + Tcl_SetVar2(interp, "sqlite_options", "rtree_int_only", "0", TCL_GLOBAL_ONLY); +#endif + #ifdef SQLITE_OMIT_SCHEMA_PRAGMAS Tcl_SetVar2(interp, "sqlite_options", "schema_pragmas", "0", TCL_GLOBAL_ONLY); #else diff --git a/src/test_rtree.c b/src/test_rtree.c index 9745b0054..d3c9e0cb3 100644 --- a/src/test_rtree.c +++ b/src/test_rtree.c @@ -49,7 +49,11 @@ static void circle_del(void *p){ static int circle_geom( sqlite3_rtree_geometry *p, int nCoord, +#ifdef SQLITE_RTREE_INT_ONLY + sqlite3_int64 *aCoord, +#else double *aCoord, +#endif int *pRes ){ int i; /* Iterator variable */ @@ -188,8 +192,12 @@ static int gHere = 42; */ static int cube_geom( sqlite3_rtree_geometry *p, - int nCoord, + int nCoord, +#ifdef SQLITE_RTREE_INT_ONLY + sqlite3_int64 *aCoord, +#else double *aCoord, +#endif int *piRes ){ Cube *pCube = (Cube *)p->pUser; |