diff options
author | drh <drh@noemail.net> | 2008-07-14 12:30:54 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-07-14 12:30:54 +0000 |
commit | c376a19890768f63842f4853f5c84bf9c9328b7e (patch) | |
tree | 44be81e065e220146ccbfc85c38f3226ade5ff0e /src/malloc.c | |
parent | 34ff57b12f7f71e101d3aaf0c193179cc0035cb5 (diff) | |
download | sqlite-c376a19890768f63842f4853f5c84bf9c9328b7e.tar.gz sqlite-c376a19890768f63842f4853f5c84bf9c9328b7e.zip |
Work around a bug in Borland C. Ticket #3216. (CVS 5406)
FossilOrigin-Name: 2c24e50da6f6c19dee105823125157db73bdd515
Diffstat (limited to 'src/malloc.c')
-rw-r--r-- | src/malloc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/malloc.c b/src/malloc.c index 351a38ce3..ed2bbb383 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -12,7 +12,7 @@ ** ** Memory allocation functions used throughout sqlite. ** -** $Id: malloc.c,v 1.26 2008/07/08 19:34:07 drh Exp $ +** $Id: malloc.c,v 1.27 2008/07/14 12:30:54 drh Exp $ */ #include "sqliteInt.h" #include <stdarg.h> @@ -150,8 +150,10 @@ void sqlite3MallocEnd(void){ */ sqlite3_int64 sqlite3_memory_used(void){ int n, mx; + sqlite3_int64 res; sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, 0); - return (sqlite3_int64)n; + res = (sqlite3_int64)n; /* Work around bug in Borland C. Ticket #3216 */ + return res; } /* @@ -161,8 +163,10 @@ sqlite3_int64 sqlite3_memory_used(void){ */ sqlite3_int64 sqlite3_memory_highwater(int resetFlag){ int n, mx; + sqlite3_int64 res; sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, resetFlag); - return (sqlite3_int64)mx; + res = (sqlite3_int64)n; /* Work around bug in Borland C. Ticket #3216 */ + return res; } /* |