-
Notifications
You must be signed in to change notification settings - Fork 41
Update python_embed.c #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fixed two things that changed with python version 3.7: - PyUnicode_AsUTF8 now returns a const char* rather than just a char* - PyEval_InitThreads() does nothing, since it's now called in Py_Initialize(), and will be removed with python version 3.11
python_embed.c
Outdated
@@ -1499,7 +1500,11 @@ void replace_item_core(gentity_t* ent, int item_id) { | |||
static PyObject* PyMinqlx_ReplaceItems(PyObject* self, PyObject* args) { | |||
PyObject *arg1, *arg2 ; | |||
int entity_id = 0, item_id = 0; | |||
#if PY_MINOR_VERSION < 7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True statement for Python 3.5, 3.6, 4.0, 4.1 .. 4.6.
Suggesting to use PY_VERSION_HEX
python_embed.c
Outdated
#if PY_MINOR_VERSION < 7 | ||
PyEval_InitThreads(); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to using PY_VERSION_HEX. Hope it's self-explanatory enough
Hi, Markus! Recently pushed github workflow for automatic testing, if minqlx does compile. Could you please rebase your branch on newest master? |
Done. The github actions did not trigger, though, unfortunately. :/ |
I think you forgot to push commits |
Now I think it worked. |
I thought I merged it long time ago. :D |
fixed two things that changed with python version 3.7: