You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Leif Hedstrom <zw...@apache.org> on 2016/08/11 22:04:08 UTC

Change return type for TSHttpTxnIsInternal and TSHttpSsnIsInternal

Hi all,

as per API review process, I’d like to propose a slight (but incompatible) change to these two APIs. From the Jira (https://issues.apache.org/jira/browse/TS-4731):

I'd like to propose that we modify these two APIs from:
tsapi TSReturnCode TSHttpTxnIsInternal(TSHttpTxn txnp);
tsapi TSReturnCode TSHttpSsnIsInternal(TSHttpSsn snap);
to be
tsapi int TSHttpTxnIsInternal(TSHttpTxn txnp);
tsapi int TSHttpSsnIsInternal(TSHttpSsn snap);
This is more inline with our current standards of using "int" as a boolean type. This is for example the prototype in TSVConnIsSsl() as well as in e.g. TSHttpTxnDebugSet(TSHttpTxn txnp, int on).

— Leif


Re: Change return type for TSHttpTxnIsInternal and TSHttpSsnIsInternal

Posted by Leif Hedstrom <zw...@apache.org>.
But we don't promise binary compatibility between major versions. And we strongly recommend recompile of external plug-ins when upgrading major versions.

-- Leif 

> On Aug 11, 2016, at 4:35 PM, James Peach <jp...@apache.org> wrote:
> 
> 
>> On Aug 11, 2016, at 3:04 PM, Leif Hedstrom <zw...@apache.org> wrote:
>> 
>> Hi all,
>> 
>> as per API review process, I’d like to propose a slight (but incompatible) change to these two APIs. From the Jira (https://issues.apache.org/jira/browse/TS-4731):
>> 
>> I'd like to propose that we modify these two APIs from:
>> tsapi TSReturnCode TSHttpTxnIsInternal(TSHttpTxn txnp);
>> tsapi TSReturnCode TSHttpSsnIsInternal(TSHttpSsn snap);
>> to be
>> tsapi int TSHttpTxnIsInternal(TSHttpTxn txnp);
>> tsapi int TSHttpSsnIsInternal(TSHttpSsn snap);
>> This is more inline with our current standards of using "int" as a boolean type. This is for example the prototype in TSVConnIsSsl() as well as in e.g. TSHttpTxnDebugSet(TSHttpTxn txnp, int on).
> 
> Hmm, this is binary-incompatible change. I think that external plugins could easily be broken by this
> 
> J


Re: Change return type for TSHttpTxnIsInternal and TSHttpSsnIsInternal

Posted by James Peach <jp...@apache.org>.
> On Aug 11, 2016, at 3:04 PM, Leif Hedstrom <zw...@apache.org> wrote:
> 
> Hi all,
> 
> as per API review process, I’d like to propose a slight (but incompatible) change to these two APIs. From the Jira (https://issues.apache.org/jira/browse/TS-4731):
> 
> I'd like to propose that we modify these two APIs from:
> tsapi TSReturnCode TSHttpTxnIsInternal(TSHttpTxn txnp);
> tsapi TSReturnCode TSHttpSsnIsInternal(TSHttpSsn snap);
> to be
> tsapi int TSHttpTxnIsInternal(TSHttpTxn txnp);
> tsapi int TSHttpSsnIsInternal(TSHttpSsn snap);
> This is more inline with our current standards of using "int" as a boolean type. This is for example the prototype in TSVConnIsSsl() as well as in e.g. TSHttpTxnDebugSet(TSHttpTxn txnp, int on).

Hmm, this is binary-incompatible change. I think that external plugins could easily be broken by this

J