NAME
pdb_CopyRecord pdb_CopyResource – short description
LIBRARY
libpdb
SYNOPSIS
#include <pdb.h>
struct pdb_record *
pdb_CopyRecord(const struct pdb *db, const struct pdb_record *rec);
struct pdb_resource *
pdb_CopyResource(const struct pdb *db, const struct pdb_resource *rsrc);
DESCRIPTION
pdb_CopyRecord allocates a new struct pdb_record, copies to it the record pointed to by rec in database db, and returns a pointer to the newly-allocated struct pdb_record. This pointer must later be freed with pdb_FreeRecord(), unless it is added to another database using a function such as pdb_AppendRecord().
pdb_CopyResource allocates a new struct pdb_resource, copies to it the resource pointed to by rsrc in database db, and returns a pointer to the newly-allocated struct pdb_resource. This pointer must later be freed with pdb_FreeResource(), unless it is added to another database using a function such as pdb_AppendResource().
RETURN VALUE
pdb_CopyRecord and pdb_CopyResource return a pointer to the newly-allocated struct pdb_record or struct pdb_resource if successful, or NULL otherwise.
SEE ALSO
libpdb(3), pdb_FreeRecord(3), pdb_FreeResource(3).
AUTHORS
Andrew Arensburger ⟨[email protected]⟩