Properly encode pointer types.