Page 1 of 1

Integer -> NativeInt

Posted: Thu May 30, 2019 6:57 pm
by Greg Stevenson
These are additional areas we found with our automated testing of RichView 17.6.2_8.5.1 where Integer or LongInt should be replaced with NativeInt:

RichViewActions/Source/RichViewActions.pas:RVAMakeTag(4503): Result := Integer(StrNew(PChar(S2)))
RvHtmlImporter/Source/RvHtmlImport.pas:MakeRVTag(2808): Result := Integer(StrNew(PChar(S2)))
RvXml/Source/RVXMLRoutines.pas:ReadText(335): Item.Tag := Integer(StrNew(PChar(SVal)))
RvXml/Source/RVXMLRoutines.pas:ReadUnicodeText(393): Item.Tag := Integer(StrNew(PChar(SVal)))
RvXml/Source/RVXMLRoutines.pas:ReadCheck(455): Tag := Integer(StrNew(PChar(String(T.Attr.Value))))
RvXml/Source/RVXMLRoutines.pas:ReadStandardItemProperties(486): Item.Tag := Integer(StrNew(PChar(String(Attr.Value))))
TRichView/Source/RVERVData.pas:TRVEditRVData.Do_ModifyItemIntProperties(1728): OldValue, NewValue: LongInt;
TRichView/Source/RVFMisc:RVFReadTag(747): Tag := Integer(StrNew(PChar(TagString)))
TRichView/Source/RVFuncs:RV_CopyTag(263): Result := Integer(StrNew(PChar(SourceTag)))

Re: Integer -> NativeInt

Posted: Fri May 31, 2019 4:15 pm
by Sergey Tkachenko
All these code fragments are compiled only if you activate $define RVOLDTAGS (so tags will be integer that could be converted to PChars).
This mode is deprecated, and the code related to it will not be improved. It is only for compatibility with old projects, only for 32-bit.
Please use string tags instead.

Re: Integer -> NativeInt

Posted: Fri May 31, 2019 8:12 pm
by Greg Stevenson
Thank you. That makes sense.