[vtk-developers] Warnings with python 2.6, python guru wanted
Prabhu Ramachandran
prabhu at aero.iitb.ac.in
Sun May 10 09:11:07 EDT 2009
On 04/25/09 22:31, Francois Bertel wrote:
> The first 6 warnings in VTK/Common/vtkPythonUtil.cxx on arkadia are
> due to the use of Python 2.6 in Ubuntu 9.04:
>
> http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=319881
>
> I identified 2 issues:
Thanks for tracking these:
The resolution for issue 1 seems OK to me.
> ISSUE2:
>
> the same /usr/include/python2.6/object.h also contains:
>
> typedef struct _typeobject {
> [...]
> /* Type attribute cache version tag. Added in version 2.6 */
> unsigned int tp_version_tag;
> [...]
> } PyTypeObject;
>
>
> How should PyVTKObjectType in VTK/Common/vtkPythonUtil.cxx be safely
> changed to avoid the warning?
>
>
I think you can replace this with:
52 #if PY_VERSION_HEX >= 0x02030000
53 #define VTK_PYTHON_UTIL_SUPRESS_UNINITIALIZED \
54 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,
55 #elif PY_VERSION_HEX >= 0x02020000
56 #define VTK_PYTHON_UTIL_SUPRESS_UNINITIALIZED \
57 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
58 #else
59 #define VTK_PYTHON_UTIL_SUPRESS_UNINITIALIZED
60 #endif
#if PY_VERSION_HEX >= 0x02060000
#define VTK_PYTHON_UTIL_SUPRESS_UNINITIALIZED \
0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0
#elif PY_VERSION_HEX >= 0x02030000
#define VTK_PYTHON_UTIL_SUPRESS_UNINITIALIZED \
0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,
#elif PY_VERSION_HEX >= 0x02020000
#define VTK_PYTHON_UTIL_SUPRESS_UNINITIALIZED \
0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0,
#else
#define VTK_PYTHON_UTIL_SUPRESS_UNINITIALIZED
#endif
and try if that fixes it. I haven't yet moved to 2.6 to know if that
will work.
Thanks.
cheers,
prabhu
More information about the vtk-developers
mailing list