You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It does look strange, but I believe can work. If you dig into it, you find that glowDebugMessageCallback ignores its callback parameter.
I don't know why there is a callback parameter. One thought I had was that it could be to prevent garbage collection of the function value, but I guess that doesn't make sense because the function value is stored in userDebugCallback.
@errcw could you shed light on the callback parameter? Could it be eliminated from C.glowDebugMessageCallback`, or otherwise could we add a comment explaining its reason for existence?
If I remember correctly it's simply an artifact of the code generation, i.e., it just takes the C definition so ends up with an extraneous parameter that is dropped so the C/Go machinery works. It would be a reasonable enhancement to add a comment or, even better, remove the unused parameter entirely (though if it involves too much special casing I'd be wary).
For example, in the current
DebugMessageCallback
implementation, Go function's pointer is converted to a C pointer:I was wondering if this really works, and anyone tests this. I found #40 , and perhaps these functions don't work now?
The text was updated successfully, but these errors were encountered: