aboutsummaryrefslogtreecommitdiff
path: root/bindings/python/tree_sitter_gsp/binding.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-14 18:10:53 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-14 18:10:53 +0200
commitcde4f74ed9dffa1415d9021c343eb599e8866b4d (patch)
tree68cd8ec7ed3458515736ef825abcf39979602338 /bindings/python/tree_sitter_gsp/binding.c
parentc549d8b3bbbade9ccb8c208295b35f5afbc7913b (diff)
Update the grammar a bit
Diffstat (limited to 'bindings/python/tree_sitter_gsp/binding.c')
-rw-r--r--bindings/python/tree_sitter_gsp/binding.c4
1 files changed, 2 insertions, 2 deletions
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[] = {