Skip to content
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

Fix typo for Python <= 3.8. #146

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Fix typo for Python <= 3.8. #146

merged 1 commit into from
Jan 30, 2024

Conversation

J08nY
Copy link
Contributor

@J08nY J08nY commented Jan 23, 2024

This was introduced by accident in #138.

The typo leads to errors like below, when trying to build for Python <= 3.8:

gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DOPENSSL_NO_SSL3 -fPIC -Icypari2 -I/tmp/virt/lib/python3.8/site-packages/cysignals -I/usr/include -I/tmp/virt/include -I/home/jjan/.pyenv/versions/3.8.18/include/python3.8 -c cypari2/convert.c -o build/temp.linux-x86_64-3.8/cypari2/convert.o
In file included from /home/jjan/.pyenv/versions/3.8.18/include/python3.8/pytime.h:6,
                 from /home/jjan/.pyenv/versions/3.8.18/include/python3.8/Python.h:85,
                 from cypari2/convert.c:49:
cypari2/pycore_long.h: In function_PyLong_SetSignAndDigitCount’:
cypari2/pycore_long.h:92:13: error: ‘oundeclared (first use in this function); did you meanop’?
   92 |     Py_SIZE(o) = size;
      |             ^
/home/jjan/.pyenv/versions/3.8.18/include/python3.8/object.h:119:47: note: in definition of macro_PyVarObject_CAST119 | #define _PyVarObject_CAST(op) ((PyVarObject*)(op))
      |                                               ^~
cypari2/pycore_long.h:92:5: note: in expansion of macroPy_SIZE92 |     Py_SIZE(o) = size;
      |     ^~~~~~~
cypari2/pycore_long.h:92:13: note: each undeclared identifier is reported only once for each function it appears in
   92 |     Py_SIZE(o) = size;
      |             ^
/home/jjan/.pyenv/versions/3.8.18/include/python3.8/object.h:119:47: note: in definition of macro_PyVarObject_CAST119 | #define _PyVarObject_CAST(op) ((PyVarObject*)(op))
      |                                               ^~
cypari2/pycore_long.h:92:5: note: in expansion of macroPy_SIZE92 |     Py_SIZE(o) = size;
      |     ^~~~~~~
error: command 'gcc' failed with exit status 1

This was introduced by accident in sagemath#138.
@tornaria
Copy link
Contributor

tornaria commented Jan 23, 2024

LGTM, my bad sorry.

This file is also in cypary2 fpyll and sagemath. I should really get it into cython itself.

@fchapoton fchapoton merged commit 7cfdfcb into sagemath:master Jan 30, 2024
@tornaria tornaria mentioned this pull request Feb 1, 2024
vbraun pushed a commit to vbraun/sage that referenced this pull request Feb 1, 2024
    
This fixes the same issue as in
sagemath/cypari2#146.

Typo was added in dc71bd0.
    
URL: sagemath#37194
Reported by: Ján Jančár
Reviewer(s): Gonzalo Tornaría, Sebastian Spindler
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.

None yet

3 participants