proxy.golang.org : github.com/godeps/dl
Package dl implements dynamic of shared libraries, like dlopen() and dlsym() in C. This package supports the following type mapping between Go and C. No struct types are supported at this time. Symbols pointing to variables might be retrieved either as values or pointers. Given a C library which declares a symbol as: It might be retrieved as a value, returning a copy with: Alternatively, a pointer to the variable might be obtained as: Note that changing the value via the pointer will change the symbol in the loaded library, while changing the value obtained without the pointer will not, since a copy is made at lookup time. This package also supports dynamically loading functions from libraries. To do so you must declare a function variable which matches the signature of the C function. Note that type mismatches will likely result in crashes, so use this feature with extreme care. Argument and return types must be of one of the supported types. See the examples in this package for the complete code. Functions retrieved from a symbol can be used as standard Go functions. Typically, calling functions via this package rather than using cgo directly takes around 500ns more per call, due to reflection overhead. Future versions might adopt a JIT strategy which should make it as fast as cgo.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/godeps/dl
License: MPL-2.0
Latest release: about 6 years ago
First release: about 6 years ago
Namespace: github.com/godeps
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 2 months ago