Hi all (again),
Oddly enough, looking continuing to plug away at this further, I¹m able to
get my tests to pass if I use a Pointer instead of a String. The definition
of the struct field is:
const char *tp_name;
Instead of using
public String tp_name;
which gives me the memory access error, I¹m using
public Pointer tp_name;
Is there any particular reason this may be happening? Am I missing
something simple?
Cheers,
Peter
Hi,
I¹m currently working on adding mappings for structures (PyObject and
PyTypeObject to be specific). The PyObject is pretty simple: a ref count and
a pointer to its type. The PyTypeObject is much more complicated: Many arrays
of structs, function pointers, etc.
I implemented the type object out as far as I need (the ability to define
methods, members, etc), and I very quickly started getting errors. In order to
find the culprit, I began by removing all the fields, and then adding them
back one by one. I started with the int values, and my tests still passed.
Once I added back the first String field, the tests fail in the native library
with the following error:
Invalid memory access of location 00000001 rip=105fcee5
I¹m not sure what might be causing this sort of error when defining Structure.
Any ideas?
Cheers,