summaryrefslogtreecommitdiff
path: root/py/scope.h
diff options
context:
space:
mode:
authorDamien <damien.p.george@gmail.com>2013-12-11 00:41:43 +0000
committerDamien <damien.p.george@gmail.com>2013-12-11 00:41:43 +0000
commit9ecbcfff994621aa17fdbb5bf2f0c6710e54ea4c (patch)
tree5ab817267cb59848a83b9efa46826e403518d921 /py/scope.h
parent5285155ef766a00d1eac868cebe92c01c836c64d (diff)
py: work towards working closures.
Diffstat (limited to 'py/scope.h')
-rw-r--r--py/scope.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/py/scope.h b/py/scope.h
index 9a04c56f6..f560e3d21 100644
--- a/py/scope.h
+++ b/py/scope.h
@@ -11,7 +11,10 @@ typedef struct _id_info_t {
bool param;
int kind;
qstr qstr;
- int local_num; // when it's an ID_INFO_KIND_LOCAL this is the unique number of the local
+
+ // when it's an ID_INFO_KIND_LOCAL this is the unique number of the local
+ // whet it's an ID_INFO_KIND_CELL/FREE this is the unique number of the closed over variable
+ int local_num;
} id_info_t;
// taken from python source, Include/code.h
@@ -46,6 +49,7 @@ typedef struct _scope_t {
int num_dict_params;
*/
int num_locals;
+ int num_cells;
int stack_size;
uint unique_code_id;
uint emit_options;