From 438857a1f5c2787df0d0c5807dcbf653c805a95a Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Wed, 29 Nov 2023 15:31:28 +0800 Subject: [PATCH] some fix --- README.md | 2 +- docs/index.md | 2 +- src/vm.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 66dc0646..84a99e91 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ **English |** [**简体中文**](README_zh.md) -pkpy is a lightweight(~14K LOC) Python interpreter for game scripting, built on C++17 with STL. +pkpy is a lightweight(~15K LOC) Python interpreter for game scripting, built on C++17 with STL. It aims to be an alternative to lua for game scripting, with elegant syntax, powerful features and competitive performance. pkpy is extremely easy to embed via a single header file `pocketpy.h`, without external dependencies. diff --git a/docs/index.md b/docs/index.md index adce2edc..ac787c2e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,7 +5,7 @@ label: Welcome # Welcome to pocketpy -pkpy is a lightweight(~14K LOC) Python interpreter for game scripting, built on C++17 with STL. +pkpy is a lightweight(~15K LOC) Python interpreter for game scripting, built on C++17 with STL. It aims to be an alternative to lua for game scripting, with elegant syntax, powerful features and competitive performance. pkpy is extremely easy to embed via a single header file `pocketpy.h`, without external dependencies. diff --git a/src/vm.cpp b/src/vm.cpp index 74c81bcc..d0ae6ae2 100644 --- a/src/vm.cpp +++ b/src/vm.cpp @@ -609,7 +609,7 @@ Str VM::disassemble(CodeObject_ co){ std::vector jumpTargets; for(auto byte : co->codes){ - if(byte.op == OP_JUMP_ABSOLUTE || byte.op == OP_POP_JUMP_IF_FALSE || byte.op == OP_SHORTCUT_IF_FALSE_OR_POP){ + if(byte.op == OP_JUMP_ABSOLUTE || byte.op == OP_POP_JUMP_IF_FALSE || byte.op == OP_SHORTCUT_IF_FALSE_OR_POP || byte.op == OP_FOR_ITER){ jumpTargets.push_back(byte.arg); } if(byte.op == OP_GOTO){