forked from ebitengine/purego
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Syscall Sysv: Add support for unreferencing callbacks
Also deduplicate callbacks by function pointer. Function equality in Go is problematic, which is why functions are not comparable in the language spec or via reflect.Value.Equal(). For our particular use-case though I believe that comparing function pointers is good enough, since we don't need to differentiate closures based on scope variable content.
- Loading branch information
Showing
2 changed files
with
149 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters