mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Another round of cleanups for dynahash.c (maybe it's finally clean of
portability issues). Caller-visible data structures are now allocated on MAXALIGN boundaries, allowing safe use of datatypes wider than 'long'. Rejigger hash_create API so that caller specifies size of key and total size of entry, not size of key and size of rest of entry. This simplifies life considerably since each number is just a sizeof(), and padding issues etc. are taken care of automatically.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.41 2001/03/22 04:00:08 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.42 2001/10/01 05:36:16 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -123,7 +123,7 @@ EnablePortalManager(void)
|
||||
ALLOCSET_DEFAULT_MAXSIZE);
|
||||
|
||||
ctl.keysize = MAX_PORTALNAME_LEN;
|
||||
ctl.datasize = sizeof(Portal);
|
||||
ctl.entrysize = sizeof(PortalHashEnt);
|
||||
|
||||
/*
|
||||
* use PORTALS_PER_USER, defined in utils/portal.h as a guess of how
|
||||
|
||||
Reference in New Issue
Block a user