mirror of https://github.com/encounter/SDL.git
Back out changelist 1951976
This commit is contained in:
parent
f5d1559b51
commit
baf2dd4c7e
|
@ -57,16 +57,6 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
|
extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile);
|
||||||
|
|
||||||
/**
|
|
||||||
* This function returns a handle to an already-loaded shared object and
|
|
||||||
* returns a pointer to the object handle. If the object file was not loaded
|
|
||||||
* the function returns NULL. This function adds a reference to the shared
|
|
||||||
* object, so the caller should call SDL_UnloadObject when they are finished
|
|
||||||
* with this reference to ensure that the object can be unloaded.
|
|
||||||
* The 'sofile' parameter is a system dependent name of the object file.
|
|
||||||
*/
|
|
||||||
extern DECLSPEC void *SDLCALL SDL_GetLoadedObject(const char *sofile);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given an object handle, this function looks up the address of the
|
* Given an object handle, this function looks up the address of the
|
||||||
* named function in the shared object and returns it. This address
|
* named function in the shared object and returns it. This address
|
||||||
|
|
|
@ -41,13 +41,6 @@ SDL_LoadObject(const char *sofile)
|
||||||
return (handle);
|
return (handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
|
||||||
SDL_GetLoadedObject(const char *sofile)
|
|
||||||
{
|
|
||||||
void *handle = dlopen(sofile, RTLD_NOLOAD);
|
|
||||||
return (handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *
|
void *
|
||||||
SDL_LoadFunction(void *handle, const char *name)
|
SDL_LoadFunction(void *handle, const char *name)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,22 +46,6 @@ SDL_LoadObject(const char *sofile)
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
|
||||||
SDL_GetLoadedObject(const char *sofile)
|
|
||||||
{
|
|
||||||
LPTSTR tstr = WIN_UTF8ToString(sofile);
|
|
||||||
void *handle = (void *) GetModuleHandle(tstr);
|
|
||||||
|
|
||||||
/* if we got a handle, call LoadLibrary to get
|
|
||||||
* it again with the ref count incremented.
|
|
||||||
* We do this to match the dlopen version of this function */
|
|
||||||
handle = (void *)LoadLibrary( tstr );
|
|
||||||
|
|
||||||
SDL_free(tstr);
|
|
||||||
|
|
||||||
return handle;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *
|
void *
|
||||||
SDL_LoadFunction(void *handle, const char *name)
|
SDL_LoadFunction(void *handle, const char *name)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue