# wasm: Implement @ptrToInt and fix indirect function call · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/b9a0401e2368894e135b1d1e870219c6b1543af2)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: b9a0401e2368894e135b1d1e870219c6b1543af2

Requested commit: b9a0401e2368894e135b1d1e870219c6b1543af2

Commit: b9a0401e2368894e135b1d1e870219c6b1543af2

Tree: 108527ce39611ed0218ebb42b22aa68063825096

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: Implement @ptrToInt and fix indirect function call

- Previously the table index and function type index were switched.
This commit swaps them.
- This also emits the correct indirect function calls count when importing the function table

```

## Parents

- [f644c8b0478126484ce2780eb98336c2b4ff0177](https://git.cafe/gitcafe/zig/commit/f644c8b0478126484ce2780eb98336c2b4ff0177?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/b9a0401e2368894e135b1d1e870219c6b1543af2?format=markdown)
