ยปCore Development>Code coverage>RISCOS/Python/dynload_riscos.c

Python code coverage for RISCOS/Python/dynload_riscos.c

#countcontent
1n/a/***********************************************************
2n/aCopyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
3n/aThe Netherlands.
4n/a
5n/a All Rights Reserved
6n/a
7n/aPermission to use, copy, modify, and distribute this software and its
8n/adocumentation for any purpose and without fee is hereby granted,
9n/aprovided that the above copyright notice appear in all copies and that
10n/aboth that copyright notice and this permission notice appear in
11n/asupporting documentation, and that the names of Stichting Mathematisch
12n/aCentrum or CWI or Corporation for National Research Initiatives or
13n/aCNRI not be used in advertising or publicity pertaining to
14n/adistribution of the software without specific, written prior
15n/apermission.
16n/a
17n/aWhile CWI is the initial source for this software, a modified version
18n/ais made available by the Corporation for National Research Initiatives
19n/a(CNRI) at the Internet address ftp://ftp.python.org.
20n/a
21n/aSTICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
22n/aREGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
23n/aMERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
24n/aCENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
25n/aDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
26n/aPROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
27n/aTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28n/aPERFORMANCE OF THIS SOFTWARE.
29n/a
30n/a******************************************************************/
31n/a
32n/a/* This module provides the necessary stubs for when dynamic loading is
33n/a not present. */
34n/a
35n/a#include "Python.h"
36n/a#include "importdl.h"
37n/a
38n/a#include "dlk.h"
39n/a
40n/a
41n/aconst struct filedescr _PyImport_DynLoadFiletab[] = {
42n/a {"/pyd", "rb", C_EXTENSION},
43n/a {0, 0}
44n/a};
45n/a
46n/avoid dynload_init_dummy()
47n/a{
48n/a}
49n/a
50n/adl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
51n/a char *pathname, FILE *fp)
52n/a{
53n/a int err;
54n/a char errstr[256];
55n/a void (*init_function)(void);
56n/a
57n/a err = dlk_load_no_init(pathname, &init_function);
58n/a if (err) {
59n/a PyOS_snprintf(errstr, sizeof(errstr), "dlk failure %d", err);
60n/a PyErr_SetString(PyExc_ImportError, errstr);
61n/a }
62n/a return init_function;
63n/a}