You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "S.Uthaiyashankar (JIRA)" <ji...@apache.org> on 2008/12/22 06:50:44 UTC
[jira] Updated: (AXIS2C-740) Definition of type axis2_bool_t based
on an enumeration
[ https://issues.apache.org/jira/browse/AXIS2C-740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
S.Uthaiyashankar updated AXIS2C-740:
------------------------------------
Fix Version/s: (was: 1.4.1)
1.6.0
Assignee: S.Uthaiyashankar (was: Damitha Kumarage)
> Definition of type axis2_bool_t based on an enumeration
> -------------------------------------------------------
>
> Key: AXIS2C-740
> URL: https://issues.apache.org/jira/browse/AXIS2C-740
> Project: Axis2-C
> Issue Type: Improvement
> Components: util
> Environment: Ubuntu 7.10 (Gutsy Gibbon)
> Reporter: Senaka Fernando
> Assignee: S.Uthaiyashankar
> Fix For: 1.6.0
>
> Attachments: diff.txt
>
>
> Boolean types have only two states.
> As C does not have such a type, an alternate mechanism has been used as, typedef int axis2_bool_t;
> Now, legally axis2_bool_t types can have any integer value.
> I propose that it should only be limited to two values.
> Thus it should be defined as typedef enum {AXIS2_FALSE, AXIS2_TRUE} axis2_bool_t;
> in C, types defined in such a manner do accept any integer value. But, when compiled using a C++ compiler, it would flag an error which should be the desired behavior.
> Ex:- in C++, axis2_bool_t myVar = 100; would result in, error: invalid conversion from 'int' to 'axis2_bool_t'
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.