NULLABLE annotation
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "impl_macros.h"
|
||||
|
||||
FILE* fileFromN(VM* vm, size_t pos, u32 file_n){
|
||||
NULLABLE(FILE* fileFromN(VM* vm, size_t pos, u32 file_n)){
|
||||
FILE* f = NULL;
|
||||
switch(file_n){
|
||||
case 0: f = stdin; break;
|
||||
|
||||
@@ -16,7 +16,7 @@ const Instruction instructions[] = {
|
||||
};
|
||||
const size_t instructions_count = sizeof(instructions)/sizeof(instructions[0]);
|
||||
|
||||
const Instruction* Instruction_getFromOpcode(u8 opcode){
|
||||
NULLABLE(const Instruction* Instruction_getFromOpcode(u8 opcode)){
|
||||
if(opcode >= instructions_count)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ typedef struct Instruction {
|
||||
/// @brief get instruction info from table
|
||||
/// @param opcode any byte
|
||||
/// @return ptr to struct or NULL
|
||||
const Instruction* Instruction_getFromOpcode(u8 opcode);
|
||||
NULLABLE(const Instruction* Instruction_getFromOpcode(u8 opcode));
|
||||
|
||||
i32 NOP_impl(VM* vm, size_t pos);
|
||||
i32 PUSH_impl(VM* vm, size_t pos);
|
||||
|
||||
Reference in New Issue
Block a user