Changeset 38
- Timestamp:
- 07/26/04 09:03:06 (4 years ago)
- Files:
-
- trunk/DerelictGL/derelict/opengl/gl.d (modified) (2 diffs)
- trunk/DerelictPY/derelict/python/python.d (modified) (5 diffs)
- trunk/DerelictSDL/derelict/sdl/sdl.d (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/DerelictGL/derelict/opengl/gl.d
r33 r38 193 193 194 194 private HXModule hgl; 195 private bit exeModuleInited = false; 195 196 196 197 private void* getProc(char[] procname) … … 542 543 } 543 544 544 private bit exeModuleInited = false;545 546 545 /*! 547 546 * Loads the shared lib and core GL 1.1 functions. If the shared lib or any of trunk/DerelictPY/derelict/python/python.d
r37 r38 18 18 19 19 private HXModule hpy; 20 private bit exeModuleInited = false; 20 21 21 22 private void* getProc(char[] procname) … … 50 51 c_sum = cast(pfc_sum)getProc("_Py_c_sum"); 51 52 c_diff = cast(pfc_diff)getProc("_Py_c_diff"); 52 c_neg = cast(pfc_neg)getProc("_Py_c_neg );53 c_neg = cast(pfc_neg)getProc("_Py_c_neg"); 53 54 c_prod = cast(pfc_prod)getProc("_Py_c_prod"); 54 55 c_quot = cast(pfc_quot)getProc("_Py_c_quot"); … … 58 59 PyProperty_Type = cast(PyTypeObject*)getProc("PyProperty_Type"); 59 60 PyDescr_NewMethod = cast(pfPyDescr_NewMethod)getProc("PyDescr_NewMethod"); 60 PyDescr_NewClassMethod = cast(pfPyDescr_New Method)getProc("PyDescr_NewMethod");61 PyDescr_NewClassMethod = cast(pfPyDescr_NewClassMethod)getProc("PyDescr_NewClassMethod"); 61 62 PyDescr_NewMember = cast(pfPyDescr_NewMember)getProc("PyDescr_NewMember"); 62 63 PyDescr_NewGetSet = cast(pfPyDescr_NewGetSet)getProc("PyDescr_NewGetSet"); … … 96 97 hpy = ExeModule_Load("python23.dll"); 97 98 99 if(ExeModule_Init() == -1) 100 throw new Exception("ExeModule initialization failed"); 101 102 exeModuleInited = true; 103 98 104 load(); 99 }100 101 static this()102 {103 ExeModule_Init();104 105 } 105 106 … … 107 108 { 108 109 ExeModule_Release(hpy); 109 ExeModule_Uninit(); 110 111 if(exeModuleInited) 112 ExeModule_Uninit(); 110 113 } trunk/DerelictSDL/derelict/sdl/sdl.d
r31 r38 48 48 49 49 private HXModule hsdl; 50 private bit exeModuleInited = false; 50 51 51 52 private void* getProc(char[] procname) … … 57 58 } 58 59 59 p ublic void DerelictSDL_Load()60 private void load() 60 61 { 61 if(hsdl !== null)62 return;63 64 version(Windows)65 hsdl = ExeModule_Load("sdl.dll");66 67 62 // active.d 68 63 SDL_GetAppState = cast(pfSDL_GetAppState)getProc("SDL_GetAppState"); … … 274 269 } 275 270 271 public void DerelictSDL_Load() 272 { 273 if(hsdl !== null) 274 return; 275 276 if(ExeModule_Init() == -1) 277 throw new Exception("ExeModule initialization failed"); 278 279 exeModuleInited = true; 280 281 version(Windows) 282 hsdl = ExeModule_Load("sdl.dll"); 283 284 load(); 285 } 286 276 287 static ~this() 277 288 { 278 289 ExeModule_Release(hsdl); 290 291 if(exeModuleInited) 292 ExeModule_Uninit(); 279 293 } 280 294
