Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Comment: | fixed compilation issue on newer Delphi versions |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
4f4c1de9a2441eb04532c3a2dcaa87a0 |
User & Date: | abouchez 2013-05-23 06:39:47 |
Original Comment: |
|
2013-05-23
| ||
06:54 | faster PosEx() function in pure pascal mode (based on Avatar Zondertau work) - latest commit did not include the modification :) check-in: 31787b3495 user: abouchez tags: trunk | |
06:39 | fixed compilation issue on newer Delphi versions check-in: 4f4c1de9a2 user: abouchez tags: trunk | |
2013-05-22
| ||
14:02 |
| |
Changes to SQLite3/mORMot.pas.
28748 28749 28750 28751 28752 28753 28754 28755 28756 28757 28758 28759 28760 28761 28762 28763 28764 28765 28766 28767 28768 28769 28770 28771 28772 |
procedure TSQLRecordProperties.RegisterCustomFixedSizeRecordProperty( aTable: TClass; aRecordSize: cardinal; const aName: RawUTF8; aPropertyPointer: pointer; aAttributes: TSQLPropInfoAttributes=[]; aFieldWidth: integer=0; aData2Text: TOnSQLPropInfoRecord2Text=nil; aText2Data: TOnSQLPropInfoRecord2Data=nil); begin Fields.Add(aTable,TSQLPropInfoRecordFixedSize.Create(aRecordSize,aName,Fields.Count, aPropertyPointer,aAttributes,aFieldWidth,aData2Text,aText2Data),); end; procedure TSQLRecordProperties.RegisterCustomRTTIRecordProperty(aTable: TClass; aRecordInfo: PTypeInfo; const aName: RawUTF8; aPropertyPointer: pointer; aAttributes: TSQLPropInfoAttributes=[]; aFieldWidth: integer=0; aData2Text: TOnSQLPropInfoRecord2Text=nil; aText2Data: TOnSQLPropInfoRecord2Data=nil); begin Fields.Add(aTable,TSQLPropInfoRecordRTTI.Create(aRecordInfo,aName,Fields.Count, aPropertyPointer,aAttributes,aFieldWidth,aData2Text,aText2Data),); end; { TSynValidateUniqueField } function TSynValidateUniqueField.Process(aFieldIndex: integer; const Value: RawUTF8; var ErrorMsg: string): boolean; |
| | |
28748 28749 28750 28751 28752 28753 28754 28755 28756 28757 28758 28759 28760 28761 28762 28763 28764 28765 28766 28767 28768 28769 28770 28771 28772 |
procedure TSQLRecordProperties.RegisterCustomFixedSizeRecordProperty( aTable: TClass; aRecordSize: cardinal; const aName: RawUTF8; aPropertyPointer: pointer; aAttributes: TSQLPropInfoAttributes=[]; aFieldWidth: integer=0; aData2Text: TOnSQLPropInfoRecord2Text=nil; aText2Data: TOnSQLPropInfoRecord2Data=nil); begin Fields.Add(aTable,TSQLPropInfoRecordFixedSize.Create(aRecordSize,aName,Fields.Count, aPropertyPointer,aAttributes,aFieldWidth,aData2Text,aText2Data)); end; procedure TSQLRecordProperties.RegisterCustomRTTIRecordProperty(aTable: TClass; aRecordInfo: PTypeInfo; const aName: RawUTF8; aPropertyPointer: pointer; aAttributes: TSQLPropInfoAttributes=[]; aFieldWidth: integer=0; aData2Text: TOnSQLPropInfoRecord2Text=nil; aText2Data: TOnSQLPropInfoRecord2Data=nil); begin Fields.Add(aTable,TSQLPropInfoRecordRTTI.Create(aRecordInfo,aName,Fields.Count, aPropertyPointer,aAttributes,aFieldWidth,aData2Text,aText2Data)); end; { TSynValidateUniqueField } function TSynValidateUniqueField.Process(aFieldIndex: integer; const Value: RawUTF8; var ErrorMsg: string): boolean; |
Changes to SynCommons.pas.
11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 |
{$ifdef PUREPASCAL}
function PosEx(const SubStr, S: RawUTF8; Offset: Cardinal = 1): Integer;
var
I,X: Integer;
Len, LenSubStr: Integer;
C: AnsiChar;
begin
if Offset = 1 then
Result := Pos(RawByteString(SubStr),RawByteString(S)) else begin
I := Offset;
LenSubStr := Length(SubStr);
Len := Length(S)-LenSubStr+1;
C := SubStr[1];
while I<=Len do begin
if S[I]=C then begin
X := 1;
|
| > | > |
11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 |
{$ifdef PUREPASCAL} function PosEx(const SubStr, S: RawUTF8; Offset: Cardinal = 1): Integer; var I,X: Integer; Len, LenSubStr: Integer; C: AnsiChar; begin toto {$ifndef CPU64} // Win64 purepascal Pos() in System.pas is slower than ours if Offset = 1 then Result := Pos(RawByteString(SubStr),RawByteString(S)) else {$endif} begin I := Offset; LenSubStr := Length(SubStr); Len := Length(S)-LenSubStr+1; C := SubStr[1]; while I<=Len do begin if S[I]=C then begin X := 1; |