home *** CD-ROM | disk | FTP | other *** search
/ Freelog 33 / Freelog033.iso / Progr / Python-2.2.1.exe / FILEOBJECT.H < prev    next >
Encoding:
C/C++ Source or Header  |  2001-11-28  |  1.2 KB  |  36 lines

  1.  
  2. /* File object interface */
  3.  
  4. #ifndef Py_FILEOBJECT_H
  5. #define Py_FILEOBJECT_H
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. extern DL_IMPORT(PyTypeObject) PyFile_Type;
  11.  
  12. #define PyFile_Check(op) PyObject_TypeCheck(op, &PyFile_Type)
  13. #define PyFile_CheckExact(op) ((op)->ob_type == &PyFile_Type)
  14.  
  15. extern DL_IMPORT(PyObject *) PyFile_FromString(char *, char *);
  16. extern DL_IMPORT(void) PyFile_SetBufSize(PyObject *, int);
  17. extern DL_IMPORT(PyObject *) PyFile_FromFile(FILE *, char *, char *,
  18.                                              int (*)(FILE *));
  19. extern DL_IMPORT(FILE *) PyFile_AsFile(PyObject *);
  20. extern DL_IMPORT(PyObject *) PyFile_Name(PyObject *);
  21. extern DL_IMPORT(PyObject *) PyFile_GetLine(PyObject *, int);
  22. extern DL_IMPORT(int) PyFile_WriteObject(PyObject *, PyObject *, int);
  23. extern DL_IMPORT(int) PyFile_SoftSpace(PyObject *, int);
  24. extern DL_IMPORT(int) PyFile_WriteString(const char *, PyObject *);
  25. extern DL_IMPORT(int) PyObject_AsFileDescriptor(PyObject *);
  26.  
  27. /* The default encoding used by the platform file system APIs
  28.    If non-NULL, this is different than the default encoding for strings 
  29. */
  30. extern DL_IMPORT(const char *) Py_FileSystemDefaultEncoding;
  31.  
  32. #ifdef __cplusplus
  33. }
  34. #endif
  35. #endif /* !Py_FILEOBJECT_H */
  36.