Thanks to Petri's suggestion about using typed pointers, I have a set of updates that re-introduce strong typing but still allow the normal C == and != operators to work. I'll post it after Anders' API restructure patch is merged since that's higher priority and it will need to be rebased after that anyway.
There is one problem that this change exposes, however, and it has to do with the fact that a number of the examples and tests need to print the value of handles and are currently doing that using printf-style format strings specifying things like %i, %d, %u, etc. This is decidedly non-portable and in particular doesn't work with these changes. We need to come up with a typedef-independent and portable means of allowing applications to print the values of ODP handles for diagnostic purposes. To be consistent with modern C conventions, we should probably use symbolic format macros similar to PRIu64, etc. introduced in C99. Each implementation could define their own code, however we cannot assume that every handle type has the same underlying representation in every implementation (they are in linux-generic, but they could differ) so a single format specifier code may not suffice. Something to discuss in our next call. Bill
_______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
