To avoid any possibility of uninitialized memory.
The exceptions are:
- where the allocation is immediately overwritten by a memcpy or struct copy.
- arrays of structs to avoid any performance impact (except when the
array is returned by the public API).
This gives us one build in CI that has FreeType enabled and Fontconfig
disabled in order to ensure this combination builds.
Building the Fontconfig backend with Mingw is still checked in the
mingw-64 build.
test/meson.build:663: WARNING: Project targets '>= 1.3.0' but uses feature deprecated since '0.64.0': copy arg in configure_file. Use fs.copyfile instead
There are two check-link.c files which were "tests" in the autotools
build and are unused ever since the autotools build was removed.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Not all platforms handle a zero sized allocation in calloc the
same. This macro ensures that _cairo_calloc(0) always returns NULL
similar to _cairo_malloc(0).
Pixman 0.42.3 added PIXMAN_r8g8b8_sRGB to pixman_format_code_t. CI
fails if it is missing from switch statements. Building with pixman <
0.42.3 will fail if the enum is used. So put it in a versioned #if.
Without this, building with
CFLAGS="-DDEBUG_SVG_RENDER" meson setup path/to/source
simply does not work for me:
test/svg/svg-render.c:74:(.text+0x40): undefined reference to `_cairo_debug_svg_render'
collect2: error: ld returned 1 exit status
After marking this symbol as exported, this just works.
Signed-off-by: Uli Schlachter <psychon@znc.in>
- If a link has both 'dest' and 'uri', the 'dest' will be used if it
exists, otherwise it will fallback to using the 'uri'.
- Ensure that a missing 'dest' does not result in an error. Instead a
warning is printed if CAIRO_DEBUG_TAG is set, and a link to the
current location is embedded in the PDF. ie the link does
nothing. Cairo needs to embed a link even if no destination is
available because when links are embedded at the end of the
document, the content stream already contains link tags.
- Remove cairo_pdf_interchange_write_forward_links. This code was
originally used prior to !463 when cairo wrote the links at the end
of each page. Now the links are written at the end of the document
so there are no longer any forward links with an unknown
destination, unless the destination does not exist.
- When 'internal' is not used, use the 'dest' name to reference the
link. Ensure non ASCII names are correctly encoded.