** Dump the block of memory pointed by 'b' with given 'size'. ** 'b' should not be NULL, except for the last call signaling the end ** of the dump. */
| 50 | ** of the dump. |
| 51 | */ |
| 52 | static void dumpBlock (DumpState *D, const void *b, size_t size) { |
| 53 | if (D->status == 0) { /* do not write anything after an error */ |
| 54 | lua_unlock(D->L); |
| 55 | D->status = (*D->writer)(D->L, b, size, D->data); |
| 56 | lua_lock(D->L); |
| 57 | D->offset += size; |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | |
| 62 | /* |