From ee6286250db7f7e9bcabf55ea88186681d6c41dd Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 5 Dec 2022 04:09:26 +0800 Subject: [PATCH] up --- src/codeobject.h | 3 ++- src/main.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/codeobject.h b/src/codeobject.h index 4691b417..6c297fb6 100644 --- a/src/codeobject.h +++ b/src/codeobject.h @@ -57,7 +57,8 @@ struct CodeObject { co_labels[label] = co_code.size(); } - int addName(const _Str& name, NameScope scope){ + int addName(_Str name, NameScope scope){ + name.intern(); if(scope == NAME_LOCAL && std::find(co_global_names.begin(), co_global_names.end(), name) != co_global_names.end()){ scope = NAME_GLOBAL; } diff --git a/src/main.cpp b/src/main.cpp index 2d44d5e4..9a9eb107 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,8 +2,8 @@ #include "pocketpy.h" -//#define PK_DEBUG_TIME -#define PK_DEBUG_THREADED +#define PK_DEBUG_TIME +//#define PK_DEBUG_THREADED struct Timer{ const char* title;