1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Merge trunk into wasm-session-api branch.

FossilOrigin-Name: 7f8f1acd82be7dc2eb2147d96299b1b443e86774dfe0b0a8d32669a0500fc9c6
This commit is contained in:
stephan
2022-12-25 14:13:52 +00:00
9 changed files with 670 additions and 409 deletions

View File

@ -329,11 +329,13 @@ SQLITE_WASM_KEEP int sqlite3_wasm_pstack_quota(void){
*/
SQLITE_WASM_KEEP
int sqlite3_wasm_db_error(sqlite3*db, int err_code, const char *zMsg){
if( 0!=zMsg ){
const int nMsg = sqlite3Strlen30(zMsg);
sqlite3ErrorWithMsg(db, err_code, "%.*s", nMsg, zMsg);
}else{
sqlite3ErrorWithMsg(db, err_code, NULL);
if( db!=0 ){
if( 0!=zMsg ){
const int nMsg = sqlite3Strlen30(zMsg);
sqlite3ErrorWithMsg(db, err_code, "%.*s", nMsg, zMsg);
}else{
sqlite3ErrorWithMsg(db, err_code, NULL);
}
}
return err_code;
}
@ -1648,6 +1650,11 @@ int sqlite3_wasm_test_intptr(int * p){
return *p = *p * 2;
}
SQLITE_WASM_KEEP
void * sqlite3_wasm_test_voidptr(void * p){
return p;
}
SQLITE_WASM_KEEP
int64_t sqlite3_wasm_test_int64_max(void){
return (int64_t)0x7fffffffffffffff;