~ubuntu-branches/ubuntu/maverick/python3.1/maverick

« back to all changes in this revision

Viewing changes to Python/importdl.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-03-23 00:01:27 UTC
  • Revision ID: james.westby@ubuntu.com-20090323000127-5fstfxju4ufrhthq
Tags: upstream-3.1~a1+20090322
ImportĀ upstreamĀ versionĀ 3.1~a1+20090322

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef Py_IMPORTDL_H
 
2
#define Py_IMPORTDL_H
 
3
 
 
4
#ifdef __cplusplus
 
5
extern "C" {
 
6
#endif
 
7
 
 
8
 
 
9
/* Definitions for dynamic loading of extension modules */
 
10
enum filetype {
 
11
        SEARCH_ERROR,
 
12
        PY_SOURCE,
 
13
        PY_COMPILED,
 
14
        C_EXTENSION,
 
15
        PY_RESOURCE, /* Mac only */
 
16
        PKG_DIRECTORY,
 
17
        C_BUILTIN,
 
18
        PY_FROZEN,
 
19
        PY_CODERESOURCE, /* Mac only */
 
20
        IMP_HOOK
 
21
};
 
22
 
 
23
struct filedescr {
 
24
        char *suffix;
 
25
        char *mode;
 
26
        enum filetype type;
 
27
};
 
28
extern struct filedescr * _PyImport_Filetab;
 
29
extern const struct filedescr _PyImport_DynLoadFiletab[];
 
30
 
 
31
extern PyObject *_PyImport_LoadDynamicModule(char *name, char *pathname,
 
32
                                             FILE *);
 
33
 
 
34
/* Max length of module suffix searched for -- accommodates "module.slb" */
 
35
#define MAXSUFFIXSIZE 12
 
36
 
 
37
#ifdef MS_WINDOWS
 
38
#include <windows.h>
 
39
typedef FARPROC dl_funcptr;
 
40
#else
 
41
#if defined(PYOS_OS2) && !defined(PYCC_GCC)
 
42
#include <os2def.h>
 
43
typedef int (* APIENTRY dl_funcptr)();
 
44
#else
 
45
typedef void (*dl_funcptr)(void);
 
46
#endif
 
47
#endif
 
48
 
 
49
 
 
50
#ifdef __cplusplus
 
51
}
 
52
#endif
 
53
#endif /* !Py_IMPORTDL_H */