| 1 | /* |
|---|---|
| 2 | * This Source Code Form is subject to the terms of the Mozilla Public |
| 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 5 | * |
| 6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2019 MonetDB B.V. |
| 7 | */ |
| 8 | |
| 9 | /* |
| 10 | * @* Implementation Code |
| 11 | */ |
| 12 | #ifndef __BLOB_H__ |
| 13 | #define __BLOB_H__ |
| 14 | #include "mal.h" |
| 15 | #include "mal_exception.h" |
| 16 | |
| 17 | typedef struct blob { |
| 18 | size_t nitems; |
| 19 | /*unsigned */ char data[FLEXIBLE_ARRAY_MEMBER]; |
| 20 | } blob; |
| 21 | |
| 22 | mal_export int TYPE_blob; |
| 23 | |
| 24 | mal_export var_t blobsize(size_t nitems); |
| 25 | mal_export ssize_t BLOBfromstr(const char *instr, size_t *l, blob **val, bool external); |
| 26 | mal_export ssize_t BLOBtostr(str *tostr, size_t *l, const blob *pin, bool external); |
| 27 | |
| 28 | #endif /* __BLOB_H__ */ |
| 29 |