On Fri, 14 Apr 2006, Giuseppe Burgarella wrote:



Hi,
I had a look at my std's lib code and the mico definitions:
- the std::size_t type is always defined as "typedef unsigned long size_t"
(obviously, if no other definition was already done)
- the mico's CORBA::ULong is defined (based on the compiling environment)
as "unsigned long" (if it is 4 bytes) or as "unsigned int" (if it is 4
bytes).

Yes, since CORBA ULong type is defined as 4 bytes long unsigned.

So, in a machine where the "unsigned long" is NOT 4 bytes number , we'll
obtain:
- std::size_t is an unsigned long (that can be a 64 bits number)
- CORBA::ULong is an unsigned int (that is a 32 bits number)

True! The problem is that Raimund seems to use Windows and I automatically expected he is using 32bit windows together with 32bit development environment. It seems I've been mistaken, since otherwise he should not received those warnings.

I think that this is the reason of that warning message: when the
vector::size_t is returned as a CORBA::ULong, it is casted from 64 bits to
32 bits.
Moreover, I think that the warning is not be so important because both the
numbers are "unsigned" and so you'll obtain an error only in case of a
vector with more than 2^32 values (not so usual).

True! And in addition we're not allowed to change the type from ULong to something bigger, since the problematic count operations are defined by the IDL to C++ mapping. See 03-06-03 (c++ 1.1) and ``1.29.2 NVList C++ Class'' chapter:

// C++
class NVList
{
   public:
       ULong count() const;


Cheers,
Karel
--
Karel Gardas                  [EMAIL PROTECTED]
ObjectSecurity Ltd.           http://www.objectsecurity.com
---
Need experienced, fast, reliable technical MICO support?
---> http://www.objectsecurity.com/mico_commsup_referral.html <---
---
_______________________________________________
Mico-devel mailing list
[email protected]
http://www.mico.org/mailman/listinfo/mico-devel

Reply via email to