some work on UICaption and UICollection; fixing segfaults resulting from mcrfpydef namepace TypeObject usage

This commit is contained in:
John McCardle 2024-04-13 00:17:43 -04:00
commit 9efe998a33
4 changed files with 257 additions and 32 deletions

View file

@ -48,6 +48,13 @@ typedef struct {
std::shared_ptr<std::vector<std::shared_ptr<UIDrawable>>> data;
} PyUICollectionObject;
typedef struct {
PyObject_HEAD
std::shared_ptr<std::vector<std::shared_ptr<UIDrawable>>> data;
int index;
int start_size;
} PyUICollectionIterObject;
namespace mcrfpydef {
//PyObject* py_instance(std::shared_ptr<UIDrawable> source);
// This function segfaults on tp_alloc for an unknown reason, but works inline with mcrfpydef:: methods.