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

Unified Diff: Python/import.c

Issue 9319: imp.find_module('test/badsyntax_pep3120') causes segfault
Patch Set: Created 2 years, 2 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
« no previous file with comments | « Parser/tokenizer.h ('k') | Python/traceback.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Python/import.c
===================================================================
--- Python/import.c (révision 87441)
+++ Python/import.c (copie de travail)
@@ -123,9 +123,6 @@
/* This table is defined in config.c: */
extern struct _inittab _PyImport_Inittab[];
-/* Method from Parser/tokenizer.c */
-extern char * PyTokenizer_FindEncoding(int);
-
struct _inittab *PyImport_Inittab = _PyImport_Inittab;
/* these tables define the module suffixes that Python recognizes */
@@ -3174,9 +3171,9 @@
}
if (fd != -1) {
if (strchr(fdp->mode, 'b') == NULL) {
- /* PyTokenizer_FindEncoding() returns PyMem_MALLOC'ed
+ /* PyTokenizer_FindEncodingFilename() returns PyMem_MALLOC'ed
memory. */
- found_encoding = PyTokenizer_FindEncoding(fd);
+ found_encoding = PyTokenizer_FindEncodingFilename(fd, pathname);
lseek(fd, 0, 0); /* Reset position */
if (found_encoding == NULL && PyErr_Occurred())
return NULL;
« no previous file with comments | « Parser/tokenizer.h ('k') | Python/traceback.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7