| 77 | |
| 78 | |
| 79 | const void *luaZ_getaddr (ZIO* z, size_t n) { |
| 80 | const void *res; |
| 81 | if (!checkbuffer(z)) |
| 82 | return NULL; /* no more input */ |
| 83 | if (z->n < n) /* not enough bytes? */ |
| 84 | return NULL; /* block not whole; cannot give an address */ |
| 85 | res = z->p; /* get block address */ |
| 86 | z->n -= n; /* consume these bytes */ |
| 87 | z->p += n; |
| 88 | return res; |
| 89 | } |
no test coverage detected