diff options
| author | Pixeller <Angluca@users.noreply.github.com> | 2023-06-23 22:47:08 +0800 |
|---|---|---|
| committer | Pixeller <Angluca@users.noreply.github.com> | 2023-06-23 22:47:08 +0800 |
| commit | 2562db4890c554ab20d2373290c3abbaa481f4f5 (patch) | |
| tree | 1be2da6742c245d73689051bddc61c7c35b4c080 /bindgen/gen_nim.py | |
| parent | 177e2c79bee74acebaeeb8d5b29f7f168858ff78 (diff) | |
use addr instead
warning:: `unsafeAddr` is a deprecated alias for `addr`,
use `addr` instead.
Diffstat (limited to 'bindgen/gen_nim.py')
| -rw-r--r-- | bindgen/gen_nim.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bindgen/gen_nim.py b/bindgen/gen_nim.py index f99f4b02..14d6297d 100644 --- a/bindgen/gen_nim.py +++ b/bindgen/gen_nim.py @@ -437,7 +437,7 @@ def gen_func_nim(decl, prefix): arg_name = param_decl['name'] arg_type = param_decl['type'] if is_const_struct_ptr(arg_type): - s += f"unsafeAddr({arg_name})" + s += f"addr({arg_name})" else: s += arg_name s += ")" @@ -562,7 +562,7 @@ def gen_extra(inp): #if inp['prefix'] in ['sg_', 'sdtx_', 'sshape_']: # l('# helper function to convert "anything" into a Range') # l('converter to_Range*[T](source: T): Range =') - # l(' Range(addr: source.unsafeAddr, size: source.sizeof.uint)') + # l(' Range(addr: source.addr, size: source.sizeof.uint)') # l('') c_source_path = '/'.join(c_source_paths[inp['prefix']].split('/')[3:]) l('{.passc:"-DSOKOL_NIM_IMPL".}') |