Skip to content

Commit dddf61b

Browse files
committed
Add _PG_init prototype
While at it, move PG_MODULE_MAGIC into the file that has _PG_init.
1 parent 6e2a1bc commit dddf61b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pg_pwhash.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
#include "pwhash_argon2.h"
1212
#include "pwhash_yescrypt.h"
1313

14+
PG_MODULE_MAGIC;
1415
PG_FUNCTION_INFO_V1(pwhash_test_options);
1516
PG_FUNCTION_INFO_V1(xgen_salt);
1617
PG_FUNCTION_INFO_V1(pgxcrypt_crypt);
1718
PG_FUNCTION_INFO_V1(xcrypt);
19+
void PGDLLEXPORT _PG_init(void);
1820

1921
#if PG_VERSION_NUM < 180000
2022
#define PWHASH_PGB64_t char *
@@ -624,4 +626,4 @@ _PG_init(void)
624626
NULL);
625627

626628

627-
}
629+
}

pwhash_scrypt.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#include "libscrypt.h"
2121
#endif
2222

23-
PG_MODULE_MAGIC;
24-
2523
#define SCRYPT_WORK_FACTOR_N 16
2624
#define SCRYPT_BLOCK_SIZE_r 8
2725
#define SCRYPT_PARALLEL_FACTOR_p 1

0 commit comments

Comments
 (0)