MCPcopy Create free account
hub / github.com/audacity/audacity / dbdataGetVarint

Function dbdataGetVarint

lib-src/sqlite/shell.c:10701–10711  ·  view source on GitHub ↗

** Read a varint. Put the value in *pVal and return the number of bytes. */

Source from the content-addressed store, hash-verified

10699** Read a varint. Put the value in *pVal and return the number of bytes.
10700*/
10701static int dbdataGetVarint(const u8 *z, sqlite3_int64 *pVal){
10702 sqlite3_int64 v = 0;
10703 int i;
10704 for(i=0; i<8; i++){
10705 v = (v<<7) + (z[i]&0x7f);
10706 if( (z[i]&0x80)==0 ){ *pVal = v; return i+1; }
10707 }
10708 v = (v<<8) + (z[i]&0xff);
10709 *pVal = v;
10710 return 9;
10711}
10712
10713/*
10714** Return the number of bytes of space used by an SQLite value of type

Callers 2

dbdataNextFunction · 0.85
dbdataColumnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected