]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Move pointer range comparisons into a macro, where they can be dealt with in a more...
authordrh <drh@noemail.net>
Thu, 10 Dec 2015 17:59:50 +0000 (17:59 +0000)
committerdrh <drh@noemail.net>
Thu, 10 Dec 2015 17:59:50 +0000 (17:59 +0000)
FossilOrigin-Name: 05bc4f920ce23da48d1da6cd36a956fd6fd7c862

1  2 
manifest
manifest.uuid
src/sqliteInt.h

diff --cc manifest
index cc0c4b013dd33f47129e378d97598714ea7acfbf,088aeff3218eb52f38cf63abbc147f53a9674575..8e1978c4125c550293321e4669bc5e53339bc729
+++ 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 01a18cf6ebdae292b57a809fce4d701abbc08b11,2355d75154cbdef28741fc73074ddb001f49f7c9..5ee896243fbdb9ca9a8690caa827eed24f6d3e07
@@@ -1,1 -1,1 +1,1 @@@
- 6a5dfe85b519b920ce8c842057767a8793d92236
 -ad3124c834b080aaaf24934d6f08b3601ac3ae53
++05bc4f920ce23da48d1da6cd36a956fd6fd7c862
diff --cc src/sqliteInt.h
index 0d477dc06f86799c8f9c21897130f1a35cad500b,1f94bad7e60cf7f80d7130f79d18cdee7b2286ca..4249ef768a57e7c9741be870fca085ca9e61af69
  # define SQLITE_PTR_TO_INT(X)  ((int)(X))
  #endif
  
 -    ((uintptr_t)(P)>=(uintptr_h)(S) && (uintptr_t)(P)<(uintptr_t)(E))
+ /*
+ ** 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_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.