Add FreePgfText function

This commit is contained in:
John J. Camilleri
2021-09-24 15:00:10 +02:00
parent d17ca06faf
commit 4719e509a5
4 changed files with 43 additions and 32 deletions

View File

@@ -28,8 +28,6 @@ PgfExnType handleError(PgfExn err)
// ----------------------------------------------------------------------------
// conversions
//
// You have to remember to call PyMem_Free on these things!
PgfText *
CString_AsPgfText(const char *s, size_t size) {
@@ -154,6 +152,15 @@ PyList_AsPgfPrintContext(PyObject *pylist)
return ctxt;
}
// ----------------------------------------------------------------------------
// freers
void
FreePgfText(PgfText *txt)
{
PyMem_RawFree(txt);
}
void
FreePgfPrintContext(PgfPrintContext *ctxt)
{