diff options
author | danielk1977 <danielk1977@noemail.net> | 2007-05-16 17:28:43 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2007-05-16 17:28:43 +0000 |
commit | 1cc5ed815011e57e4da392759ae7150e644d30bf (patch) | |
tree | 9944c0adbc6f9a0a826ca4fd05ced57a203b5f56 /src/util.c | |
parent | 246ad31db651a75d5d26aadbf13fb07d476906e6 (diff) | |
download | sqlite-1cc5ed815011e57e4da392759ae7150e644d30bf.tar.gz sqlite-1cc5ed815011e57e4da392759ae7150e644d30bf.zip |
Change a few selected functions to macros to speed things up. (CVS 4015)
FossilOrigin-Name: 93f811ec747f6a42daf9ee27cd8b013f248552a1
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/util.c b/src/util.c index 8d942b068..031c07b68 100644 --- a/src/util.c +++ b/src/util.c @@ -14,7 +14,7 @@ ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** -** $Id: util.c,v 1.203 2007/05/15 16:51:37 drh Exp $ +** $Id: util.c,v 1.204 2007/05/16 17:28:43 danielk1977 Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -537,18 +537,11 @@ int sqlite3VarintLen(u64 v){ /* -** Read or write a two- and four-byte big-endian integer values. +** Read or write a four-byte big-endian integer value. */ -u32 sqlite3Get2byte(const u8 *p){ - return (p[0]<<8) | p[1]; -} u32 sqlite3Get4byte(const u8 *p){ return (p[0]<<24) | (p[1]<<16) | (p[2]<<8) | p[3]; } -void sqlite3Put2byte(unsigned char *p, u32 v){ - p[0] = v>>8; - p[1] = v; -} void sqlite3Put4byte(unsigned char *p, u32 v){ p[0] = v>>24; p[1] = v>>16; |