Eliminate fdNew() from the API
authorPanu Matilainen <Panu Matilainen pmatilai@redhat.com>
Thu, 7 Jul 2011 10:55:16 +0000 (13:55 +0300)
committerPanu Matilainen <Panu Matilainen pmatilai@redhat.com>
Thu, 7 Jul 2011 10:55:16 +0000 (13:55 +0300)
- Nobody should be able to create file descriptors which are not
  attached to a file/descriptor of some kind, the only sane
  fd constructors are Fopen(), Fdopen() and fdDup().
- The same applies to fdFree() but its a bit more complicated,
  punting that till later...

rpmio/rpmio.c
rpmio/rpmio.h

index daec2e9..f04748f 100644 (file)
@@ -198,7 +198,7 @@ static const FDIO_t lzdio;
  * Update digest(s) attached to fd.
  */
 static void fdUpdateDigests(FD_t fd, const void * buf, size_t buflen);
-
+static FD_t fdNew(void);
 /**
  */
 int _rpmio_debug = 0;
index f43192f..986194f 100644 (file)
@@ -114,10 +114,6 @@ FD_t fdLink(void * cookie);
  */
 FD_t fdFree(FD_t fd);
 
-/** \ingroup rpmio
- */
-FD_t fdNew (void);
-
 /**
  */
 int ufdCopy(FD_t sfd, FD_t tfd);