Does anyone know where it is defined in the source?
I'm having issues in the Shuffler (which have been there for ages already) where a C-struct is being freed, but then after that, a callback is being called from pike which still references the (now freed) C-struct.
The freeing of the C-struct needs to be delayed until all references to the callback function are gone (which probably implies that I need to turn the struct over to the garbage collector, which implies that it needs to be an svalue, I presume). If anyone has better ideas for this, I'm all ears.
Stephen R. van den Berg wrote:
The freeing of the C-struct needs to be delayed until all references to the callback function are gone (which probably implies that I need to turn the struct over to the garbage collector, which implies that it needs to be an svalue, I presume). If anyone has better ideas for this,
I think I solved it. I'm still wondering where that function lives though. I'm guessing that it's some cleverly obfuscated macro-generated code.
Stephen R. van den Berg wrote:
The freeing of the C-struct needs to be delayed until all references to the callback function are gone (which probably implies that I need to turn the struct over to the garbage collector, which implies that it needs to be an svalue, I presume). If anyone has better ideas for this,
I think I solved it. I'm still wondering where that function lives though. I'm guessing that it's some cleverly obfuscated macro-generated code.
As you guessed: From src/modules/_Stdio/file.c:
CBFUNCS(read_callback, PIKE_FD_READ)
/grubba
pike-devel@lists.lysator.liu.se