On Thu, Nov 29, 2018 at 5:10 PM Armin Rigo <armin.r...@gmail.com> wrote: > PS: on CPython could use ``typedef struct { PyObject *_obj; } > PyHandle;``. This works like a pointer, but you can't use ``==`` to > compare them.
And then you could have a macro or inline function to compare them, simply by looking at that private member, and it should compile down to the exact same machine code as comparing the original pointers directly. It'd be a not-unreasonable migration path, should you want to work that way - zero run-time cost. ChrisA _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com