[Github-comments] [geany/geany-plugins] geanypy: Use Python callback return value for keybindings return value (#809)

Colomban Wendling notifications at xxxxx
Fri Jan 4 23:09:17 UTC 2019


This should fix #808.

The approach here is to try and have the Python callback return value be used as the C one is. I'm not totally sure how compatible that is, but IIUC if a Python function doesn't explicitly return it returns None, which should (I guess) fail the `PyObject_IsTrue()` check.

I did *not* test this *at all*: I didn't even try to build it (thanks to a crappy Internet connection tonight, I didn't wait long enough to fetch the dependencies).  This PR should be reviewed as what it is: an attempt at a fix by a guy that doesn't know neither the API nor the plugin :)

However, this should also fix a leak as the return value should likely be `DECREF`'d in any case.
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany-plugins/pull/809

-- Commit Summary --

  * geanypy: Use Python callback return value for keybindings return value

-- File Changes --

    M geanypy/src/geanypy-keybindings.c (8)

-- Patch Links --

https://github.com/geany/geany-plugins/pull/809.patch
https://github.com/geany/geany-plugins/pull/809.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/809
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190104/a6a62aff/attachment.html>


More information about the Github-comments mailing list