aboutsummaryrefslogtreecommitdiff
path: root/bindings/python
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/python')
-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[] = {