Integer -> NativeInt

General TRichView support forum. Please post your questions here
Post Reply
Greg Stevenson
Posts: 6
Joined: Mon Oct 13, 2008 4:50 pm

Integer -> NativeInt

Post 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)))
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Integer -> NativeInt

Post 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.
Greg Stevenson
Posts: 6
Joined: Mon Oct 13, 2008 4:50 pm

Re: Integer -> NativeInt

Post by Greg Stevenson »

Thank you. That makes sense.
Post Reply