Skip to content

Commit

Permalink
COMP: include stdlib.h for SWIG free/malloc with the Stable ABI
Browse files Browse the repository at this point in the history
Needed by SWIG for free/malloc, but not included by Python.h with recent versions of the Stable ABI

Addresses:

  C:\P\IPP\ITK-win_311-x64\Wrapping\Modules\ITKIOImageBase\itkImageSeriesWriterPython.cpp(1416): error C3861: 'free': identifier not found
  C:\P\IPP\ITK-win_311-x64\Wrapping\Modules\ITKIOImageBase\itkImageSeriesWriterPython.cpp(1562): error C3861: 'malloc': identifier not found
  • Loading branch information
thewtex committed Apr 3, 2024
1 parent 3c5a0e3 commit 378db77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Wrapping/Generators/Python/PyBase/pyBase.i
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ if _version_info < (3, 7, 0):
from . import _ITKCommonPython
%}

%{
// Needed by SWIG for free/malloc, but not included by Python.h with recent versions of the Stable ABI
#include "stdlib.h"
%}

//By including pyabc.i and using the -py3 command line option when calling SWIG,
//the proxy classes of the STL containers will automatically gain an appropriate
//abstract base class.
Expand Down

0 comments on commit 378db77

Please sign in to comment.