| 1 | #include "_cgo_export.h" |
| 2 | |
| 3 | void error_panic(j_common_ptr cinfo) { |
| 4 | struct { const char *p; } a; |
| 5 | char buffer[JMSG_LENGTH_MAX]; |
| 6 | (*cinfo->err->format_message) (cinfo, buffer); |
| 7 | goPanic(buffer); |
| 8 | } |
| 9 | |
| 10 | typedef struct { |
| 11 | unsigned char *buf; |
| 12 | unsigned long buf_size; |
| 13 | } mem_helper; |
| 14 | |
| 15 | mem_helper *alloc_mem_helper() { |
| 16 | return (mem_helper*) calloc(1,sizeof(mem_helper)); |
| 17 | } |