You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Leif Hedstrom (JIRA)" <ji...@apache.org> on 2014/05/24 02:48:02 UTC
[jira] [Resolved] (TS-2528) better bool handling in public APIs (ts
/ mgmt)
[ https://issues.apache.org/jira/browse/TS-2528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leif Hedstrom resolved TS-2528.
-------------------------------
Resolution: Fixed
> better bool handling in public APIs (ts / mgmt)
> -----------------------------------------------
>
> Key: TS-2528
> URL: https://issues.apache.org/jira/browse/TS-2528
> Project: Traffic Server
> Issue Type: Bug
> Components: Management API
> Reporter: Zhao Yongming
> Assignee: Leif Hedstrom
> Labels: api-change
> Fix For: 5.0.0
>
>
> {code}
> tsapi bool TSListIsEmpty(TSList l);
> tsapi bool TSListIsValid(TSList l);
> tsapi bool TSIpAddrListIsEmpty(TSIpAddrList ip_addrl);
> tsapi bool TSIpAddrListIsValid(TSIpAddrList ip_addrl);
> tsapi bool TSPortListIsEmpty(TSPortList portl);
> tsapi bool TSPortListIsValid(TSPortList portl);
> tsapi bool TSStringListIsEmpty(TSStringList strl);
> tsapi bool TSStringListIsValid(TSStringList strl);
> tsapi bool TSIntListIsEmpty(TSIntList intl);
> tsapi bool TSIntListIsValid(TSIntList intl, int min, int max);
> tsapi bool TSDomainListIsEmpty(TSDomainList domainl);
> tsapi bool TSDomainListIsValid(TSDomainList domainl);
> tsapi TSError TSRestart(bool cluster);
> tsapi TSError TSBounce(bool cluster);
> tsapi TSError TSStatsReset(bool cluster, const char *name = NULL);
> tsapi TSError TSEventIsActive(char *event_name, bool * is_current);
> {code}
> and we have:
> {code}
> #if !defined(linux)
> #if defined (__SUNPRO_CC) || (defined (__GNUC__) || ! defined(__cplusplus))
> #if !defined (bool)
> #if !defined(darwin) && !defined(freebsd) && !defined(solaris)
> // XXX: What other platforms are there?
> #define bool int
> #endif
> #endif
> #if !defined (true)
> #define true 1
> #endif
> #if !defined (false)
> #define false 0
> #endif
> #endif
> #endif // not linux
> {code}
> I'd like we can make it a typedef or replace bool with int completely, to make things better to be parsed by SWIG tools etc.
--
This message was sent by Atlassian JIRA
(v6.2#6252)