Skip to content

SWIGCommon: add missing output-only typemaps for pointers to boolean scalars

Karl Wette requested to merge ANU-CGA/lalsuite:swig-boolean-output into master

Description

By default SWIG treats pointers to primitive scalars (int*, float*, etc.) as output-only arguments, so that C functions of the form XLALDoSomething(<SCALAR> return_value*, ...) are called from Python/Octave as return_value = DoSomething(...).

This MR adds missing typemaps to enable this functionality for boolean types (C bool, LAL BOOLEAN), which fixes part of !1989 (merged).

API Changes and Justification

Strictly speaking, this modifies the SWIG API, but in a way that enables functions to be used which couldn't be used before, so there's little risk of backward incompatibility.

Backwards Compatible Changes

  • This change does not modify any class/function/struct/type definitions in a public C header file or any Python class/function definitions
  • This change adds new classes/functions/structs/types to a public C header file or Python module

Backwards Incompatible Changes

  • This change modifies an existing class/function/struct/type definition in a public C header file or Python module
  • This change removes an existing class/function/struct/type from a public C header file or Python module

Review Status

N/A

Merge request reports

Loading