Permalink
Browse files

moved some classes to SynTable to reduce the SynCommons size

- also circumvent some Delphi IDE unexpected hangups
  • Loading branch information...
Arnaud Bouchez
Arnaud Bouchez committed Aug 1, 2018
1 parent a71a5d9 commit dd5e00b89ba9f18a95c3e9eab1aa138da99a229f
Showing with 3,418 additions and 4,134 deletions.
  1. +1 −0 SQLite3/DDD/infra/dddInfraEmailer.pas
  2. +3 −3 SQLite3/mORMot.pas
  3. +1 −0 SQLite3/mORMotSQLite3.pas
  4. +2 −2 SynBidirSock.pas
  5. +2,225 −4,022 SynCommons.pas
  6. +1 −0 SynDBODBC.pas
  7. +1 −0 SynDBRemote.pas
  8. +1 −0 SynDBSQLite3.pas
  9. +4 −2 SynLZ.pas
  10. +1 −1 SynLog.pas
  11. +1 −0 SynOleDB.pas
  12. +1 −0 SynSM.pas
  13. +4 −3 SynSQLite3.pas
  14. +5 −5 SynSQLite3Static.pas
  15. +1,086 −15 SynTable.pas
  16. +80 −80 Synopse.inc
  17. +1 −1 SynopseCommit.inc
@@ -69,6 +69,7 @@ interface
SynTests,
SynCrtSock,
SynMustache,
SynTable,
SyncObjs,
mORMot,
mORMotDDD,
@@ -1268,8 +1268,8 @@
{$ifdef GSSAPIAUTH}
{$undef SSPIAUTH} // exclusive
{$ifdef NOGSSAPIAUTH}
{$undef GSSAPIAUTH} // force disable
{$undef DOMAINAUTH}
{$undef GSSAPIAUTH} // force disable
{$undef DOMAINAUTH}
{$else}
{$define DOMAINAUTH}
{$endif}
@@ -11652,7 +11652,7 @@ TInterfaceFactoryRTTI = class(TInterfaceFactory)
// - by default, fInvoke() will receive standard JSON content, unless
// ifoJsonAsExtended is set, and extended JSON is used
// - ifoDontStoreVoidJSON will ensure objects and records won't include
// default void fields in JSON serialization
// default void fields in JSON serialization
TInterfacedObjectFromFactoryOption = (ifoJsonAsExtended, ifoDontStoreVoidJSON);
/// defines how TInterfacedObjectFromFactory will perform its execution
TInterfacedObjectFromFactoryOptions = set of TInterfacedObjectFromFactoryOption;
@@ -276,6 +276,7 @@ interface
SynCommons,
SynLog,
SynSQLite3,
SynTable,
mORMot;

{.$define WITHUNSAFEBACKUP}
@@ -554,7 +554,7 @@ TWebSocketProtocolChat = class(TWebSocketProtocol)
procedure ProcessIncomingFrame(Sender: TWebSocketProcess;
var request: TWebSocketFrame; const info: RawUTF8); override;
public
/// initialize the chat protocol with an incoming frame callback
/// initialize the chat protocol with an incoming frame callback
constructor Create(const aName,aURI: RawUTF8;
const aOnIncomingFrame: TOnWebSocketProtocolChatIncomingFrame); overload;
/// compute a new instance of the WebSockets protocol, with same parameters
@@ -2679,7 +2679,7 @@ function TWebCrtSocketProcess.SendFrame(var Frame: TWebSocketFrame): boolean;
// huge payload sent outside TCrtSock buffers
if not fSocket.TrySndLow(@hdr,10+fMaskSentFrames shr 5) or
not fSocket.TrySndLow(pointer(Frame.payload),len) then
result := false;
result := false;
SetLastPingTicks(not result);
exit;
end;

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -103,6 +103,7 @@ interface
Classes,
SynCommons,
SynLog,
SynTable,
SynDB;


@@ -73,6 +73,7 @@ interface
{$endif}
SynCommons,
SynCrtSock,
SynTable,
SynDB;

{ -------------- HTTP Server classes for SynDB remote access }
@@ -119,6 +119,7 @@ interface
SynCommons,
SynLog,
SynSQLite3,
SynTable,
SynDB;

{ -------------- SQlite3 database engine native connection }
@@ -291,8 +291,8 @@ function SynLZdecompressdestlen(in_p: PAnsiChar): integer;

{$ifdef CPUINTEL}
// using direct x86 jmp also circumvents Internal Error C11715 for Delphi 5
function SynLZcompress1(src: PAnsiChar; size: integer; dst: PAnsiChar): integer;
{$ifdef CPUX86}
function SynLZcompress1(src: PAnsiChar; size: integer; dst: PAnsiChar): integer;
asm
push ebp
push ebx
@@ -461,6 +461,7 @@ function SynLZcompress1(src: PAnsiChar; size: integer; dst: PAnsiChar): integer;
pop ebx
pop ebp
{$else CPUX86}
function SynLZcompress1(src: PAnsiChar; size: integer; dst: PAnsiChar): integer;
var off: TOffsets;
cache: array[0..4095] of cardinal; // uses 32B+16KB=48KB on stack
asm // rcx=src, edx=size, r8=dest
@@ -821,9 +822,9 @@ function SynLZdecompress1b(src: PAnsiChar; size: integer; dst: PAnsiChar): integ
end;

{$ifdef CPUINTEL}
{$ifdef CPUX86}
// using direct x86 jmp also circumvents Internal Error C11715 for Delphi 5
function SynLZdecompress1(src: PAnsiChar; size: integer; dst: PAnsiChar): integer;
{$ifdef CPUX86}
asm
push ebp
push ebx
@@ -978,6 +979,7 @@ function SynLZdecompress1(src: PAnsiChar; size: integer; dst: PAnsiChar): intege
pop ebx
pop ebp
{$else CPUX86}
function SynLZdecompress1(src: PAnsiChar; size: integer; dst: PAnsiChar): integer;
var off: TOffsets;
asm // rcx=src, edx=size, r8=dest
{$ifndef win64} // Linux 64-bit ABI
@@ -3101,7 +3101,7 @@ function TSynLogFamily.CreateSynLog: TSynLog;
{$ifdef AUTOFLUSHRAWWIN}
var
AutoFlushThread: pointer;

procedure AutoFlushProc(P: pointer); stdcall;
function Terminated: boolean;
begin
@@ -132,6 +132,7 @@ interface
Contnrs,
SynCommons,
SynLog,
SynTable,
SynDB;


@@ -83,6 +83,7 @@ interface
SynCommons,
SynLog,
SynTests,
SynTable,
SynSMAPI;

const
@@ -222,6 +222,7 @@ interface
Contnrs,
{$endif}
SynCommons,
SynTable,
SynLog;


@@ -1271,8 +1272,8 @@ TSQLite3Library = class
// - can also decrypt a previously encrypted database (so that it is accessible
// from any version of SQLite) by specifying a nil key
// - Assigned(rekey)=false if encryption is not available, i.e. if
// NOSQLITE3STATIC is defined
// - also see ChangeSQLEncryptTablePassWord() procedure
// NOSQLITE3STATIC is defined
// - also see ChangeSQLEncryptTablePassWord() procedure
rekey: function(DB: TSQLite3DB; key: pointer; keyLen: Integer): integer; cdecl;

/// Destructor for the sqlite3 object, which handle is DB
@@ -2042,7 +2043,7 @@ TSQLite3Library = class
// - BufSize is the size of the buffer Data, which might be larger than DBSize
deserialize: function(DB: TSQLite3DB; Schema: PUTF8Char; Data: pointer;
DBSize, BufSize: Int64; Flags: integer): pointer; cdecl;

/// sets and/or queries the soft limit on the amount of heap memory
// that may be allocated by SQLite
// - SQLite strives to keep heap memory utilization below the soft heap limit
@@ -182,7 +182,7 @@ TSQLite3LibraryStatic = class(TSQLite3Library)
// cyphered format, which was much less safe (simple XOR on fixed tables), and
// was not working on any database size, making unclean patches to the official
// sqlite3.c amalgamation file, so is deprecated and unsupported any longer -
// see OldSQLEncryptTablePassWordToPlain() to convert your existing databases
// see OldSQLEncryptTablePassWordToPlain() to convert your existing databases
function ChangeSQLEncryptTablePassWord(const FileName: TFileName;
const OldPassWord, NewPassword: RawUTF8): boolean;

@@ -815,9 +815,9 @@ procedure CodeEncryptDecrypt(page: cardinal; data: PAnsiChar; len: integer;
aes^.DoBlocksOFB(iv.b,data+16,data+16,len-1);
if (data[21]=#64) and (data[22]=#32) and (data[23]=#32) then
PHash128(data)^ := SQLITE_FILE_HEADER128.b else
FillZero(PHash128(data)^); // report incorrect password
FillZero(PHash128(data)^); // report incorrect password
end else
FillZero(PHash128(data)^) else
FillZero(PHash128(data)^) else
aes^.DoBlocksOFB(iv.b,data,data,len);
end;

@@ -832,7 +832,7 @@ procedure CodecEncrypt(codec: pointer; page: integer; data: PAnsiChar; len, useW
procedure CodecDecrypt(codec: pointer; page: integer; data: PAnsiChar; len: integer); cdecl;
{$ifdef FPC}public name _PREFIX+'CodecDecrypt';{$endif} export;
begin
CodeEncryptDecrypt(page,data,len,CodecGetReadKey(codec),false);
CodeEncryptDecrypt(page,data,len,CodecGetReadKey(codec),false);
end;

procedure CodecTerm(codec: pointer); cdecl;
@@ -847,7 +847,7 @@ function ChangeSQLEncryptTablePassWord(const FileName: TFileName;
var F: THandle;
bufsize,page,pagesize,pagecount,n,p,read: cardinal;
head: THash256Rec;
buf: PAnsiChar;
buf: PAnsiChar;
temp: RawByteString;
size: TQWordRec;
posi: Int64;
Oops, something went wrong.

0 comments on commit dd5e00b

Please sign in to comment.