瀏覽代碼

Compile time constant for parser state size added

main
Ludovic 'Archivist' Lagouardette 3 月之前
父節點
當前提交
5c9480ab1b
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. +5
    -1
      lib.c

+ 5
- 1
lib.c 查看文件

@ -36,6 +36,10 @@
#define unlikely(x) (!!(x))
#endif
#ifndef MAX_MAIN_SIZE
#define MAX_MAIN_SIZE 256
#endif
struct label {
int active;
int dest;
@ -1083,7 +1087,7 @@ int ink_step(struct context *pContext) {
int ink_compile(struct context *pContext, const char* buffer) {
int routine, saved, executable_buffer_top;
/* Main function has a size limit of 256 (need to know that for REPL */
struct elem executable_buffer[mi">256];
struct elem executable_buffer[n">MAX_MAIN_SIZE];
struct ink_routine* currentRoutine;
int err;
struct stack_frame frame;

Loading…
取消
儲存