- extension/src/{port,platform,codepage} -> src/; native_render -> src/host
(+ dxt, shaders/); libgr2 -> src/gr2; extension/third_party -> third_party
- extension/tests -> tests/port, libgr2/tests -> tests/gr2
- android-native -> android (build.sh, push-client.sh moved in)
- script -> scripts; tools/40250 -> tools/server; oracle -> tools/granny-oracle;
perf tools -> tools/perf
- all build trees under build/ (native, release, android, port-gate)
- xrender:: CMake aliases -> mt::; port-map ledger impl paths rewritten
No code changes. ctest 15/15, port_gate macos+android PASS, port_map check 0 errors.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
47 lines
1.2 KiB
C
47 lines
1.2 KiB
C
|
|
/* Support for dynamic loading of extension modules */
|
|
|
|
#define INCL_DOSERRORS
|
|
#define INCL_DOSMODULEMGR
|
|
#include <os2.h>
|
|
|
|
#include "Python.h"
|
|
#include "importdl.h"
|
|
|
|
|
|
const struct filedescr _PyImport_DynLoadFiletab[] = {
|
|
{".pyd", "rb", C_EXTENSION},
|
|
{".dll", "rb", C_EXTENSION},
|
|
{0, 0}
|
|
};
|
|
|
|
dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
|
|
const char *pathname, FILE *fp)
|
|
{
|
|
dl_funcptr p;
|
|
APIRET rc;
|
|
HMODULE hDLL;
|
|
char failreason[256];
|
|
char funcname[258];
|
|
|
|
rc = DosLoadModule(failreason,
|
|
sizeof(failreason),
|
|
pathname,
|
|
&hDLL);
|
|
|
|
if (rc != NO_ERROR) {
|
|
char errBuf[256];
|
|
PyOS_snprintf(errBuf, sizeof(errBuf),
|
|
"DLL load failed, rc = %d: %.200s",
|
|
rc, failreason);
|
|
PyErr_SetString(PyExc_ImportError, errBuf);
|
|
return NULL;
|
|
}
|
|
|
|
PyOS_snprintf(funcname, sizeof(funcname), "init%.200s", shortname);
|
|
rc = DosQueryProcAddr(hDLL, 0L, funcname, &p);
|
|
if (rc != NO_ERROR)
|
|
p = NULL; /* Signify Failure to Acquire Entrypoint */
|
|
return p;
|
|
}
|