---
name: "ZIP_SOURCE_GET_ARGS"
section: "3"
platform: "linux"
package: "libzip"
version: "1.11.4-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ZIP_SOURCE_GET_ARGS"
---

# ZIP\_SOURCE\_GET\_ARGS(3)

validate and cast arguments to source callback

## NAME

**ZIP\_SOURCE\_GET\_ARGS** – validate and cast arguments to source callback

## LIBRARY

libzip (-lzip)

## SYNOPSIS

**#include \<zip.h\>**

*type* *\**\

**ZIP\_SOURCE\_GET\_ARGS**(*type*, *void \*data*, *zip\_uint64\_t len*, *zip\_error\_t \*error*);

## DESCRIPTION

The **ZIP\_SOURCE\_GET\_ARGS**() macro casts *data* to a pointer to *type*.

## RETURN VALUES

On success, **ZIP\_SOURCE\_GET\_ARGS**() returns *data*. In case of error, it returns NULL and sets *error*.

## ERRORS

**ZIP\_SOURCE\_GET\_ARGS**() fails if:

- \[ZIP\_ER\_INVAL\]

  *len* is less than the size of *type*

## SEE ALSO

[libzip(3)](/libzip/3.md), [zip\_source\_function(3)](/zip_source_function/3.md)

## HISTORY

**ZIP\_SOURCE\_GET\_ARGS**() was added in libzip 1.0.

## AUTHORS

Dieter Baron ⟨*dillo@nih.at*⟩ and Thomas Klausner ⟨*wiz@gatalith.at*⟩
