Skip to content

Commit

Permalink
ensure all "object" types have a public member
Browse files Browse the repository at this point in the history
- as reported by #196
  • Loading branch information
Arnaud Bouchez committed Jun 9, 2023
1 parent a555b46 commit 8dca818
Show file tree
Hide file tree
Showing 24 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/core/mormot.core.buffers.pas
Original file line number Diff line number Diff line change
Expand Up @@ -9890,6 +9890,7 @@ function IsStreamBuffer(S: TStream): boolean;
twlCode3);

TTextWriterEscape = object
public
P, B, P2, B2: PUtf8Char;
W: TTextWriter;
st: set of TTextWriterEscapeStyle;
Expand Down
2 changes: 2 additions & 0 deletions src/core/mormot.core.data.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8074,6 +8074,7 @@ function TDynArray.FastLocateOrAddSorted(const Item; wasAdded: PBoolean): intege
type
// internal structure used to make QuickSort faster & with less stack usage
TDynArrayQuickSort = object
public
Compare: TDynArraySortCompare;
CompareEvent: TOnDynArraySortCompare;
Pivot: pointer;
Expand Down Expand Up @@ -9871,6 +9872,7 @@ function TDynArrayHasher.Find(Item: pointer; aHashCode: cardinal): PtrInt;

type
TFastReHash = object // dedicated object for better register allocation
public
hc: cardinal;
{$ifdef DYNARRAYHASHCOLLISIONCOUNT}
collisions: integer;
Expand Down
1 change: 1 addition & 0 deletions src/core/mormot.core.datetime.pas
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ TSynDate = record
{$else}
TSynDate = object
{$endif USERECORDWITHMETHODS}
public
/// the Year value of this Date
Year: word;
/// the Month value of this Date (1..12)
Expand Down
2 changes: 2 additions & 0 deletions src/core/mormot.core.json.pas
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ function JsonPropNameValid(P: PUtf8Char): boolean;
/// efficient JSON value parser / in-place decoder
// - as used by JsonDecode() and all internal JSON functions
TGetJsonField = object
public
/// input/output JSON parsing buffer address
Json: PUtf8Char;
/// in-place output parsed JSON value, unescaped and #0 terminated
Expand Down Expand Up @@ -2767,6 +2768,7 @@ function IsStringJson(P: PUtf8Char): boolean; // test if P^ is a "string" value

/// state machine for fast (900MB/s) parsing of (extended) JSON input
TJsonGotoEndParser = object
public
{$ifdef CPUX86}
JsonSet: PJsonCharSet; // not enough registers in i386 mode
{$endif CPUX86}
Expand Down
2 changes: 2 additions & 0 deletions src/core/mormot.core.log.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1989,6 +1989,7 @@ TDwarfDebugAbbrev = record
end;

TDwarfMachineState = object
public
address: cardinal;
line: cardinal;
fileid: cardinal;
Expand All @@ -2004,6 +2005,7 @@ TDwarfDebugAbbrev = record
end;

TDwarfReader = object
public
read: TFastReader;
DebugLineSectionOffset, DebugLineSection_Size, // debug_line section
DebugInfoSectionOffset, DebugInfoSection_Size, // debug_info section
Expand Down
2 changes: 2 additions & 0 deletions src/core/mormot.core.os.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2903,6 +2903,7 @@ function UnixMSTimeUtcFast: TUnixMSTime;
/// calling context when intercepting exceptions
// - used e.g. for TSynLogExceptionToStr or RawExceptionIntercept() handlers
TSynLogExceptionContext = object
public
/// the raised exception class
EClass: ExceptClass;
/// the Delphi Exception instance
Expand Down Expand Up @@ -4339,6 +4340,7 @@ TSynLockedClass = class of TSynLocked;
// - just wrap TLecuyer with a TLighLock
// - should not be used, unless may be slightly faster than a threadvar
TLecuyerThreadSafe = object
public
Safe: TLightLock;
Generator: TLecuyer;
/// compute the next 32-bit generated value
Expand Down
1 change: 1 addition & 0 deletions src/core/mormot.core.rtti.pas
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ TRttiRecordField = record

/// a wrapper to interface type information, as defined by the the compiler RTTI
TRttiInterfaceTypeData = object
public
/// ancestor interface type
function IntfParent: PRttiInfo;
{$ifdef HASINLINE}inline;{$endif}
Expand Down
1 change: 1 addition & 0 deletions src/core/mormot.core.text.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7745,6 +7745,7 @@ function FormatVariant(const Format: RawUtf8; const Args: array of const): varia
type
// 3KB info on stack - only supported token is %, with any const arguments
TFormatUtf8 = object
public
last: PTempUtf8;
L, argN: PtrInt;
blocks: array[0..63] of TTempUtf8; // to avoid most heap allocations
Expand Down
3 changes: 3 additions & 0 deletions src/core/mormot.core.unicode.pas
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ interface
type
// see http://floodyberry.wordpress.com/2007/04/14/utf-8-conversion-tricks
TUtf8Table = object
public
Lookup: array[byte] of byte;
Extra: array[0..6] of record
offset, minimum: cardinal;
Expand Down Expand Up @@ -8992,6 +8993,7 @@ function AddSortedRawUtf8(var Values: TRawUtf8DynArray; var ValuesCount: integer
type
/// used internally for faster quick sort
TQuickSortRawUtf8 = object
public
Compare: TUtf8Compare;
CoValues: PIntegerArray;
pivot: pointer;
Expand Down Expand Up @@ -9140,6 +9142,7 @@ function DeleteRawUtf8(var Values: TRawUtf8DynArray; var ValuesCount: integer;
type
// 20,016 bytes for full Unicode 10.0 case folding branchless conversion
TUnicodeUpperTable = object
public
Block: array[0..37, 0..127] of integer;
IndexHi: array[0..271] of byte;
IndexLo: array[0..8, 0..31] of byte;
Expand Down
2 changes: 2 additions & 0 deletions src/core/mormot.core.variants.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6237,6 +6237,7 @@ function TDocVariantData.SearchItemByValue(const aValue: Variant;

type
TQuickSortDocVariant = object
public
names: PPointerArray;
values: PVariantArray;
nameCompare: TUtf8Compare;
Expand Down Expand Up @@ -6421,6 +6422,7 @@ TQuickSortDocVariantValuesByField = record
{$else}
TQuickSortDocVariantValuesByField = object
{$endif USERECORDWITHMETHODS}
public
Lookup: array of TQuickSortByFieldLookup;
Compare: TVariantCompare;
CompareField: TVariantCompareField;
Expand Down
3 changes: 3 additions & 0 deletions src/core/mormot.core.zip.pas
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ function GZFile(const orig, destgz: TFileName; CompressionLevel: integer = 6): b
/// generic file information structure, as used in .zip file format
// - used in any header, contains info about following block
TFileInfo = object
public
/// ZIP_VERSION[] is either 20 for regular .zip or 45 for Zip64/4.5
// - use ToByte() for the format version - high 8-bit may identify the OS
neededVersion: word;
Expand Down Expand Up @@ -268,6 +269,7 @@ TFileInfoFull = record
//// directory file information structure, as used in .zip file format
// - used at the end of the zip file to recap all entries
TFileHeader = object
public
/// $02014b50 PK#1#2 = ENTRY_SIGNATURE_INC - 1
signature: cardinal;
/// ZIP_VERSION[] is either 20 for regular .zip or 45 for Zip64/4.5
Expand Down Expand Up @@ -299,6 +301,7 @@ TFileInfoFull = record
//// internal file information structure, as used in .zip file format
// - used locally inside the file stream, followed by the name and the data
TLocalFileHeader = object
public
/// $04034b50 PK#3#4 = FIRSTHEADER_SIGNATURE_INC - 1
signature: cardinal;
/// information about the following file
Expand Down
2 changes: 2 additions & 0 deletions src/crypt/mormot.crypt.ecc256r1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ TEccSignatureCertifiedContent = record
{$else}
TEccSignatureCertifiedContent = object
{$endif USERECORDWITHMETHODS}
public
/// the TEccSignatureCertificated format version
Version: word;
/// when this signature was generated
Expand Down Expand Up @@ -482,6 +483,7 @@ TEccCertificateRevocation = record
{$else}
TEccCertificateRevocation = object
{$endif USERECORDWITHMETHODS}
public
/// contains the 65535 fixed number (ECC_REVOC_MAGIC)
// - make a clear distinction with TEccCertificateContentV1.Version
// - will be Base64-encoded as '/w...' so could be recognized from
Expand Down
1 change: 1 addition & 0 deletions src/crypt/mormot.crypt.secure.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,7 @@ TBinaryCookieGenerator = record
{$else}
TBinaryCookieGenerator = object
{$endif USERECORDWITHMETHODS}
public
/// the cookie name, used for storage in the client side HTTP headers
// - is not part of the Generate/Validate content, but could be used
// when the cookie is actually stored in HTTP headers
Expand Down
1 change: 1 addition & 0 deletions src/crypt/mormot.crypt.x509.pas
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ EAsn = class(ESynException);

/// used to store an ASN.1 TAG content
TAsnTag = object
public
/// mostly acUniversal kind of TAG
TagClass: TAsnTagClass;
/// defines this TAG content
Expand Down
1 change: 1 addition & 0 deletions src/db/mormot.db.nosql.bson.pas
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ TBsonObjectID = record
{$else}
TBsonObjectID = object
{$endif USERECORDWITHMETHODS}
public
/// big-endian 4-byte value representing the seconds since the Unix epoch
// - time is expressed in Coordinated Universal Time (UTC), not local time
UnixCreateTime: cardinal;
Expand Down
1 change: 1 addition & 0 deletions src/db/mormot.db.raw.odbc.pas
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ SQL_TIMESTAMP_STRUCT = record
{$else}
SQL_TIMESTAMP_STRUCT = object
{$endif USERECORDWITHMETHODS}
public
Year: SqlSmallint;
Month: SqlUSmallint;
Day: SqlUSmallint;
Expand Down
1 change: 1 addition & 0 deletions src/db/mormot.db.raw.oracle.pas
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ TOracleDate = record
{$else}
TOracleDate = object
{$endif USERECORDWITHMETHODS}
public
Cent, Year, Month, Day, Hour, Min, Sec: byte;
/// convert an Oracle date and time into Delphi TDateTime
// - this method will ignore any date before 30 Dec 1899 (i.e. any
Expand Down
1 change: 1 addition & 0 deletions src/lib/mormot.lib.openssl11.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1775,6 +1775,7 @@ X509_algor_st = record

/// wrapper to the PKCS12 abstract pointer
PKCS12 = object
public
/// parse and extract the private key, certificate and CAs in this PKCS12 store
// - use pointers to result structures, nil if one is not needed
// - caller should call needed privatekey^.Free, cert^.Free and ca^.FreeX509
Expand Down
1 change: 1 addition & 0 deletions src/lib/mormot.lib.sspi.pas
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ TSecPkgConnectionInfo = record
{$else}
TSecPkgConnectionInfo = object
{$endif USERECORDWITHMETHODS}
public
dwProtocol: cardinal;
aiCipher: ALG_ID;
dwCipherStrength: cardinal;
Expand Down
3 changes: 3 additions & 0 deletions src/misc/mormot.misc.pecoff.pas
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ TImageNtHeaders = record
/// Section Table
// - https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#section-table-section-headers
_IMAGE_SECTION_HEADER = object
public
Name8: array[0..7] of AnsiChar;
VirtualSize: cardinal;
VirtualAddress: cardinal;
Expand Down Expand Up @@ -392,6 +393,7 @@ _IMAGE_TLS_DIRECTORY32 = record
// - https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#resource-directory-entries
PImageResourceDataEntry = ^_IMAGE_RESOURCE_DATA_ENTRY;
_IMAGE_RESOURCE_DIRECTORY_ENTRY = object
public
// Nested record to use a variable part not at the end of the record
Identifier: record
case integer of
Expand Down Expand Up @@ -442,6 +444,7 @@ _VS_VERSIONINFO = record
/// Fixed file info
// - https://learn.microsoft.com/en-us/windows/win32/api/VerRsrc/ns-verrsrc-vs_fixedfileinfo
_VS_FIXEDFILEINFO = object
public
Signature: cardinal;
StructVersion: cardinal;
FileVersionMS: cardinal;
Expand Down
2 changes: 1 addition & 1 deletion src/mormot.commit.inc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'2.1.5534'
'2.1.5535'
3 changes: 3 additions & 0 deletions src/net/mormot.net.ldap.pas
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ TLdapKnownCommonNames = record

/// high-level information of a User or Group object in the LDAP database
TLdapObject = object
public
sAMAccountName, distinguishedName, canonicalName: RawUtf8;
name, CN, description: RawUtf8;
objectSid, objectGUID: RawUtf8;
Expand All @@ -793,6 +794,7 @@ TLdapKnownCommonNames = record
// - note that "member" array won't include nested groups - use rather the
// TLdapClient.GetIsMemberOf() method or TLdapCheckMember class instead
TLdapGroup = object(TLdapObject)
public
primaryGroupID: cardinal;
groupType: TGroupTypes;
member: TRawUtf8DynArray;
Expand All @@ -804,6 +806,7 @@ TLdapKnownCommonNames = record
// - note that "memberof" array won't include nested groups - use rather the
// TLdapClient.GetIsMemberOf() method or TLdapCheckMember class instead
TLdapUser = object(TLdapObject)
public
userPrincipalName, displayName, mail: RawUtf8;
pwdLastSet, lastLogon: TDateTime;
memberof: TRawUtf8DynArray;
Expand Down
1 change: 1 addition & 0 deletions src/net/mormot.net.sock.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,7 @@ class procedure ENetSock.CheckLastError(const Context: ShortString;
// - used e.g. by TNetAddr.SetFromIP4 and GetKnownHost
// - avoid the overhead of TSynDictionary for a few short-living items
TNetHostCache = object
public
Host: TRawUtf8DynArray;
Safe: TLightLock;
Tix, TixShr: cardinal;
Expand Down
2 changes: 2 additions & 0 deletions src/net/mormot.net.ws.core.pas
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,7 @@ TWebProcessInFrame = record
{$else}
TWebProcessInFrame = object
{$endif USERECORDWITHMETHODS}
public
hdr: TFrameHeader;
opcode: TWebSocketFrameOpCode;
masked: boolean;
Expand All @@ -948,6 +949,7 @@ TWebSocketFrameEncoder = record
{$else}
TWebSocketFrameEncoder = object
{$endif USERECORDWITHMETHODS}
public
hdr: TFrameHeader;
hdrlen, len: cardinal;
function Prepare(const Frame: TWebSocketFrame; MaskSentFrames: cardinal): integer;
Expand Down

0 comments on commit 8dca818

Please sign in to comment.