Patch to allow to override how the compiler reads source/ppu files
Original Reporter info from Mantis: Mattias @lazidealist
-
Reporter name: Mattias Gaertner
Original Reporter info from Mantis: Mattias @lazidealist
- Reporter name: Mattias Gaertner
Description:
When building your own special compiler (e.g. fpprofiler and Lazarus could use this) there is need to read source/ppu files not from disk but from another source. This patch does two things:
-
It adds an abstract base class TCCustomFileStream, with the current TCFileStream as default implementation. It adds a global variable CFileStreamClass, which can be used to override the file load function.
-
Several read file functions that did not yet use the TCFileStream were changed to use it.
I use this patch since November without problem.
I did some timings and it seems to have no impact on speed.
There are two functions which I'm not sure about, but it seems they are not used anywhere:
unit ppu:
procedure tppufile.tempclose;
function tppufile.tempopen:boolean;
Apply patch in compiler directory.
Mantis conversion info:
- Mantis ID: 18740
- Fixed in version: 2.6.0
- Fixed in revision: 17255 (#0c62133d)
- Monitored by: » darius (Darius Blaszijk), » Vincent (Vincent Snijders), » @PascalDragon (Sven Barth)