From ba325f15a1183891904920c8d6b37fa2f28b2c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?b=CA=B0edoh=E2=82=82=20sw=C3=A9?= Date: Mon, 17 Jun 2024 04:01:43 +0500 Subject: [PATCH] Small changes --- Makefile | 10 +++++++--- src/execute.c | 6 +----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 1de7fbc..4226aa3 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,11 @@ -CC=clang +CC ?= clang +CFLAGS ?= all: - $(CC) -o lbr -O2 -Wall -Wextra -Wpedantic src/*.c + $(CC) -o lbr -O2 -Wall -Wextra -Wpedantic $(CFLAGS) src/*.c + +clean: + rm lbr test: - ./lbr tests/test.lb \ No newline at end of file + ./lbr tests/test.lb diff --git a/src/execute.c b/src/execute.c index 8b0b84d..d86a16d 100644 --- a/src/execute.c +++ b/src/execute.c @@ -532,11 +532,7 @@ void execute(Stack *stack, Stack *originstack, char *modname) if (!strcmp(NAME, "size")) { - int i = 0; - while (i < stack->pointer) - i++; - - stack_push(stack, i); + stack_push(stack, stack->pointer); continue; }