comparison include/SDL_loadso.h @ 4217:4c4113c2162c SDL-1.2

Fixed bug #706 Ken Bull 2009-02-25 13:22:02 PST Adds Doxygen support for all headers (except config and boilerplate headers) in the include folder for SDL-1.2 revision 4446. While in general SDL is quite thoroughly commented, none of these comments are correctly formatted for Doxygen and are generally inconsistent in their formatting.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 21 Sep 2009 09:38:10 +0000
parents a1b03ba2fcd0
children
comparison
equal deleted inserted replaced
4216:5b99971a27b4 4217:4c4113c2162c
18 18
19 Sam Lantinga 19 Sam Lantinga
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 22
23 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 23 /** @file SDL_loadso.h
24 /* System dependent library loading routines */ 24 * System dependent library loading routines
25 */
25 26
26 /* Some things to keep in mind: 27 /** @file SDL_loadso.h
27 - These functions only work on C function names. Other languages may 28 * Some things to keep in mind:
28 have name mangling and intrinsic language support that varies from 29 * - These functions only work on C function names. Other languages may
29 compiler to compiler. 30 * have name mangling and intrinsic language support that varies from
30 - Make sure you declare your function pointers with the same calling 31 * compiler to compiler.
31 convention as the actual library function. Your code will crash 32 * - Make sure you declare your function pointers with the same calling
32 mysteriously if you do not do this. 33 * convention as the actual library function. Your code will crash
33 - Avoid namespace collisions. If you load a symbol from the library, 34 * mysteriously if you do not do this.
34 it is not defined whether or not it goes into the global symbol 35 * - Avoid namespace collisions. If you load a symbol from the library,
35 namespace for the application. If it does and it conflicts with 36 * it is not defined whether or not it goes into the global symbol
36 symbols in your code or other shared libraries, you will not get 37 * namespace for the application. If it does and it conflicts with
37 the results you expect. :) 38 * symbols in your code or other shared libraries, you will not get
38 */ 39 * the results you expect. :)
40 */
39 41
40 42
41 #ifndef _SDL_loadso_h 43 #ifndef _SDL_loadso_h
42 #define _SDL_loadso_h 44 #define _SDL_loadso_h
43 45
48 /* Set up for C function definitions, even when using C++ */ 50 /* Set up for C function definitions, even when using C++ */
49 #ifdef __cplusplus 51 #ifdef __cplusplus
50 extern "C" { 52 extern "C" {
51 #endif 53 #endif
52 54
53 /* This function dynamically loads a shared object and returns a pointer 55 /**
56 * This function dynamically loads a shared object and returns a pointer
54 * to the object handle (or NULL if there was an error). 57 * to the object handle (or NULL if there was an error).
55 * The 'sofile' parameter is a system dependent name of the object file. 58 * The 'sofile' parameter is a system dependent name of the object file.
56 */ 59 */
57 extern DECLSPEC void * SDLCALL SDL_LoadObject(const char *sofile); 60 extern DECLSPEC void * SDLCALL SDL_LoadObject(const char *sofile);
58 61
59 /* Given an object handle, this function looks up the address of the 62 /**
63 * Given an object handle, this function looks up the address of the
60 * named function in the shared object and returns it. This address 64 * named function in the shared object and returns it. This address
61 * is no longer valid after calling SDL_UnloadObject(). 65 * is no longer valid after calling SDL_UnloadObject().
62 */ 66 */
63 extern DECLSPEC void * SDLCALL SDL_LoadFunction(void *handle, const char *name); 67 extern DECLSPEC void * SDLCALL SDL_LoadFunction(void *handle, const char *name);
64 68
65 /* Unload a shared object from memory */ 69 /** Unload a shared object from memory */
66 extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); 70 extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
67 71
68 /* Ends C function definitions when using C++ */ 72 /* Ends C function definitions when using C++ */
69 #ifdef __cplusplus 73 #ifdef __cplusplus
70 } 74 }