# SHZ_SWAP

Source: https://sh4zam.com/api/cdefs/SHZ_SWAP/

> Macro which swaps the two values held by a and b

```c
#define SHZ_SWAP(a, b) do { typeof(a) tmp = a; a = b; b = tmp; } while(false)
```

Macro which swaps the two values held by `a` and `b`.

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `a` |  |  |
| `b` |  |  |

## Availability

- **C++ equivalent:** none (usable from C++ as is)
- **Back-ends:** n/a (not a function)
- **Defined in:** [`sh4zam/shz_cdefs.h:137`](https://github.com/gyrovorbis/sh4zam/blob/ba1e30c88d49df0311870b229e1dd860ef26c477/include/sh4zam/shz_cdefs.h#L137)
- **Module:** [Compiler Definitions](https://sh4zam.com/api/cdefs/), section "Utilities"
