about summary refs log tree commit diff stats
path: root/src/plugins/python_api.c
Commit message (Collapse)AuthorAgeFilesLines
* plugin: python: fix build for Python 3.11Đoàn Trần Công Danh2022-09-241-0/+8
| | | | | | | From Python 3.11, PyFrameObject has been changed into opaque struct. We need to access those fields via API. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
* Fix python executed during configurej.r2022-02-181-4/+4
| | | | | | | | | | | | | | | Previously it relied on AX_PYTHON_DEVEL, which in turn executes python-config to get the build flags. However this does not work while cross compiling because we can't execute the python-config build for the target platform. To circumvent this problem the python build flags are now queried via pkgconfig, which has the drawback of not having some extra build flags, but they do not seem to be needed. I tested this patch with the termux build system and it build without their existing hack of injecting python after the configure step. I also tested non cross compile build on Arch Linux and it also still works. Fixes #851
* python_api.c: enlarge `c_arguments` array to avoid OOB writeSergei Trofimovich2021-11-261-1/+1
| | | | | | | | | Code below explicitly refers past `args_len`th element: c_arguments[args_len][0] = NULL; c_arguments[args_len][1] = NULL; Let's always allocate space for `NULL`. Noticed by Steffen Jaeckel.
* src/plugins/python_api.c: drop redundant NULL pointer checkSergei Trofimovich2021-11-181-1/+1
| | | | | | | | | | | | gcc-12 detects redundant check against array of arrays as: src/plugins/python_api.c: In function ‘python_api_register_command’: src/plugins/python_api.c:199:31: error: the comparison will always evaluate as ‘true’ for the address of ‘c_arguments’ will never be NULL [-Werror=address] 199 | while (c_arguments[i] != NULL && c_arguments[i][0] != NULL) { | ^~ src/plugins/python_api.c:161:15: note: ‘c_arguments’ declared here 161 | char* c_arguments[args_len == 0 ? 0 : args_len + 1][2]; | ^~~~~~~~~~~
* Add plugin get_barejid_from_roster functionDustin Lagoy2021-04-291-0/+22
|
* Change nick to name in api to match conventionDustin Lagoy2021-04-281-5/+5
| | | | | Change all instances of *get_nick_from_roster to *get_name_from_roster to match the convention of names in the roster itself.
* Add plugin prof_get_nick_from_roster functionDustin Lagoy2021-04-281-0/+23
|
* Apply coding styleMichael Vetter2020-07-071-319/+317
|
* Revert "Apply coding style"Michael Vetter2020-07-071-322/+324
| | | | | | This reverts commit 9b55f2dec0ea27a9ce4856e303425e12f866cea2. Sorting the includes creates some problems.
* Apply coding styleMichael Vetter2020-07-071-324/+322
| | | | Regards https://github.com/profanity-im/profanity/issues/1396
* Add vim modelineMichael Vetter2019-11-131-0/+1
|
* plugins/python: fix double _XOPEN_SOURCE definitionDmitry Podgorny2019-10-151-0/+1
| | | | | | | | | | | | | ncursesw defines _XOPEN_SOURCE macro via command-line. In particular, it is defined in ncursesw.pc and extracted via pkg-config. From other side, Python defines the same macro unconditionally in pyconfig.h. Python-3.x defines the macro with value different than ncursesw does. In turn, this causes a warning that the macro is redefined. And warnings are treated as errors. Since both entities define the mecro unconditionally, we can't simply reorder headers as Python developers suggest. So, undefine the macro just before the <Python.h> to fix this silly issue.
* Sort includes in python_api.cMichael Vetter2019-10-071-5/+2
|
* Fix double initialization of loop iteratorMichael Vetter2019-07-221-2/+0
|
* Update copyright to include 2019Michael Vetter2019-01-221-1/+1
|
* Update copyrightJames Booth2018-01-211-1/+1
|
* Update CopyrightJames Booth2017-01-281-1/+1
|
* Add chat and room show calls to plugins apiJames Booth2017-01-211-0/+128
|
* Allow room display properies to be set by pluginsJames Booth2017-01-201-0/+98
|
* Allow chat prefix char to be set by pluginsJames Booth2017-01-201-0/+98
|
* Add titlebar encryption text to plugins apiJames Booth2017-01-191-0/+49
|
* Add prof.encryption_reset to Plugins APIJames Booth2017-01-181-0/+19
| | | | issue #885
* Add get_room_nick to plugins apiJames Booth2016-11-061-0/+22
|
* Allow filepath autocompletion in pluginsJames Booth2016-10-101-0/+25
| | | | closes #858
* Remove disco features added by plugins on unloadJames Booth2016-08-111-1/+4
|
* Rename plugins settings functionsJames Booth2016-08-071-24/+24
|
* Return boolean on prof_settings_string_list_remove_all()James Booth2016-08-011-3/+10
|
* Remove log debugsJames Booth2016-08-011-7/+0
|
* Add string lists settings to pluginsJames Booth2016-08-011-0/+125
|
* Fix memory leaksJames Booth2016-07-251-1/+3
|
* Use Py_RETURN_NONEJames Booth2016-07-251-56/+56
|
* Free python_str_or_unicode_to_string resultsJames Booth2016-07-251-4/+23
|
* Remove debug on plugin win createJames Booth2016-07-241-1/+0
|
* Tidy headersJames Booth2016-07-241-1/+1
|
* Reorder headersJames Booth2016-07-241-2/+2
|
* Python plugins: Free string valuesJames Booth2016-07-241-2/+57
|
* Merge branch 'master' into python3James Booth2016-07-241-1/+1
|\ | | | | | | | | Conflicts: .gitignore
| * Update GPL link in headersJames Booth2016-07-241-1/+1
| |
* | Allow str and unicode in python apiJames Booth2016-07-241-117/+212
| |
* | Tidy python3 conditional codeJames Booth2016-07-191-38/+19
| |
* | Add python_init_prof()James Booth2016-07-181-0/+14
| |
* | Fix prof module init for python3James Booth2016-07-181-15/+21
| |
* | Added PYTHON3 defineJames Booth2016-07-141-2/+47
|/
* Pass plugin name to all autocompleter functionsJames Booth2016-07-041-2/+12
|
* Free plugins commands on quitJames Booth2016-07-041-9/+17
|
* Add plugin name to win_create api callJames Booth2016-07-031-1/+4
|
* Pass plugin name to api layerJames Booth2016-06-301-5/+5
|
* Revert "WIP - Unload plugin commands"James Booth2016-06-301-2/+2
| | | | This reverts commit a01eb5d08e1b39d60a6f8fc26e5a87ceb92ec18f.
* WIP - Unload plugin commandsJames Booth2016-06-291-2/+2
|
* Add macro for plugins completer addJames Booth2016-06-231-0/+3
|