You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (Jira)" <ji...@apache.org> on 2025/02/05 00:31:00 UTC
[jira] [Created] (THRIFT-5850) Switch IThriftConfiguration interfacefrom Cardinal to Integer
Jens Geyer created THRIFT-5850:
----------------------------------
Summary: Switch IThriftConfiguration interfacefrom Cardinal to Integer
Key: THRIFT-5850
URL: https://issues.apache.org/jira/browse/THRIFT-5850
Project: Thrift
Issue Type: Improvement
Reporter: Jens Geyer
Assignee: Jens Geyer
Delphi (especially older versions) has a tradition of bad detection of assignments between unsigned and signed integers and vice versa. The developer only rarely gets a warning, in some Delphi versions none at all. Hence, although a configuration such as
{code}
config := TThriftConfigurationImpl.Create;
config.MaxMessageSize := value;
config.MaxFrameSize := value;
{code}
might seem to succeed for value > MAXINT at compile time, in reality it produces errors at runtime due to a (unsigned) cardinal value being casted later on to a negative signed int32.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)