Skip to content

Commit d7e5d15

Browse files
committed
Move private struct declaration to compress_io.c
Keep only the typedef in the header file.
1 parent 0025b76 commit d7e5d15

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

src/bin/pg_dump/compress_io.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@
3232

3333
#include "compress_io.h"
3434

35+
36+
/* typedef appears in compress_io.h */
37+
struct CompressorState
38+
{
39+
CompressionAlgorithm comprAlg;
40+
WriteFunc writeF;
41+
42+
#ifdef HAVE_LIBZ
43+
z_streamp zp;
44+
char *zlibOut;
45+
size_t zlibOutSize;
46+
#endif
47+
};
48+
3549
static const char *modulename = gettext_noop("compress_io");
3650

3751
static void ParseCompressionOption(int compression, CompressionAlgorithm *alg,

src/bin/pg_dump/compress_io.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,8 @@ typedef size_t (*WriteFunc)(ArchiveHandle *AH, const char *buf, size_t len);
4444
*/
4545
typedef size_t (*ReadFunc)(ArchiveHandle *AH, char **buf, size_t *buflen);
4646

47-
typedef struct _CompressorState
48-
{
49-
CompressionAlgorithm comprAlg;
50-
WriteFunc writeF;
51-
52-
#ifdef HAVE_LIBZ
53-
z_streamp zp;
54-
char *zlibOut;
55-
size_t zlibOutSize;
56-
#endif
57-
} CompressorState;
47+
/* struct definition appears in compress_io.c */
48+
typedef struct CompressorState CompressorState;
5849

5950
extern CompressorState *AllocateCompressor(int compression, WriteFunc writeF);
6051
extern void ReadDataFromArchive(ArchiveHandle *AH, int compression,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy