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
af8f9749
Commit
af8f9749
authored
Nov 15, 2005
by
Neal Norwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a note about how to do the memory deallocation a bit.
This needs a lot of work.
parent
e76adcd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
Python/ast.c
Python/ast.c
+20
-0
No files found.
Python/ast.c
View file @
af8f9749
...
...
@@ -20,6 +20,26 @@
- syntax errors
*/
/*
Note:
You should rarely need to use the asdl_seq_free() in this file.
If you use asdl_seq_free(), you will leak any objects held in the seq.
If there is an appropriate asdl_*_seq_free() function, use it.
If there isn't an asdl_*_seq_free() function for you, you will
need to loop over the data in the sequence and free it.
asdl_seq* seq;
int i;
for (i = 0; i < asdl_seq_LEN(seq); i++)
free_***(asdl_seq_GET(seq, i));
asdl_seq_free(seq);
Almost all of the ast functions return a seq of expr, so you should
use asdl_expr_seq_free(). The exception is ast_for_suite() which
returns a seq of stmt's, so use asdl_stmt_seq_free() to free it.
*/
/* Data structure used internally */
struct
compiling
{
...
...
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