Skip to content

Various SWIG fixes

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

Description

  • Fix memory leak with double pointers which are both input and output arguments. Reported by Reinhard when using the XLALComputeFstat() function
  • Fix memory leak when assigning pointers to certain data structures. Use SWIGLAL macro NO_OWN_ON_ASSIGNMENT() to indicate the data structure doesn't take ownership of the pointer, so that it is still destroyed correctly. Use this macro to fix memory leak with a data structure used with XLALComputeFstat().
  • Unify two SWIGLAL macros OWNS_THIS_ARG() and OWNS_THIS_STRING(). The macro OWNS_THIS_ARG() now handles both string and non-string types, which some typedef/preprocessor hackery behind the scenes to distinguish the cases.

API Changes and Justification

Backwards Compatible Changes

  • This change introduces no API changes
  • This change adds new API calls

Backwards Incompatible Changes

  • This change modifies an existing API
  • This change removes an existing API

Review Status

N/A

Merge request reports