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

Replace ssize_t with Py_ssize_t #1706

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tetov
Copy link

@tetov tetov commented Nov 2, 2023

I ran into the same issue brought up in #1658 while updating the conda-forge feedstock for openvdb.

On Windows and Python > 3.9 ssize_t is undeclared.

%SRC_DIR%\openvdb\openvdb\python\pyGrid.h(325,33): error C2065: 'ssize_t': undeclared identifier (compiling source file %SRC_DIR%\openvdb\openvdb\python\pyFloatGrid.cc) [%SRC_DIR%\build\openvdb\openvdb\python\pyopenvdb.vcxproj]

I opted to replace every ssize_t with Py_ssize_t but this could of course also have been done with a typedef or using. I'm open to other solutions.

I'm attaching two logs from the PR mentioned from conda-forge's CI.

Passes: win_64_numpy1.22python3.9.____cpython Azure CI attached log file

Fails: win_64_numpy1.22python3.10.____cpython Azure CI attached log file

The logs will be removed from Azure CI after 1 month.

@tetov tetov requested a review from kmuseth as a code owner November 2, 2023 14:52
Copy link

linux-foundation-easycla bot commented Nov 2, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: tetov / name: Anton Tetov (70f0ef4)

@Idclip
Copy link
Contributor

Idclip commented Dec 12, 2023

Hi @tetov, thanks for this! Can you sign-off your commit (git commit -s) and we can accept this change

Signed-off-by: Anton Tetov <anton@tetov.se>
@tetov tetov force-pushed the using-ssize_t-equals-Py_ssize_t-semicolon branch from 922675c to 70f0ef4 Compare December 26, 2023 12:06
@tetov
Copy link
Author

tetov commented Dec 26, 2023

Hi @Idclip, I've just force pushed after git commit --amend -s. Thanks!

@tetov
Copy link
Author

tetov commented Dec 26, 2023

@Idclip I see now that 922675c was also signed-off, am I missing something else?

@Idclip
Copy link
Contributor

Idclip commented Jan 5, 2024

@Idclip I see now that 922675c was also signed-off, am I missing something else?

Hey @tetov this looks good now, thanks! Approved

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.

[BUILD] Python module failure to build on MSVC 2022 with numpy: ssize_t: undeclared identifier
3 participants