18.2.173. PMIx_Regattr_xfer
PMIx_Regattr_xfer — Copy the contents of one
pmix_regattr_t(5) structure into another.
18.2.173.1. SYNOPSIS
#include <pmix.h>
void PMIx_Regattr_xfer(pmix_regattr_t *dest,
const pmix_regattr_t *src);
18.2.173.1.1. Python Syntax
No Python equivalent
18.2.173.2. INPUT/OUTPUT PARAMETERS
dest: Pointer to the destination pmix_regattr_t(5) structure. Its storage must already exist; it is (re)initialized by this call and then populated with copies of the source fields.src: Pointer to the source pmix_regattr_t(5) structure whose fields are copied.
18.2.173.3. DESCRIPTION
Perform a deep copy of the src pmix_regattr_t
into dest. The function first constructs dest (as
PMIx_Regattr_construct(3) would), then
copies each field: the name string is duplicated, the string key is
copied, the type is assigned, and the description string array is
duplicated element by element. Fields that are NULL in the source are left
in their constructed state in the destination.
Because every referenced string is duplicated, dest and src share no
storage after the call; each must be released independently with
PMIx_Regattr_destruct(3) (or
PMIx_Regattr_free(3)).
18.2.173.4. RETURN VALUE
PMIx_Regattr_xfer returns no value (void).
18.2.173.5. NOTES
The PMIX_REGATTR_XFER convenience macro is a direct wrapper for this
function.
PMIx_Regattr_xfer reinitializes dest before copying; if dest already
holds allocated contents, destruct it first (with
PMIx_Regattr_destruct(3)) to avoid leaking
that storage.