Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(406)

Unified Diff: Include/import.h

Issue 1874048: Rewrite Python import machinery to use unicode
Patch Set: Created 13 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Include/import.h
diff --git a/Include/import.h b/Include/import.h
index 923fbca4d8c81b33d52b406fd22a79c8243511b4..12e34e617f8659ab5c85875386656d9a21f73a06 100644
--- a/Include/import.h
+++ b/Include/import.h
@@ -11,18 +11,26 @@ PyAPI_FUNC(long) PyImport_GetMagicNumber(void);
PyAPI_FUNC(const char *) PyImport_GetMagicTag(void);
PyAPI_FUNC(PyObject *) PyImport_ExecCodeModule(char *name, PyObject *co);
PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleEx(
- char *name, PyObject *co, char *pathname);
+ char *name, PyObject *co, char *pathname);
PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleWithPathnames(
- char *name, PyObject *co, char *pathname, char *cpathname);
+ char *name,
+ PyObject *co,
+ char *pathname,
+ char *cpathname);
+PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleWithUnicodePathnames(
+ char *name,
+ PyObject *co,
+ PyObject *pathname,
+ PyObject *cpathname);
PyAPI_FUNC(PyObject *) PyImport_GetModuleDict(void);
PyAPI_FUNC(PyObject *) PyImport_AddModule(const char *name);
PyAPI_FUNC(PyObject *) PyImport_ImportModule(const char *name);
PyAPI_FUNC(PyObject *) PyImport_ImportModuleNoBlock(const char *);
PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevel(char *name,
- PyObject *globals, PyObject *locals, PyObject *fromlist, int level);
+ PyObject *globals, PyObject *locals, PyObject *fromlist, int level);
#define PyImport_ImportModuleEx(n, g, l, f) \
- PyImport_ImportModuleLevel(n, g, l, f, -1)
+ PyImport_ImportModuleLevel(n, g, l, f, -1)
PyAPI_FUNC(PyObject *) PyImport_GetImporter(PyObject *path);
PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name);
@@ -38,13 +46,14 @@ PyAPI_FUNC(int) _PyImport_ReleaseLock(void);
#define _PyImport_ReleaseLock() 1
#endif
-PyAPI_FUNC(struct filedescr *) _PyImport_FindModule(
- const char *, PyObject *, char *, size_t, FILE **, PyObject **);
+struct filedescr;
PyAPI_FUNC(int) _PyImport_IsScript(struct filedescr *);
PyAPI_FUNC(void) _PyImport_ReInitLock(void);
PyAPI_FUNC(PyObject *)_PyImport_FindExtension(char *, char *);
+PyAPI_FUNC(PyObject *)_PyImport_FindExtensionUnicode(char *, PyObject *);
Antoine Pitrou 2010/07/30 13:35:47 Are the old non-unicode APIs still needed?
haypo 2010/07/30 20:47:04 _PyImport_FindExtension() is still used but it may
PyAPI_FUNC(int)_PyImport_FixupExtension(PyObject*, char *, char *);
+PyAPI_FUNC(int)_PyImport_FixupExtensionUnicode(PyObject*, char *, PyObject *);
struct _inittab {
char *name;

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b