I’m trying to create a typemap from a C++ struct to a PyLong.
For example, I have the following struct that represents a 128 bit number, and I would like to access it in the Python interface as a simple Python unsigned long.
struct my_128 {
u_int64_t raw[2];
};
How can I create such a typemap?
Absent full error checking, these typemaps work: