Skip to content
  • Michael Natterer's avatar
    pdb, libgimp: add a HORRIBLE hack to make sure objects arrays don't leak · 46608393
    Michael Natterer authored
    In the generated libgimp wrappers, we can't return object arrays
    from a call to GIMP_VALUES_DUP_OBJECT_ARRAY() because it returns
    a deep copy and adds a reference to all objects, which the caller
    would have to unref.
    
    But we want a shallow (transfer container) copy because we don't want
    libgimp proxy objects to be refed or unrefed by any user code.
    
    Therefore, add a HACK that simply memdup()s and returns the
    GimpObjectArray's array memory, and leaves the contained object
    pointers alone.
    46608393