feat(core): 添加 command 定义及 command_buffer 维护功能

This commit is contained in:
2026-04-13 03:17:38 +08:00
parent ead8160a61
commit 5230b8b718
4 changed files with 78 additions and 0 deletions

15
src/core/command_buffer.h Normal file
View File

@@ -0,0 +1,15 @@
#pragma once
#include <stddef.h>
#include "core/command.h"
typedef struct command_buffer_t {
command_t *items;
size_t count;
size_t capacity;
} command_buffer_t;
void command_buffer_reset(command_buffer_t *buffer);
void command_buffer_cleanup(command_buffer_t *buffer);
void command_buffer_push(command_buffer_t *buffer, const command_t *command);