#17 C-Object refs are always created


Since the breakage we've managed to get our leaks
closed, but one issue remains:

a = foo._this()
b = foo._this()
a == b

This is because we create a new instance for each
reference. I've attached a patch that fixes this by
providing a hash and a subhash that takes into account
the fact that the CORBA Object can in fact be
implemented in two interfaces (thus requiring the use
of _narrow()) by keying by the object interface id.
Look at the patch if it sounds complicated :-)

The behaviour is now

a = foo._this()
b = foo._this()
a == b

but this strictly ORBit-Python specific. Tack, are
there other caveats to this?

Note that the patch I attached includes the fixes for
bug 427729.


  • Christian Reis

    Christian Reis - 2001-05-27

    Logged In: YES

    I might add this passes my test suite and roland's leak
    suite with 0 errors.

  • Christian Reis

    Christian Reis - 2001-05-27
  • Jason Tackaberry

    • status: open --> closed-accepted
  • Jason Tackaberry

    Logged In: YES

    It's the right idea, but you want to hash on the repo_id
    in the class glue, as opposed to the repo_id in the CORBA
    object itself, or else it won't work with _narrow().

    You have a lot of redundant checking which results in
    unnecessary if nesting, making the code hard to read. For
    checks that need to pass and won't be false unless there's
    an internal inconsistency, use g_assert.

    I've approved the patch with the above modifications. It
    will be added to CVS with my upcoming mass commit.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks