Skip to content

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

Merged
merged 3 commits into from
Aug 13, 2023
Merged

Update python_embed.c #116

merged 3 commits into from
Aug 13, 2023

Conversation

mgaertne
Copy link
Contributor

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

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
Copy link
Collaborator

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
Comment on lines 1922 to 1924
#if PY_MINOR_VERSION < 7
PyEval_InitThreads();
#endif
Copy link
Collaborator

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
@em92
Copy link
Collaborator

em92 commented May 8, 2023

Hi, Markus! Recently pushed github workflow for automatic testing, if minqlx does compile. Could you please rebase your branch on newest master?

@mgaertne
Copy link
Contributor Author

Done. The github actions did not trigger, though, unfortunately. :/

@em92
Copy link
Collaborator

em92 commented May 13, 2023

Done. The github actions did not trigger, though, unfortunately. :/

I think you forgot to push commits

@mgaertne
Copy link
Contributor Author

Now I think it worked.

@em92 em92 merged commit fbdd915 into MinoMino:master Aug 13, 2023
@em92
Copy link
Collaborator

em92 commented Aug 13, 2023

I thought I merged it long time ago. :D

@mgaertne mgaertne deleted the patch-5 branch August 15, 2023 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants