Hi,

I'm a bit puzzled by a problem in CoreObject. In the initializer below, if 
store is nil, _latestRevisionNumber is not set to 0 as I would expect it, but 
to some random value.

- (id)initWithStore: (COStore *)store maxRevisionNumber: 
(int64_t)maxRevisionNumber;
{
        SUPERINIT;

        ASSIGN(_store, store);
        _maxRevisionNumber = maxRevisionNumber; 
        _latestRevisionNumber = [_store latestRevisionNumber];

-latestRevisionNumber method return type is int64_t. For methods doesn't return 
structs, I was expecting nil messaging to give a NULL or zero result. 
Is int64_t too big to be a safe return type for nil messaging?

I observe this on Ubuntu Linux x86/32 (using Clang 3 and libobjc2 from today 
SVN trunk), when the  same code initializes _latestRevisionNumber to zero on 
Mac OS X (x86/32 too btw).

Any insight?

Cheers,
Quentin.


_______________________________________________
Etoile-dev mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-dev

Reply via email to