AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Mozilla Public License 2.0
2.62k stars 647 forks source link

Replace ssize_t with Py_ssize_t #1706

Open tetov opened 11 months ago

tetov commented 11 months ago

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](https://github.com/AcademySoftwareFoundation/openvdb/files/13241116/win_64_numpy1.22python3.9.__cpython.log)

Fails: win_64_numpy1.22python3.10.__cpython Azure CI [attached log file](https://github.com/AcademySoftwareFoundation/openvdb/files/13241126/win_64_numpy1.22python3.10.__cpython.log)

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

linux-foundation-easycla[bot] commented 11 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

Idclip commented 9 months ago

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

tetov commented 9 months ago

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

tetov commented 9 months ago

@Idclip I see now that https://github.com/AcademySoftwareFoundation/openvdb/commit/922675c255bd3c413daf417aba63ef06ccadf2fe was also signed-off, am I missing something else?

Idclip commented 8 months ago

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

Hey @tetov this looks good now, thanks! Approved