From: drh Date: Thu, 10 Dec 2015 17:59:50 +0000 (+0000) Subject: Move pointer range comparisons into a macro, where they can be dealt with in a more... X-Git-Tag: version-3.10.0~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34628b4b4fdcc7c9582d40fb8d2cd5e3c4256aa0;p=thirdparty%2Fsqlite.git Move pointer range comparisons into a macro, where they can be dealt with in a more portable way. FossilOrigin-Name: 05bc4f920ce23da48d1da6cd36a956fd6fd7c862 --- 34628b4b4fdcc7c9582d40fb8d2cd5e3c4256aa0 diff --cc manifest index cc0c4b013d,088aeff321..8e1978c412 --- a/manifest +++ b/manifest @@@ -1,5 -1,5 +1,5 @@@ - C Further\ssimplifications\sto\sthe\sVDBE\scode\sgeneration\slogic\sthat\sflow\sout\nof\sthe\sprevious\scheck-in. - D 2015-12-09T17:23:12.345 -C Move\spointer\srange\scomparisons\sinto\sa\smacro,\swhere\sthey\scan\sbe\sdealt\swith\nin\sa\smore\sportable\sway. -D 2015-12-10T15:09:17.462 ++C Move\spointer\srange\scomparisons\sinto\sa\smacro,\swhere\sthey\scan\sbe\sdealt\swith\sin\sa\smore\sportable\sway. ++D 2015-12-10T17:59:50.898 F Makefile.in 28bcd6149e050dff35d4dcfd97e890cd387a499d F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc e8fdca1cb89a1b58b5f4d3a130ea9a3d28cb314d @@@ -344,7 -344,7 +344,7 @@@ F src/shell.c abbc74ea43dbf2f306ea18282 F src/sqlite.h.in 1248a78548024bdc8ef5893faa0ff9552b4cceb4 F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad F src/sqlite3ext.h dfbe62ffd95b99afe2140d8c35b180d11924072d - F src/sqliteInt.h 5caacf37a776f9d6178e519cb0b5248ca22a3828 -F src/sqliteInt.h d9b64d12231789a5fae72e380da5544ad1a34d9f ++F src/sqliteInt.h beb4a63b94428f52a3d7c7af2ba8bdc7d4682a03 F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46 F src/status.c 70912d7be68e9e2dbc4010c93d344af61d4c59ba F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e @@@ -1408,7 -1408,7 +1408,8 @@@ F tool/vdbe_profile.tcl 246d0da094856d7 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f - P 8021b4c8139ba56d6b1e2e26aeec4f9bf77f37c9 - R 9fa6094a1e8a72da130ce9bebe3afcb3 -P 6a5dfe85b519b920ce8c842057767a8793d92236 -R a58d43459fedbad83f2fea42e9df49aa ++P 6a5dfe85b519b920ce8c842057767a8793d92236 ad3124c834b080aaaf24934d6f08b3601ac3ae53 ++R 75f5679e87cfa35a03ab3e382e1e81d9 ++T +closed ad3124c834b080aaaf24934d6f08b3601ac3ae53 U drh - Z e514ce3bd686c655a7118cedbf26535f -Z 0494ab55e74ae33c389abc3bd2b83951 ++Z de945a489cd52e6561e642ec19b99047 diff --cc manifest.uuid index 01a18cf6eb,2355d75154..5ee896243f --- a/manifest.uuid +++ b/manifest.uuid @@@ -1,1 -1,1 +1,1 @@@ - 6a5dfe85b519b920ce8c842057767a8793d92236 -ad3124c834b080aaaf24934d6f08b3601ac3ae53 ++05bc4f920ce23da48d1da6cd36a956fd6fd7c862 diff --cc src/sqliteInt.h index 0d477dc06f,1f94bad7e6..4249ef768a --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@@ -173,6 -173,21 +173,21 @@@ # define SQLITE_PTR_TO_INT(X) ((int)(X)) #endif + /* + ** The SQLITE_WITHIN(P,S,E) macro checks to see if pointer P points to + ** something between S (inclusive) and E (exclusive). + ** + ** In other words, S is a buffer and E is a pointer to the first byte after + ** the end of buffer S. This macro returns true if P points to something + ** contained within the buffer S. + */ + #if defined(HAVE_STDINT_H) + # define SQLITE_WITHIN(P,S,E) \ - ((uintptr_t)(P)>=(uintptr_h)(S) && (uintptr_t)(P)<(uintptr_t)(E)) ++ ((uintptr_t)(P)>=(uintptr_t)(S) && (uintptr_t)(P)<(uintptr_t)(E)) + #else + # define SQLITE_WITHIN(P,S,E) ((P)>=(S) && (P)<(E)) + #endif + /* ** A macro to hint to the compiler that a function should not be ** inlined.