tonycoz / imager

Imager - image manipulation from perl.
http://imager.perl.org/
27 stars 3 forks source link

[ABI] add API to convert SV* to i_color, i_fcolor for use in typemaps and internally #497

Open tonycoz opened 2 years ago

tonycoz commented 2 years ago

I'm considering changing the way i_color/i_fcolor objects are stored in perl land as objects, currently they're done as PTROBJs, but this is complex to duplicate across perl thread creation, so we currently don't try, using CLONE_SKIP.

The new form will store the i_color/i_fcolor struct as the PV part of an SV which will then be cloned across thread creation like any other perl SV.

Unfortunately this doesn't work for more complex types like images, fills.

tonycoz commented 2 years ago

Postponed for now, this will require incompatible changes between allocating i_color objects and Imager::Color objects that would lead to leaks.