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
We've got a bunch of poorly written, hard-coded callbacks in our codebase.
Today I discovered that cl-webkit has a generic way to handle callbacks. It's in the (unused!) callback.lisp file.
No more need to push / pop into a global *callbacks* list.
(By the way, did you know that this strategy is used by CFFI under the hood to implement defcallback? So here with cl-webkit we reinvent the wheel, but poorly.)
To do:
Export with-g-async-ready-callback
Fix define-g-async-ready-callback to declare all arguments as ignorable, otherwise we quickly get warnings.
Find a way to pass the result symbol as parameter to with-g-async-ready-callback, otherwise the only way to get the result from the callback is to refer to the hard-coded webkit::result name, which ain't pretty.
We've got a bunch of poorly written, hard-coded callbacks in our codebase.
Today I discovered that cl-webkit has a generic way to handle callbacks. It's in the (unused!) callback.lisp file.
I was thus able to do this (atlas-engineer/nyxt@4e2ecdf#diff-9df864619800a42d41380418e1c5af907bdcc9c453e5ae1ce003951a86c0aed6R1824):
Benefits:
*callbacks*
list.(By the way, did you know that this strategy is used by CFFI under the hood to implement
defcallback
? So here with cl-webkit we reinvent the wheel, but poorly.)To do:
with-g-async-ready-callback
define-g-async-ready-callback
to declare all arguments as ignorable, otherwise we quickly get warnings.result
symbol as parameter towith-g-async-ready-callback
, otherwise the only way to get the result from the callback is to refer to the hard-codedwebkit::result
name, which ain't pretty.Thoughts?
@aartaka
The text was updated successfully, but these errors were encountered: