Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit public declaration in objects #196

Closed
mikkvitchko opened this issue Jun 8, 2023 · 4 comments
Closed

Explicit public declaration in objects #196

mikkvitchko opened this issue Jun 8, 2023 · 4 comments

Comments

@mikkvitchko
Copy link

mikkvitchko commented Jun 8, 2023

Please consider adding explicit public declarion to the following objects defined in mormot.core.unicode unit:

  TUtf8Table = object
  public // missing
    Lookup: array[byte] of byte;
    Extra: array[0..6] of record
      offset, minimum: cardinal;
    end;
  TUnicodeUpperTable = object
  public // missing
    Block: array[0..37, 0..127] of integer;
    IndexHi: array[0..271] of byte;
    IndexLo: array[0..8, 0..31] of byte;
    // branchless Unicode 10.0 uppercase folding using our internal tables
    function Ucs4Upper(c: PtrUInt): PtrUInt;
      {$ifdef HASINLINE} inline; {$endif}
  end;

This is necessary when unit is compiled with the {$M+} or {$TYPEINFO ON} directives (in this case default declarion is published rather than public, which leads to compiler errors.)

@mikkvitchko mikkvitchko changed the title Explicit public declaration in classes Explicit public declaration in objects Jun 8, 2023
@synopse
Copy link
Owner

synopse commented Jun 9, 2023

Which compiler triggers such errors?

synopse pushed a commit that referenced this issue Jun 9, 2023
@synopse
Copy link
Owner

synopse commented Jun 9, 2023

Please try 8dca818c

@mikkvitchko
Copy link
Author

Thank you! I'm using RAD Studio 10.3 Version 26.0.36039.7899

@synopse
Copy link
Owner

synopse commented Jun 13, 2023

Should be fine now.

Closing the ticket. Please reopen if needed.

@synopse synopse closed this as completed Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants