The cc_handle is currently a 64-bit unsigned integer however its value is obtained by casting a pointer. The forward and reverse casts may not be safe on all platforms and often produce many warnings. Implementing casting functions is a possibility. However, if it is not more work a better scheme would be to use an index value that looks up the appropriate pointer in a table.