Changeset 391 for python/trunk/Python/dynload_os2.c
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Python/dynload_os2.c
r2 r391 11 11 12 12 const struct filedescr _PyImport_DynLoadFiletab[] = { 13 14 15 13 {".pyd", "rb", C_EXTENSION}, 14 {".dll", "rb", C_EXTENSION}, 15 {0, 0} 16 16 }; 17 17 18 18 dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, 19 19 const char *pathname, FILE *fp) 20 20 { 21 22 23 24 25 21 dl_funcptr p; 22 APIRET rc; 23 HMODULE hDLL; 24 char failreason[256]; 25 char funcname[258]; 26 26 27 28 29 30 27 rc = DosLoadModule(failreason, 28 sizeof(failreason), 29 pathname, 30 &hDLL); 31 31 32 33 34 35 36 37 38 39 32 if (rc != NO_ERROR) { 33 char errBuf[256]; 34 PyOS_snprintf(errBuf, sizeof(errBuf), 35 "DLL load failed, rc = %d: %.200s", 36 rc, failreason); 37 PyErr_SetString(PyExc_ImportError, errBuf); 38 return NULL; 39 } 40 40 41 42 43 44 45 41 PyOS_snprintf(funcname, sizeof(funcname), "init%.200s", shortname); 42 rc = DosQueryProcAddr(hDLL, 0L, funcname, &p); 43 if (rc != NO_ERROR) 44 p = NULL; /* Signify Failure to Acquire Entrypoint */ 45 return p; 46 46 }
Note:
See TracChangeset
for help on using the changeset viewer.