Skip to content

Commit

Permalink
use up-to-date syntax for function attributes (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimshrier authored Jan 20, 2025
1 parent 9c011be commit 1e20d6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/c2v.v
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ fn (mut c C2V) fn_decl(mut node Node, gen_types string) {
}
v_name := c_name.camel_to_snake()
if v_name != c_name && !c.is_wrapper {
c.genln("[c:'${c_name}']")
c.genln("@[c:'${c_name}']")
}
if c.is_wrapper {
// strip the "modulename__" from the start of the function
Expand Down Expand Up @@ -643,11 +643,11 @@ fn (mut c C2V) fn_decl(mut node Node, gen_types string) {
// This fixes unknown symbols errors when building separate .c => .v files into .o files
// example:
//
// [c: 'P_TryMove']
// @[c: 'P_TryMove']
// fn p_trymove(thing &Mobj_t, x int, y int) bool
//
// Now every time `p_trymove` is called, `P_TryMove` will be generated instead.
c.genln("[c:'${c_name}']")
c.genln("@[c:'${c_name}']")
}
if c_name in c_known_fn_names {
c.genln('fn C.${c_name}(${str_args})${typ}')
Expand Down

0 comments on commit 1e20d6c

Please sign in to comment.