<html><head></head><body style="zoom: 0%;"><div dir="auto">To be fair I started to do it this way, and ran into the issue that luaL_checkudata is strict on the type it is checking (no "polymorphism"), and you'd need to add a wrapper around that to have the functions in variables.c work. Note that the wrapper is not easy to implement properly, at least with my small understanding of Lua.<br><br></div>
<div dir="auto">I finally decided that a simpler and less intrusive patch was more fitting. As the Lua code almost did not change for 7+ years, I preferred this simple fix to a very bad problem introduced in a relatively recent patchset. Reworking the Lua types could be done as well but I think it is a different matter.<br><br></div>
<div dir="auto">To give more input about the bug: I use the HTTP interface, and calling /requests/status.json in a loop would cause a segmentation fault systematically.<br></div>
<div class="gmail_quote" >On Feb 23, 2020, at 15:35, "Rémi Denis-Courmont" <<a href="mailto:remi@remlab.net" target="_blank">remi@remlab.net</a>> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="blue">Le perjantaina 21. helmikuuta 2020, 16.04.31 EET <br>quentin.chateau@deepskycorp.com a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> From: Quentin Chateau <quentin.chateau@deepskycorp.com><br> <br> As a single metatable for vlc_object exists<br> all lua objects in objects.c would be freed<br> with the same release function<br></blockquote><br>Yes but isn't it far simpler to use a different meta table for each object <br>type?<br></pre></blockquote></div></body></html>