From 43bfb60ac8add40a6099b933bc8454c11471c386 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 7 Jun 2012 15:52:47 -0300 Subject: [PATCH] new auxiliary function 'luaI_printinst' (to print a single instruction) --- ltests.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ltests.c b/ltests.c index f15e67b1..de353f1c 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.128 2012/05/30 16:40:29 roberto Exp $ +** $Id: ltests.c,v 2.129 2012/05/31 20:25:42 roberto Exp $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -520,6 +520,12 @@ void luaI_printcode (Proto *pt, int size) { } printf("-------\n"); } + + +void luaI_printinst (Proto *pt, int pc) { + char buff[100]; + printf("%s\n", buildop(pt, pc, buff)); +} #endif