Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
164d4ff0
Commit
164d4ff0
authored
Jan 26, 1995
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added missing case to get_docstring
parent
a6f60502
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
Python/compile.c
Python/compile.c
+10
-2
No files found.
Python/compile.c
View file @
164d4ff0
...
...
@@ -483,7 +483,6 @@ com_addopname(c, op, n)
int
op
;
node
*
n
;
{
object
*
v
;
char
*
name
;
char
buffer
[
1000
];
/* XXX it is possible to write this code without the 1000
...
...
@@ -1868,13 +1867,14 @@ static object *
get_docstring
(
n
)
node
*
n
;
{
int
i
;
switch
(
TYPE
(
n
))
{
case
suite
:
if
(
NCH
(
n
)
==
1
)
return
get_docstring
(
CHILD
(
n
,
0
));
else
{
int
i
;
for
(
i
=
0
;
i
<
NCH
(
n
);
i
++
)
{
node
*
ch
=
CHILD
(
n
,
i
);
if
(
TYPE
(
ch
)
==
stmt
)
...
...
@@ -1883,6 +1883,14 @@ get_docstring(n)
}
break
;
case
file_input
:
for
(
i
=
0
;
i
<
NCH
(
n
);
i
++
)
{
node
*
ch
=
CHILD
(
n
,
i
);
if
(
TYPE
(
ch
)
==
stmt
)
return
get_docstring
(
ch
);
}
break
;
case
stmt
:
case
simple_stmt
:
case
small_stmt
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment