mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 09:08:16 +02:00
[script] mark scan_read() inline
Small function that is critical to performance whilst scanning scripts.
This commit is contained in:
parent
f02ba09475
commit
8b8e03503d
1 changed files with 3 additions and 3 deletions
|
|
@ -665,17 +665,17 @@ base85_end (csi_t *ctx, csi_scanner_t *scan, cairo_bool_t deflate)
|
|||
longjmp (scan->jmpbuf, status);
|
||||
}
|
||||
|
||||
static void
|
||||
static inline void
|
||||
scan_read (csi_scanner_t *scan, csi_file_t *src, void *ptr, int len)
|
||||
{
|
||||
uint8_t *data = ptr;
|
||||
while (len) {
|
||||
do {
|
||||
int ret = csi_file_read (src, data, len);
|
||||
if (_csi_unlikely (ret == 0))
|
||||
longjmp (scan->jmpbuf, _csi_error (CSI_STATUS_READ_ERROR));
|
||||
data += ret;
|
||||
len -= ret;
|
||||
}
|
||||
} while (_csi_unlikely (len));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue