home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / palmos / pippy-0.6beta-src.tar.gz / pippy-0.6beta-src.tar / pippy-0.6beta-src / src / Python / importdl.h < prev    next >
C/C++ Source or Header  |  2000-12-21  |  2KB  |  82 lines

  1. #ifndef Py_IMPORTDL_H
  2. #define Py_IMPORTDL_H
  3.  
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7.  
  8. /***********************************************************
  9. Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
  10. The Netherlands.
  11.  
  12.                         All Rights Reserved
  13.  
  14. Permission to use, copy, modify, and distribute this software and its
  15. documentation for any purpose and without fee is hereby granted,
  16. provided that the above copyright notice appear in all copies and that
  17. both that copyright notice and this permission notice appear in
  18. supporting documentation, and that the names of Stichting Mathematisch
  19. Centrum or CWI or Corporation for National Research Initiatives or
  20. CNRI not be used in advertising or publicity pertaining to
  21. distribution of the software without specific, written prior
  22. permission.
  23.  
  24. While CWI is the initial source for this software, a modified version
  25. is made available by the Corporation for National Research Initiatives
  26. (CNRI) at the Internet address ftp://ftp.python.org.
  27.  
  28. STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
  29. REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
  30. MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
  31. CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
  32. DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  33. PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  34. TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  35. PERFORMANCE OF THIS SOFTWARE.
  36.  
  37. ******************************************************************/
  38.  
  39. /* Definitions for dynamic loading of extension modules */
  40. enum filetype {
  41.     SEARCH_ERROR,
  42.     PY_SOURCE,
  43.     PY_COMPILED,
  44.     C_EXTENSION,
  45.     PY_RESOURCE, /* Mac only */
  46.     PKG_DIRECTORY,
  47.     C_BUILTIN,
  48.     PY_FROZEN,
  49.     PY_CODERESOURCE /* Mac only */
  50. };
  51.  
  52. struct filedescr {
  53.     char *suffix;
  54.     char *mode;
  55.     enum filetype type;
  56. };
  57. extern struct filedescr * _PyImport_Filetab;
  58. extern const struct filedescr _PyImport_DynLoadFiletab[];
  59.  
  60. extern PyObject *_PyImport_LoadDynamicModule
  61.     Py_PROTO((char *name, char *pathname, FILE *));
  62.  
  63. /* Max length of module suffix searched for -- accommodates "module.slb" */
  64. #define MAXSUFFIXSIZE 12
  65.  
  66. #ifdef MS_WINDOWS
  67. #include <windows.h>
  68. typedef FARPROC dl_funcptr;
  69. #else
  70. #ifdef PYOS_OS2
  71. typedef int (* APIENTRY dl_funcptr)();
  72. #else
  73. typedef void (*dl_funcptr)(void);
  74. #endif
  75. #endif
  76.  
  77.  
  78. #ifdef __cplusplus
  79. }
  80. #endif
  81. #endif /* !Py_IMPORTDL_H */
  82.