mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
Remove dynahash.h
All the callers of my_log2() are now limited inside dynahash.c, so let's remove this header. The same capability is provided by pg_bitutils.h already. Discussion: https://postgr.es/m/CAEZATCUJPQD_7sC-wErak2CQGNa6bj2hY-mr8wsBki=kX7f2_A@mail.gmail.com
This commit is contained in:
@@ -102,7 +102,6 @@
|
|||||||
#include "port/pg_bitutils.h"
|
#include "port/pg_bitutils.h"
|
||||||
#include "storage/shmem.h"
|
#include "storage/shmem.h"
|
||||||
#include "storage/spin.h"
|
#include "storage/spin.h"
|
||||||
#include "utils/dynahash.h"
|
|
||||||
#include "utils/memutils.h"
|
#include "utils/memutils.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -281,6 +280,7 @@ static bool init_htab(HTAB *hashp, int64 nelem);
|
|||||||
pg_noreturn static void hash_corrupted(HTAB *hashp);
|
pg_noreturn static void hash_corrupted(HTAB *hashp);
|
||||||
static uint32 hash_initial_lookup(HTAB *hashp, uint32 hashvalue,
|
static uint32 hash_initial_lookup(HTAB *hashp, uint32 hashvalue,
|
||||||
HASHBUCKET **bucketptr);
|
HASHBUCKET **bucketptr);
|
||||||
|
static int my_log2(int64 num);
|
||||||
static int64 next_pow2_int64(int64 num);
|
static int64 next_pow2_int64(int64 num);
|
||||||
static int next_pow2_int(int64 num);
|
static int next_pow2_int(int64 num);
|
||||||
static void register_seq_scan(HTAB *hashp);
|
static void register_seq_scan(HTAB *hashp);
|
||||||
@@ -1813,7 +1813,7 @@ hash_corrupted(HTAB *hashp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* calculate ceil(log base 2) of num */
|
/* calculate ceil(log base 2) of num */
|
||||||
int
|
static int
|
||||||
my_log2(int64 num)
|
my_log2(int64 num)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
/*-------------------------------------------------------------------------
|
|
||||||
*
|
|
||||||
* dynahash.h
|
|
||||||
* POSTGRES dynahash.h file definitions
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
|
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
|
||||||
*
|
|
||||||
* IDENTIFICATION
|
|
||||||
* src/include/utils/dynahash.h
|
|
||||||
*
|
|
||||||
*-------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
#ifndef DYNAHASH_H
|
|
||||||
#define DYNAHASH_H
|
|
||||||
|
|
||||||
extern int my_log2(int64 num);
|
|
||||||
|
|
||||||
#endif /* DYNAHASH_H */
|
|
||||||
Reference in New Issue
Block a user