We discussed having xxx_is_equal() type calls in the past and there didn't
seem to be a lot of interest at the time.  I agree this can be useful and
because ODP types are abstract such comparisons SHOULD be via explicit
comparator functions.  Using == in C++ is fine since operators can be
overridden in that language, but it's not a good idea in C.

Perhaps an opportunity to discuss these again as well as how to make
explicitly inline/macro based APIs available since these sort of calls are
a natural for this.

On Fri, Dec 12, 2014 at 4:16 AM, Taras Kondratiuk <
[email protected]> wrote:
>
> Hi
>
> It seems to be useful to be able to compare two ODP handles. For example
> compare odp_packet_pool() return value with previously created
> pool to check that packet is from that pool.
>
> ODP types are opaques handles, so comparing them directly with == may
> give a wrong results. For example handles that point to the same object
> (queue, pool, etc) can have generation number in it, so direct
> comparison will return false.
>
> Do we need to add corresponding comparison API for each handle type? Or
> we just say that any two handles of the same ODP object should be equal
> and == is enough?
>
> --
> Taras Kondratiuk
>
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to