Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-17 Thread Sven Barth
Am 17.08.2016 17:30 schrieb "Maciej Izak" : > > > 2016-08-17 17:15 GMT+02:00 Sven Barth : >> >> Couldn't you work around for now by using instance instead of class variables? At least then the classes would work instead of everyone asking every second week why they don't... > > > Yes I think that i

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-17 Thread Maciej Izak
2016-08-17 18:45 GMT+02:00 silvioprog : > I changed it to a function: > > function ExtendedHasher(constref AValue: string): UInt32; > begin > TDefaultHashFactory.GetHashList(Pointer(AValue), > Length(AValue) * SizeOf(Char), @Result); > end; > Still bad implementation (see my previ

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-17 Thread silvioprog
On Wed, Aug 17, 2016 at 12:20 PM, Maciej Izak wrote: > > 2016-08-17 16:05 GMT+02:00 silvioprog : > >> I need to find the values using case-insensitive keys (I'm using it in a >> class registry of my app), so unfortunately this bug doesn't let me to use >> TDictionary on FPC yet. :-( > > > There i

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-17 Thread Maciej Izak
2016-08-17 17:15 GMT+02:00 Sven Barth : > Couldn't you work around for now by using instance instead of class > variables? At least then the classes would work instead of everyone asking > every second week why they don't... Yes I think that is possible :P Note: #28911 bug is most annoying ever

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-17 Thread Maciej Izak
2016-08-17 17:20 GMT+02:00 Maciej Izak : > procedure ExtendedHasher(constref AValue: string; AHashList: PUInt32); > begin > TDefaultHashFactory.GetHashList(Pointer(AValue), Length(AValue) * > SizeOf(Char), AHashList); > end; > there is bug, correct version: procedure ExtendedHasher(constref AV

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-17 Thread Sven Barth
Am 17.08.2016 08:05 schrieb "Maciej Izak" : > > > 2016-08-17 7:05 GMT+02:00 silvioprog : >> >> Just try it: > > > related to > > http://bugs.freepascal.org/view.php?id=28911 > > Sven comment: "I won't change the current implementation for now, because once I'm going to fix this I'm going to fix thi

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-17 Thread Maciej Izak
2016-08-17 16:05 GMT+02:00 silvioprog : > I need to find the values using case-insensitive keys (I'm using it in a > class registry of my app), so unfortunately this bug doesn't let me to use > TDictionary on FPC yet. :-( There is simple workaround: === begin code === function EqualityComparis

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-17 Thread silvioprog
On Wed, Aug 17, 2016 at 3:04 AM, Maciej Izak wrote: > > 2016-08-17 7:05 GMT+02:00 silvioprog : > >> Just try it: >> > > related to > > http://bugs.freepascal.org/view.php?id=28911 > > Sven comment: "I won't change the current implementation for now, because > once I'm going to fix this I'm going

Re: [fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-16 Thread Maciej Izak
2016-08-17 7:05 GMT+02:00 silvioprog : > Just try it: > related to http://bugs.freepascal.org/view.php?id=28911 Sven comment: "I won't change the current implementation for now, because once I'm going to fix this I'm going to fix this correctly for all cases, including packages, everything else

[fpc-pascal] rtl-generics: TIStringComparer.Ordinal -> Access violation

2016-08-16 Thread silvioprog
Hello, Just try it: var list: TDictionary; begin list := TDictionary.Create(TIStringComparer.Ordinal); Error: An unhandled exception occurred at $0043A2F8: EAccessViolation: Access violation $0043A2F8 $004084B3 DOADD, line 277 of inc/generics.dictionaries.inc