mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user