| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Loadso.Safe
Synopsis
- sDL_LoadObject :: PtrConst CChar -> IO (Ptr SDL_SharedObject)
- sDL_LoadFunction :: Ptr SDL_SharedObject -> PtrConst CChar -> IO SDL_FunctionPointer
- sDL_UnloadObject :: Ptr SDL_SharedObject -> IO ()
Documentation
Arguments
| :: PtrConst CChar |
|
| -> IO (Ptr SDL_SharedObject) |
Dynamically load a shared object.
- Returns
- an opaque pointer to the object handle or NULL on failure; call SDL_GetError() for more information.
- Thread safety
- It is safe to call this function from any thread.
- See also
sDL_LoadFunction,sDL_UnloadObject- C declaration
SDL_LoadObject, defined atSDL3/SDL_loadso.h 93:48
Since: 3.2.0
Arguments
| :: Ptr SDL_SharedObject |
|
| -> PtrConst CChar |
|
| -> IO SDL_FunctionPointer |
Look up the address of the named function in a shared object.
This function pointer is no longer valid after calling SDL_UnloadObject().
This function can only look up C function names. Other languages may have name mangling and intrinsic language support that varies from compiler to compiler.
Make sure you declare your function pointers with the same calling convention as the actual library function. Your code will crash mysteriously if you do not do this.
If the requested function doesn't exist, NULL is returned.
- Returns
- a pointer to the function or NULL on failure; call SDL_GetError() for more information.
- Thread safety
- It is safe to call this function from any thread.
- See also
sDL_LoadObject- C declaration
SDL_LoadFunction, defined atSDL3/SDL_loadso.h 121:49
Since: 3.2.0
Arguments
| :: Ptr SDL_SharedObject |
|
| -> IO () |
Unload a shared object from memory.
Note that any pointers from this object looked up through SDL_LoadFunction() will no longer be valid.
- Thread safety
- It is safe to call this function from any thread.
- See also
sDL_LoadObject- C declaration
SDL_UnloadObject, defined atSDL3/SDL_loadso.h 137:34
Since: 3.2.0