⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hasht.c

📁 关系型数据库 Postgresql 6.5.2
💻 C
字号:
/*------------------------------------------------------------------------- * * hasht.c *	  hash table related functions that are not directly supported *	  by the hashing packages under utils/hash. * * Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION *	  $Header: /usr/local/cvsroot/pgsql/src/backend/lib/hasht.c,v 1.8 1999/02/13 23:15:35 momjian Exp $ * *------------------------------------------------------------------------- */#include <postgres.h>#include <utils/memutils.h>#include <utils/hsearch.h>#include <lib/hasht.h>/* ----------------------------------- *		HashTableWalk * *		call function on every element in hashtable *		one extra argument, arg may be supplied * ----------------------------------- */voidHashTableWalk(HTAB *hashtable, HashtFunc function, int arg){	long	   *hashent;	long	   *data;	int			keysize;	keysize = hashtable->hctl->keysize;	hash_seq((HTAB *) NULL);	while ((hashent = hash_seq(hashtable)) != (long *) TRUE)	{		if (hashent == NULL)			elog(FATAL, "error in HashTableWalk.");		/*		 * XXX the corresponding hash table insertion does NOT LONGALIGN		 * -- make sure the keysize is ok		 */		data = (long *) LONGALIGN((char *) hashent + keysize);		(*function) (data, arg);	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -