<|start_filename|>src/PySwift_ObjC/include/pyswift_macros.h<|end_filename|>
@import ObjectiveC.NSObjCRuntime;
@import CoreFoundation.CFBase;
@import Python;

typedef bool (^PyDictEnumeratorBlock)(PyObject*__nonnull key, PyObject*__nonnull value, Py_ssize_t pos);

PyObject*__nonnull PyNone_Get();

bool PyList_CheckIsList(PyObject*__nonnull obj);

bool PyDict_CheckIsDict(PyObject*__nonnull obj);
void PyDict_Enumerate(PyObject*__nonnull dict, PyDictEnumeratorBlock _Nonnull block);

PyObject*__nonnull PyList_Get_Item(PyObject*__nonnull seq, NSUInteger i);

PyObject*__nonnull PyTuple_Get_Item(PyObject*__nonnull seq, NSUInteger i);

PyObject*__nonnull PyBool_True();
PyObject*__nonnull PyBool_False();

NSString*__nonnull PyStringOrUnicode_Get_UTF8Buffer(PyObject*__nonnull uniObj);

PyObject*__nullable PyErr_GetObject();


<|start_filename|>src/PySwift_ObjC/include/pyswift_extending.h<|end_filename|>
@import Python;
@import Foundation;

//#ifndef PYSWIFT_BRIDGE
extern const long Py_TPFLAGS_DEFAULT_value;

static PyTypeObject blankTypeObject = {
    PyVarObject_HEAD_INIT(NULL, 0) //expands to 1, NULL, 0,
    NULL,                      /* tp_name */
    0,                         /* tp_basicsize */
    0,                         /* tp_itemsize */
    0,                         /* tp_dealloc */
    0,                         /* tp_print */
    0,                         /* tp_getattr */
    0,                         /* tp_setattr */
    0,                         /* tp_compare */
    0,                         /* tp_repr */
    0,                         /* tp_as_number */
    0,                         /* tp_as_sequence */
    0,                         /* tp_as_mapping */
    0,                         /* tp_hash */
    0,                         /* tp_call */
    0,                         /* tp_str */
    0,                         /* tp_getattro */
    0,                         /* tp_setattro */
    0,                         /* tp_as_buffer */
    Py_TPFLAGS_DEFAULT,        /* tp_flags */
    NULL,           /* tp_doc */
};

NS_ASSUME_NONNULL_BEGIN
typedef struct {
    PyObject_HEAD
    /* Type-specific fields go here. */
    void* wrapped_obj;
} pyswift_PyObjWrappingSwift;
NS_ASSUME_NONNULL_END

@interface PythonMethod : NSObject
@property (readonly, nonnull) NSString* name;
@property (readonly, nonnull) PyCFunction impl;
@property (readonly) int flags;
@property (readonly, nullable) NSString* docs;

-(instancetype __nonnull)initWithName:(NSString*_Nonnull)name impl:(PyCFunction _Nonnull)impl flags:(int)flags docs:(NSString*_Nullable)docs;
@end

PyMethodDef*_Nonnull buildMethodsDefArray(NSArray<PythonMethod *>*_Nonnull array);
//#define PYSWIFT_BRIDGE
//#endif
