# Fix 2D array support for C backend · gitcafe/zig

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

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

Visibility: public

Requested revision: 1639fd4c45ee816c7c67963fbff3513a32f5737b

Requested commit: 1639fd4c45ee816c7c67963fbff3513a32f5737b

Commit: 1639fd4c45ee816c7c67963fbff3513a32f5737b

Tree: e39a4ed7294dbe274d296484485eedadf91ac17d

Author: Cody Tapscott

Committer: Cody Tapscott

## Message

```
Fix 2D array support for C backend

This updates the C backend to use proper array types.

In order to do that, this commit also:
 - fixes up elem_ptr and field_ptr handling
 - adds `renderTypecast` (renders in C typecast format, e.g. "int* [10]")
 - adds a bit special handling for undefined pointers, which is necessary
   to support slice/elem_ptr to undefined decls

```

## Parents

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

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