Merge recent enhancements from trunk.

FossilOrigin-Name: f6c9273cab877b8b6b327250195f3392393d060a
This commit is contained in:
drh
2015-12-16 19:47:54 +00:00
51 changed files with 1319 additions and 14802 deletions
+16
View File
@@ -173,6 +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_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.
@@ -2964,6 +2979,7 @@ struct StrAccum {
int nAlloc; /* Amount of space allocated in zText */
int mxAlloc; /* Maximum allowed allocation. 0 for no malloc usage */
u8 accError; /* STRACCUM_NOMEM or STRACCUM_TOOBIG */
u8 bMalloced; /* zText points to allocated space */
};
#define STRACCUM_NOMEM 1
#define STRACCUM_TOOBIG 2