Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Sep 19, 2024
1 parent e207ad0 commit 8a73c22
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions vlib/v/gen/c/testdata/c_ident_for_ptr_arg.c.must_have
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int (*real_open) (charptr , int , int ) = ((main__RealOpen)((dl__sym((voidptr)RTLD_NEXT, _SLIT("open")))));
13 changes: 13 additions & 0 deletions vlib/v/gen/c/testdata/c_ident_for_ptr_arg.vv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module main

import dl

#flag -D_GNU_SOURCE

type RealOpen = fn(charptr, int, int) int

@[export: open]
fn open(filename charptr, oflag int, mode int) int {
real_open := RealOpen((dl.sym(C.RTLD_NEXT, "open")))
return real_open(filename, oflag, mode)
}

0 comments on commit 8a73c22

Please sign in to comment.