Skip to content

Commit

Permalink
Updated some code in the memory library.
Browse files Browse the repository at this point in the history
  • Loading branch information
ax-6 committed Aug 8, 2024
1 parent df8534d commit 2f07a03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion aqvm/memory/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ int AqvmMemory_SetType(const struct AqvmMemory_Memory* memory, size_t index,
return 0;
}

uint8_t AqvmMemory_GetType(struct AqvmMemory_Memory* memory, size_t index) {
uint8_t AqvmMemory_GetType(const struct AqvmMemory_Memory* memory,
size_t index) {
if (memory == NULL) {
AqvmBaseLogging_OutputLog("ERROR", "AqvmMemory_GetType_NullMemoryPointer",
"The memory pointer is NULL.", NULL);
Expand Down
3 changes: 2 additions & 1 deletion aqvm/memory/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ int AqvmMemory_SetType(const struct AqvmMemory_Memory* memory, size_t index,
// Returns the type that is less than 4 bits (0X0F) if successful. Returns 0x11
// if the memory pointer is NULL. Returns 0x12 if the type pointer is NULL.
// Returns 0x13 if the index is out of memory range.
uint8_t AqvmMemory_GetType(struct AqvmMemory_Memory* memory, size_t index);
uint8_t AqvmMemory_GetType(const struct AqvmMemory_Memory* memory,
size_t index);

// Writes the data that |data_ptr| points to of size |size| to the data of at
// |index| bytes in |memory|.
Expand Down

0 comments on commit 2f07a03

Please sign in to comment.