diff options
| author | Andre Weissflog <floooh@gmail.com> | 2023-06-26 13:56:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-26 13:56:13 +0200 |
| commit | d3c9ea7df5ce7588d6c74806e2e1b1f005b9d36e (patch) | |
| tree | 8186a4fc20d9fd4ecfe18db4a7ef64c582c6c661 | |
| parent | 177e2c79bee74acebaeeb8d5b29f7f168858ff78 (diff) | |
| parent | 02ba77f40ea9be8f41e03d19b42558cc5f400f0e (diff) | |
Merge pull request #846 from Angluca/master
use addr instead unsafeAddr
| -rw-r--r-- | .github/workflows/gen_bindings.yml | 2 | ||||
| -rw-r--r-- | bindgen/gen_nim.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/.github/workflows/gen_bindings.yml b/.github/workflows/gen_bindings.yml index b547ac36..fe3a9b46 100644 --- a/.github/workflows/gen_bindings.yml +++ b/.github/workflows/gen_bindings.yml @@ -125,7 +125,7 @@ jobs: steps: - uses: jiro4989/setup-nim-action@v1 with: - nim-version: 1.6.12 + nim-version: devel repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v3 with: 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".}') |