mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
fix the definition of PgfMarshallerVtbl for C
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user