Skip to content

Commit

Permalink
Removed inline attribute to the function signature (#12)
Browse files Browse the repository at this point in the history
For some reason the `assemble_instr` funcitonc cannot be called
using the `inline` keyword aimed at reducing production code size,
and produces a linker error during link-time.
  • Loading branch information
cheng-alvin authored Dec 16, 2024
1 parent 5558150 commit d80c456
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libjas/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,6 @@ static buffer_t assemble(enum modes mode, instruction_t *instr_arr, size_t arr_s
return buf;
}

inline buffer_t assemble_instr(enum modes mode, instruction_t instr) {
buffer_t assemble_instr(enum modes mode, instruction_t instr) {
return codegen(mode, &instr, sizeof(instruction_t), CODEGEN_RAW);
}
2 changes: 1 addition & 1 deletion libjas/include/codegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ buffer_t codegen(enum modes mode, instruction_t *instr_arr, size_t arr_size, enu
*
* @see `codegen`
*/
inline buffer_t assemble_instr(enum modes mode, instruction_t instr);
buffer_t assemble_instr(enum modes mode, instruction_t instr);

#endif

0 comments on commit d80c456

Please sign in to comment.