From ec5815a587935f0bb4e4492f4dbc3ad38cc5dca9 Mon Sep 17 00:00:00 2001 From: ax-6 Date: Sun, 7 Jul 2024 20:52:47 +0800 Subject: [PATCH] Updated some comments in memory.h. --- aqvm/memory/memory.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aqvm/memory/memory.h b/aqvm/memory/memory.h index 09c0a7d..e41fc2d 100644 --- a/aqvm/memory/memory.h +++ b/aqvm/memory/memory.h @@ -28,12 +28,13 @@ struct AqvmMemory_Memory { }; // Checks the memory conditions in the system. -// Returns the warning counts. +// Returns the number of warnings and sends the associated report. int AqvmMemory_CheckMemoryConditions(); // Creates the struct AqvmMemory_Memory with |data|, |type|, and |size|. // The function will allocate a struct AqvmMemory_Memory and copy |data|, -// |type|, and |size| into the struct. Returns a pointer to the struct. +// |type|, and |size| into the struct. Returns a pointer to the struct if +// successful. Returns NULL and sends an error report if creation fails. struct AqvmMemory_Memory* AqvmMemory_CreateMemory(void* data, void* type, size_t size); @@ -47,7 +48,7 @@ void AqvmMemory_FreeMemory(struct AqvmMemory_Memory* memory_ptr); // should be less than 4 bits. // Returns 0 if successful. Returns -1 if the memory pointer is NULL. Returns -2 // if the type pointer is NULL. Returns -3 if the index is out of range. Returns -// -3 if the type is out of range. +// -4 if the type is out of range. int AqvmMemory_SetType(const struct AqvmMemory_Memory* memory, size_t index, uint8_t type);