1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-10-25 20:58:26 +03:00

Reduce the number of utf8->unicode conversions required in wince. Ticket #2122 (CVS 3542)

FossilOrigin-Name: 6d2ff0962dff0477fe2af0323032dc16337f42ab
This commit is contained in:
drh
2006-12-21 01:37:39 +00:00
parent 761df87ea5
commit c96d49892c
3 changed files with 14 additions and 11 deletions

View File

@@ -799,15 +799,18 @@ int sqlite3WinOpenExclusive(const char *zFilename, OsFile **pId, int delFlag){
}while( h==INVALID_HANDLE_VALUE && cnt++ < 2 && (Sleep(100), 1) );
#endif /* OS_WINCE */
}
#if OS_WINCE
if( delFlag && h!=INVALID_HANDLE_VALUE ){
f.zDeleteOnClose = zConverted;
zConverted = 0;
}
f.hMutex = NULL;
#endif
sqliteFree(zConverted);
if( h==INVALID_HANDLE_VALUE ){
return SQLITE_CANTOPEN;
}
f.h = h;
#if OS_WINCE
f.zDeleteOnClose = delFlag ? utf8ToUnicode(zFilename) : 0;
f.hMutex = NULL;
#endif
TRACE3("OPEN EX %d \"%s\"\n", h, zFilename);
return allocateWinFile(&f, pId);
}