Add helper functions for common conversions

This commit is contained in:
John J. Camilleri
2021-09-24 13:09:26 +02:00
parent 917c223db7
commit d0ce218ae1
4 changed files with 119 additions and 130 deletions

View File

@@ -15,10 +15,16 @@ typedef struct {
PyObject *PGFError;
PgfExnType handleError(PgfExn err);
PgfText *CString_AsPgfText(const char *s, size_t size);
PgfText *PyUnicode_AsPgfText(PyObject *pystr);
PyObject *PyUnicode_FromPgfText(PgfText *text);
PgfTypeHypo *PyList_AsHypos(PyObject *pylist, Py_ssize_t *n_hypos);
PyObject *PyList_FromHypos(PgfTypeHypo *hypos, const size_t n_hypos);
PgfPrintContext *PyList_AsPgfPrintContext(PyObject *pylist);
void FreePgfPrintContext(PgfPrintContext *ctxt);
PgfUnmarshaller unmarshaller;
PgfMarshaller marshaller;