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 types of values in libc.limits #2016

Merged
merged 2 commits into from
Nov 25, 2017
Merged

Conversation

jdemeyer
Copy link
Contributor

@jdemeyer jdemeyer commented Nov 21, 2017

from libc.limits cimport LONG_MAX
print(f"{LONG_MAX}")

currently gives -1 on a 64-bit system because Cython thinks that LONG_MAX is of type int.

This requires #2020.

entry.is_const or
entry.is_cfunction or
entry.is_builtin or
entry.type.is_const):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to also have a test case for this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an existing test case in tests/run/carrays.pyx. In fact, I made this change because that test case broke.

@scoder scoder added this to the 0.28 milestone Nov 24, 2017
@scoder
Copy link
Contributor

scoder commented Nov 25, 2017

Cool, thanks!

@scoder scoder merged commit f5a4c93 into cython:master Nov 25, 2017
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

2 participants