Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 739
    • Issues 739
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 200
    • Merge requests 200
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

An update will be applied May 24th, between 12PM and 1PM EDT (UTC -400). The site may be slow during that time.

  • VTK
  • VTKVTK
  • Merge requests
  • !1582

Merged
Created Jun 20, 2016 by Max Smolens@msmolensDeveloper

Add #include for offsetof() macro in generated Python wrappers

  • Overview 7
  • Commits 1
  • Changes 1

The generated Python wrappers use the C offsetof() macro, but don't #include the header that defines the macro (). For example, see https://gitlab.kitware.com/vtk/vtk/blob/636aa17/Wrapping/Tools/vtkWrapPythonClass.c#L553.

This commit adds the proper header to the generated Python wrappers. Without this, wrapping could fail unless is indirectly included through the header of the class being wrapped. An example error message is:

Libs/MRML/Core/vtkMRMLSubjectHierarchyConstantsPython.cxx:853:40: error: ‘offsetof’ was not declared in this scope
   offsetof(PyVTKObject, vtk_weakreflist), // tp_weaklistoffset
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: python-wrapping-include-cstddef