Lazy initialization of ClassAliasList within classes.inc
Original Reporter info from Mantis: kluug.net @onpok
-
Reporter name: Ondrej Pokorny
Original Reporter info from Mantis: kluug.net @onpok
- Reporter name: Ondrej Pokorny
Description:
Currently ClassAliasList is initialized at every FPC program start.
This unfortunately means that also TEncoding.Default is initialized - that means that TEncoding.Default cannot be changed afterwards in user-code (see #32961).
The solution is to initialize it when it is needed - and so allow TEncoding.Default to be set after DefaultSystemCodePage.
Additional information:
Patch is attached.
(The patch includes the change from #35304 (closed) as well because they are in the same function. You should apply #35304 (closed) first, if you decide so.)
Mantis conversion info:
- Mantis ID: 35305
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 41819 (#e3973e9c)
- Target version: 3.2.0