From cde4f74ed9dffa1415d9021c343eb599e8866b4d Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 14 Sep 2024 18:10:53 +0200 Subject: Update the grammar a bit --- bindings/python/tree_sitter_gsp/binding.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bindings/python') diff --git a/bindings/python/tree_sitter_gsp/binding.c b/bindings/python/tree_sitter_gsp/binding.c index 569c1dc..f645ec7 100644 --- a/bindings/python/tree_sitter_gsp/binding.c +++ b/bindings/python/tree_sitter_gsp/binding.c @@ -4,8 +4,8 @@ typedef struct TSLanguage TSLanguage; TSLanguage *tree_sitter_gsp(void); -static PyObject* _binding_language(PyObject *self, PyObject *args) { - return PyLong_FromVoidPtr(tree_sitter_gsp()); +static PyObject* _binding_language(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(args)) { + return PyCapsule_New(tree_sitter_gsp(), "tree_sitter.Language", NULL); } static PyMethodDef methods[] = { -- cgit v1.2.3