fix the definition of PgfMarshallerVtbl for C

This commit is contained in:
krangelov
2021-09-09 17:58:18 +02:00
parent 2f9c784fed
commit 7c622d2621
2 changed files with 6 additions and 6 deletions

View File

@@ -203,9 +203,9 @@ struct PgfUnmarshaller {
typedef struct PgfMarshaller PgfMarshaller;
typedef struct PgfMarshallerVtbl PgfMarshallerVtbl;
struct PgfMarshallerVtbl {
object (*match_lit)(PgfUnmarshaller *u, PgfLiteral lit);
object (*match_expr)(PgfUnmarshaller *u, PgfExpr expr);
object (*match_type)(PgfUnmarshaller *u, PgfType ty);
object (*match_lit)(PgfMarshaller *this, PgfUnmarshaller *u, PgfLiteral lit);
object (*match_expr)(PgfMarshaller *this, PgfUnmarshaller *u, PgfExpr expr);
object (*match_type)(PgfMarshaller *this, PgfUnmarshaller *u, PgfType ty);
};
struct PgfMarshaller {
PgfMarshallerVtbl *vtbl;

View File

@@ -180,7 +180,7 @@ PyString_AsPgfText(PyObject *pystr)
// ----------------------------------------------------------------------------
object match_lit(PgfUnmarshaller *u, PgfLiteral lit)
object match_lit(PgfMarshaller *this, PgfUnmarshaller *u, PgfLiteral lit)
{
PyObject *pyobj = (PyObject *)lit;
@@ -200,13 +200,13 @@ object match_lit(PgfUnmarshaller *u, PgfLiteral lit)
}
}
object match_expr(PgfUnmarshaller *u, PgfExpr expr)
object match_expr(PgfMarshaller *this, PgfUnmarshaller *u, PgfExpr expr)
{
PyErr_SetString(PyExc_NotImplementedError, "match_expr not implemented");
Py_RETURN_NOTIMPLEMENTED;
}
object match_type(PgfUnmarshaller *u, PgfType ty)
object match_type(PgfMarshaller *this, PgfUnmarshaller *u, PgfType ty)
{
TypeObject *type = (TypeObject *)ty;