summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorRalf Corsépius <corsepiu@fedoraproject.org>2007-09-21 17:02:45 +0200
committerRalf Corsépius <corsepiu@fedoraproject.org>2007-09-21 17:02:45 +0200
commit07e383ce0d9a8beeec36e9aed66a2017e95dfcb6 (patch)
treef29a397977cdd0a4c267e74810442c6aabe816f9 /rpmio
parent0e3ce6c9a8f5d658ae5ef57e9aca1f3c0fc55b9f (diff)
downloadrpm-07e383ce0d9a8beeec36e9aed66a2017e95dfcb6.tar.gz
rpm-07e383ce0d9a8beeec36e9aed66a2017e95dfcb6.tar.bz2
rpm-07e383ce0d9a8beeec36e9aed66a2017e95dfcb6.zip
Add fdLink, fdFree, fdNew functions.
Diffstat (limited to 'rpmio')
-rw-r--r--rpmio/rpmio.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
index b40ea3289..9bf08e53e 100644
--- a/rpmio/rpmio.c
+++ b/rpmio/rpmio.c
@@ -188,7 +188,16 @@ DBGIO(fd, (stderr, "==> fdFdopen(%p,\"%s\") fdno %d -> fp %p fdno %d\n", cookie,
#endif
/* =============================================================== */
-/* FIX: cookie is modified */
+
+/**
+ */
+FD_t fdLink (void * cookie, const char * msg)
+{
+ return fdio->_fdref(cookie, msg, __FILE__, __LINE__);
+}
+
+/**
+ */
static inline FD_t XfdLink(void * cookie, const char * msg,
const char * file, unsigned line)
{
@@ -203,6 +212,15 @@ DBGREFS(fd, (stderr, "--> fd %p ++ %d %s at %s:%u %s\n", fd, fd->nrefs, msg, fi
return fd;
}
+/**
+ */
+FD_t fdFree(FD_t fd, const char * msg)
+{
+ return fdio->_fdderef(fd, msg, __FILE__, __LINE__);
+}
+
+/**
+ */
static inline
FD_t XfdFree( FD_t fd, const char *msg,
const char *file, unsigned line)
@@ -230,6 +248,15 @@ DBGREFS(fd, (stderr, "--> fd %p -- %d %s at %s:%u %s\n", fd, fd->nrefs, msg, fi
return NULL;
}
+/**
+ */
+FD_t fdNew (const char * msg)
+{
+ return fdio->_fdnew(msg, __FILE__, __LINE__);
+}
+
+/**
+ */
static inline
FD_t XfdNew(const char * msg, const char * file, unsigned line)
{