> On May 24, 2025, at 15:15, キャロウ マーク <[email protected]> wrote:
> 
> The problem must be caused by this 4.0.8 change noted in the changelog:
> 
>     Embind's val now requires a pointer policy when using pointers. e.g. (val 
> v(pointer, allow_raw_pointers()).
> 
> https://emscripten.org/docs/api_reference/val.h.html does not even mention 
> allow_raw_pointers. I have looked at val.h and at the commit which made this 
> change but I remain at a loss how to change my declaration, below, to 
> incorporate `allow_raw_pointers()`. 
>  
> 
> val ret = val::object();
> 
> Please enlighten me.
> 

I have found a way to fix this thanks to the rdkit project having ti fix the 
same issue. Change from

     ret.set("transcodedImage", dst);

to

     ret.set("transcodedImage", val(dst, allow_raw_pointers()));

I have no idea if this is creating an extra copy of the TranscodedImage object 
(dst) or not.

Regards

    -Mark

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/emscripten-discuss/1C87A72A-04E7-4327-8815-CB1418C8D7A8%40callow.im.

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to