On Fri, 23 Mar 2018, Pierre Muller wrote:
Le 23/03/2018 à 23:12, Michael Van Canneyt a écrit :
On Fri, 23 Mar 2018, Sven Barth via fpc-devel wrote:
R0b0t1 <[email protected]> schrieb am Fr., 23. März 2018, 16:07:
IMHO preferably not the unit names (as in 'unit XxX') - with case
sensitive file names on Unix, this change might increase time for
searching the respective file (somewhat). Obviously, all further
references of the unit (as in 'SysUtils.Execute') should be fine.
I don't understand how it would increase the search time. I believe
what happens is all names are converted to lowercase for the search,
as in the strings taken from the user or their files and the names
taken from the disk are both converted to lower case before
comparisons are made.
FPC first looks for the unit with the name as is, then lower case and
finally upper case.
Yes, but this is done in memory in the directory cache.
But isn't the problem more that if you have a SysUtils.pp unit
and a sysutils.pp both in your unit search path,
on a case sensitive partition, it might now find SysUtils.pp before sysutils.pp
and end up with some total different source?
No, since the names of the files are not changed, and the names of the units
in the uses clauses are not changed, and those are the ones that matter when
searching, not the ones in the unit xyz; statement.
And if you have this situation on your hard disk, you deserve to be publicly
flogged, covered in tar and feathers, and banished from your village forever.
Michael.
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel