Remove duplicated functions.
[SDL.s60v3.git] / src / main / symbian / SDL_env.cpp
blob3d38e47b54054cfaeb7a6e7e5c15a0cdf0fdfa0e
1 #include<e32std.h>
3 void* SDL_LoadObject(const char *sofile)
5 RLibrary* lib = new RLibrary();
6 if(lib == NULL)
7 return NULL;
8 TFileName name;
9 name.Copy(TPtrC8((const TUint8*)sofile));
10 if(KErrNone == lib->Load(name))
11 return lib;
12 delete lib;
13 return NULL;
16 void* SDL_LoadFunction(void *handle, const char *name)
18 TLex8 v((const TUint8*)(name));
19 int ord;
21 if(KErrNone != v.Val(ord))
22 return NULL;
24 const RLibrary* lib = reinterpret_cast<RLibrary*>(handle);
25 TLibraryFunction f = lib->Lookup(ord);
26 return (void*)(f);
29 void SDL_UnloadObject(void *handle)
31 RLibrary* lib = reinterpret_cast<RLibrary*>(handle);
32 lib->Close();
33 delete lib;