summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/px.h
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-09-25 10:25:55 +0900
committerMichael Paquier <michael@paquier.xyz>2020-09-25 10:25:55 +0900
commitca7f8e2b86e5f15a40b67e6199d714f45a467ff1 (patch)
tree19c94a35cb8ff4902d4b4f7b477ace69e1d34a33 /contrib/pgcrypto/px.h
parenta45bc8a4f6495072bc48ad40a5aa0304979114f7 (diff)
Remove custom memory allocation layer in pgcrypto
PX_OWN_ALLOC was intended as a way to disable the use of palloc(), and over the time new palloc() or equivalent calls have been added like in 32984d8, making this extra layer losing its original purpose. This simplifies on the way some code paths to use palloc0() rather than palloc() followed by memset(0). Author: Daniel Gustafsson Discussion: https://postgr.es/m/A5BFAA1A-B2E8-4CBC-895E-7B1B9475A527@yesql.se
Diffstat (limited to 'contrib/pgcrypto/px.h')
-rw-r--r--contrib/pgcrypto/px.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/contrib/pgcrypto/px.h b/contrib/pgcrypto/px.h
index 0d4722a04a0..5487923edb3 100644
--- a/contrib/pgcrypto/px.h
+++ b/contrib/pgcrypto/px.h
@@ -37,19 +37,6 @@
/* keep debug messages? */
#define PX_DEBUG
-/* a way to disable palloc
- * - useful if compiled into standalone
- */
-#ifndef PX_OWN_ALLOC
-#define px_alloc(s) palloc(s)
-#define px_realloc(p, s) repalloc(p, s)
-#define px_free(p) pfree(p)
-#else
-void *px_alloc(size_t s);
-void *px_realloc(void *p, size_t s);
-void px_free(void *p);
-#endif
-
/* max salt returned */
#define PX_MAX_SALT_LEN 128