ZIP_SOURCE_GET_ARGS(3)
π ZIP_SOURCE_GET_ARGS β bestie edition π
okay so this is a page from the Library Functions Manual for the libzip fam, and we're talking about ZIP_SOURCE_GET_ARGS β the macro whose whole job is validating and casting arguments to a source callback. it's giving bodyguard energy fr fr π«Ά
β¨ NAME β¨
ZIP_SOURCE_GET_ARGS β validate and cast arguments to source callback
π LIBRARY
libzip (-lzip) β yeah that's the one, link against it bestie π
πΈ SYNOPSIS πΈ
#include <zip.h>
type *
ZIP_SOURCE_GET_ARGS(type, void *data, zip_uint64_t len,
zip_error_t *error);
π¦ DESCRIPTION π¦
okay so the plot: ZIP_SOURCE_GET_ARGS() is a macro, and what it does is cast data to a pointer to type. that's it, that's the whole vibe. it's the little safety check that makes sure your callback got the arguments it was actually promised before you start yanking fields out of them β¨
π« RETURN VALUES π«
- on success?? iconic behaviour, it hands you back
dataπ - in case of error, it returns
NULLand setserrorβ so no, you cannot ignore that error pointer, bestie, it's literally doing its job π
π ERRORS π
ZIP_SOURCE_GET_ARGS() fails if:
[ZIP_ER_INVAL]βlenis less than the size oftype. like the buffer is too small for what you're asking for, and it is NOT gonna pretend otherwise.
π SEE ALSO π
go read those, iykyk π§
β HISTORY β
ZIP_SOURCE_GET_ARGS() was added in libzip 1.0 β a classic, a legend, an OG π
π AUTHORS π
Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at> β absolute main characters, no cap π«Ά
and that's the whole page, bestie!! this one shipped out with the Debian crew on December 18, 2017 β mwah, periodt π β¨
π¦ where this page comes from
- arch rolling: libzip 1.11.4-1 Β· BSD
- debian trixie: libzip-dev 1.11.3-2 Β· BSD-3-Clause
- fedora 43: libzip-devel 1.11.4-2.fc43 Β· BSD-3-Clause
- fedora 43: libzip-devel 1.11.4-2.fc43 Β· BSD-3-Clause
- fedora 44: libzip-devel 1.11.4-3.fc44 Β· BSD-3-Clause
- fedora 44: libzip-devel 1.11.4-3.fc44 Β· BSD-3-Clause
- nixpkgs unstable: libzip 1.11.4
- ubuntu questing: libzip-dev 1.11.3-2
- ubuntu resolute: libzip-dev 1.11.4-2 Β· BSD-3-Clause
- ubuntu stonking: libzip-dev 1.11.4-2build1 Β· BSD-3-Clause
- Copyright (C) 2014-2017 Dieter Baron and Thomas Klausner
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms