Skip to content

bpo-9566: Silence warning in gcmodule.c caused by pydtrace.h #2852

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

Closed
wants to merge 1 commit into from

Conversation

segevfiner
Copy link
Contributor

@segevfiner segevfiner commented Jul 24, 2017

..\Modules\gcmodule.c(1085): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data

Caused by DTrace stubs being defined as taking int. The real one takes a long (Include/pydtrace.d:12), which is probably 64-bit on architectures where DTrace is available but it is 32-bit on Windows x64. It really needs a Py_ssize_t but I'm not familiar enough with DTrace to change pydtrace.d. I think we can simply change the stub to a larger integer type without it causing issues... And maybe if someone really finds an issue he can also change pydtrace.d in the future.

https://bugs.python.org/issue9566

@benjaminp
Copy link
Contributor

We shouldn't just change the definition here. Either we need to change the type in pydtrace.d or just pass an int into the trace function in gcmodule.c.

@vstinner
Copy link
Member

vstinner commented Mar 6, 2019

I merged PR #11010 instead, sorry!

@vstinner vstinner closed this Mar 6, 2019
@segevfiner segevfiner deleted the bpo-9566-dtrace-warning branch March 6, 2019 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants