fix code block

dundargoc 2023-10-07 11:32:22 +02:00
parent cc9ef90068
commit 3b817e9f26

@ -38,7 +38,7 @@ We should try to keep structs small, if possible. To that end:
#### External interfaces
- For functions interfacing other processes over a transport/serialization mechanism, fixed-width types are preferred. For example, in `msgpack_rpc.h`:
```c
```c
bool msgpack_rpc_integer_result(uint32_t result,
msgpack_object *req,
msgpack_packer *res);
@ -46,7 +46,7 @@ bool msgpack_rpc_integer_result(uint32_t result,
- For functions part of a public API, native types are preferred. For example, in a hypothetical `libneovim.h`:
```c
```c
int neovim_get_current_buffer(void);
```
@ -65,4 +65,4 @@ In loops, we have a *counter* variable and a *limit* expression (*condition* bei
- If resulting type of *counter* and *limit* is unsigned:
* Check *limit* expression for frontier values (e.g., when size is zero).
* Avoid *condition* using substractions (unless guarded so that it can be proved for result to always be positive). Prefer equivalent condition using additions on the other side.
- As an optimization, you could use plain `int` instead of `ssize`, or `unsigned int` instead of `size_t`, but only if you are sure that those types will be enough always. Please try not to impose arbitrary/unneeded limits.
- As an optimization, you could use plain `int` instead of `ssize`, or `unsigned int` instead of `size_t`, but only if you are sure that those types will be enough always. Please try not to impose arbitrary/unneeded limits.