From: kumpf Date: Tue, 9 Aug 2005 21:20:05 +0000 (+0000) Subject: BUG#: 4012 X-Git-Tag: RELEASE_2_5_0-RC1~43 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=9799239b370b1338c445f8dc7842fc8e670ae326;p=tpot%2Fpegasus%2F.git BUG#: 4012 TITLE: CMPIUint32 and CMPISint32 datatypes defined as a 64-bit value on some 64-bit systems DESCRIPTION: Use ints instead of longs for 32-bit integers to be consistent with the Pegasus definitions. --- diff --git a/src/Pegasus/Provider/CMPI/CmpiArray.h b/src/Pegasus/Provider/CMPI/CmpiArray.h index e15774382..ec0e9b6e8 100644 --- a/src/Pegasus/Provider/CMPI/CmpiArray.h +++ b/src/Pegasus/Provider/CMPI/CmpiArray.h @@ -83,9 +83,6 @@ public: /** Extracting signed 32 bit. */ operator CMPISint32() const; - /** Extracting signed 32 bit. - */ - operator int() const; /** Extracting signed 64 bit. */ operator CMPISint64() const; @@ -99,9 +96,6 @@ public: /** Extracting unsigned 32 bit. */ operator CMPIUint32() const; - /** Extracting unsigned 32 bit. - */ - operator unsigned int() const; /** Extracting unsigned 64 bit. */ operator CMPIUint64() const; diff --git a/src/Pegasus/Provider/CMPI/CmpiData.h b/src/Pegasus/Provider/CMPI/CmpiData.h index c911c8aa1..b25202daf 100644 --- a/src/Pegasus/Provider/CMPI/CmpiData.h +++ b/src/Pegasus/Provider/CMPI/CmpiData.h @@ -87,43 +87,35 @@ public: */ CmpiData(); - /** Constructor - singed 8 bit as input. + /** Constructor - signed 8 bit as input. */ CmpiData(CMPISint8 d); - /** Constructor - singed 16 bit as input. + /** Constructor - signed 16 bit as input. */ CmpiData(CMPISint16 d); - /** Constructor - singed 32 bit as input. + /** Constructor - signed 32 bit as input. */ CmpiData(CMPISint32 d); - /** Constructor - singed 32 bit as input. - */ - CmpiData(int d); - - /** Constructor - singed 64 bit as input. + /** Constructor - signed 64 bit as input. */ CmpiData(CMPISint64 d); - /** Constructor - unsinged 8 bit as input. + /** Constructor - unsigned 8 bit as input. */ CmpiData(CMPIUint8 d); - /** Constructor - unsinged 16 bit as input. + /** Constructor - unsigned 16 bit as input. */ CmpiData(CMPIUint16 d); - /** Constructor - unsinged 32 bit as input. + /** Constructor - unsigned 32 bit as input. */ CmpiData(CMPIUint32 d); - /** Constructor - unsinged 32 bit as input. - */ - CmpiData(unsigned int d); - - /** Constructor - unsinged 64 bit as input. + /** Constructor - unsigned 64 bit as input. */ CmpiData(CMPIUint64 d); @@ -179,10 +171,6 @@ public: */ operator CMPISint32() const; - /** Extracting signed 32 bit. - */ - operator int() const; - /** Extracting signed 64 bit. */ operator CMPISint64() const; @@ -199,10 +187,6 @@ public: */ operator CMPIUint32() const; - /** Extracting unsigned 32 bit. - */ - operator unsigned int() const; - /** Extracting unsigned 64 bit. */ operator CMPIUint64() const; diff --git a/src/Pegasus/Provider/CMPI/CmpiImpl.cpp b/src/Pegasus/Provider/CMPI/CmpiImpl.cpp index bb8a96e52..2db7fd7de 100644 --- a/src/Pegasus/Provider/CMPI/CmpiImpl.cpp +++ b/src/Pegasus/Provider/CMPI/CmpiImpl.cpp @@ -912,12 +912,6 @@ CmpiData::CmpiData(CMPISint32 d) { _data.type=CMPI_sint32; } -CmpiData::CmpiData(int d) { - _data.state=CMPI_goodValue; - _data.value.sint32=d; - _data.type=CMPI_sint32; -} - CmpiData::CmpiData(CMPISint64 d) { _data.state=CMPI_goodValue; _data.value.sint64=d; @@ -942,12 +936,6 @@ CmpiData::CmpiData(CMPIUint32 d) { _data.type=CMPI_uint32; } -CmpiData::CmpiData(unsigned int d) { - _data.state=CMPI_goodValue; - _data.value.sint32=d; - _data.type=CMPI_uint32; -} - CmpiData::CmpiData(CMPIUint64 d) { _data.state=CMPI_goodValue; _data.value.sint64=d; @@ -1030,12 +1018,6 @@ CmpiData::operator CMPISint32() const { else return _data.value.sint32; } -CmpiData::operator int() const { - if (_data.type!=CMPI_sint32) - throw CmpiStatus(CMPI_RC_ERR_TYPE_MISMATCH); - else - return _data.value.sint32; -} CmpiData::operator CMPISint64() const { if (_data.type!=CMPI_sint64) @@ -1069,13 +1051,6 @@ CmpiData::operator CMPIUint32() const { return _data.value.uint32; } -CmpiData::operator unsigned int() const { - if (_data.type!=CMPI_uint32) - throw CmpiStatus(CMPI_RC_ERR_TYPE_MISMATCH); - else - return _data.value.uint32; -} - CmpiData::operator CMPIUint64() const { if (_data.type!=CMPI_uint64) throw CmpiStatus(CMPI_RC_ERR_TYPE_MISMATCH); diff --git a/src/Pegasus/Provider/CMPI/cmpidt.h b/src/Pegasus/Provider/CMPI/cmpidt.h index 72152afc6..aedbe99fd 100644 --- a/src/Pegasus/Provider/CMPI/cmpidt.h +++ b/src/Pegasus/Provider/CMPI/cmpidt.h @@ -201,7 +201,7 @@ extern "C" { typedef unsigned short CMPIChar16; typedef unsigned char CMPIUint8; typedef unsigned short CMPIUint16; - typedef unsigned long CMPIUint32; + typedef unsigned int CMPIUint32; #ifndef CMPI_PLATFORM_WIN32_IX86_MSVC typedef unsigned long long CMPIUint64; #else @@ -209,7 +209,7 @@ extern "C" { #endif typedef signed char CMPISint8; typedef short CMPISint16; - typedef long CMPISint32; + typedef signed int CMPISint32; #ifndef CMPI_PLATFORM_WIN32_IX86_MSVC typedef long long CMPISint64; #else