native: rename cgen to code_gen to avoid confusion with cgen

This commit is contained in:
Alexander Medvednikov 2021-09-10 03:17:53 +03:00
parent 0370d4f268
commit afeb1525a1
3 changed files with 8 additions and 9 deletions

View file

@ -9,8 +9,7 @@ fn main() {
library_file_path := os.join_path(os.getwd(), dl.get_libname('library'))
handle := dl.open_opt(library_file_path, dl.rtld_lazy) ?
eprintln('handle: ${ptr_str(handle)}')
mut f := FNAdder(0)
f = dl.sym_opt(handle, 'add_1') ?
f := FNAdder(dl.sym_opt(handle, 'add_1') ?)
eprintln('f: ${ptr_str(f)}')
res := f(1, 2)
eprintln('res: $res')