Files
mercury/runtime/mercury_table_int_float_string.h
Fergus Henderson 92ed2c27e1 Various bug fixes and other cleanups of the new tabling code.
Estimated hours taken: 1

Various bug fixes and other cleanups of the new tabling code.

library/mercury_builtin.m:
	Fix a couple of bugs in the new tabling code that broke in
	grades other than asm_fast.gc.

runtime/mercury_tabling.h:
	Fix a couple of type errors that caused things to break in
	grades other than asm_fast.gc.
	Change the layout to match our coding guidelines.

runtime/mercury_table_any.c:
	Fix the layout to match our coding guidelines.

runtime/mercury_table_any.h:
runtime/mercury_table_enum.h:
runtime/mercury_table_int_float_string.h:
runtime/mercury_table_type_info.h:
	Add copyright notice.

runtime/mercury_table.h:
	Add a comment pointing out that this is hash tables,
	not tabling.
1998-05-16 15:31:03 +00:00

36 lines
1.3 KiB
C

/*
** Copyright (C) 1997-1998 The University of Melbourne.
** This file may only be copied under the terms of the GNU Library General
** Public License - see the file COPYING.LIB in the Mercury distribution.
*/
#ifndef MERCURY_TABLE_INT_FLOAT_STRING_H
#define MERCURY_TABLE_INT_FLOAT_STRING_H
/*
** Look to see if the given integer key is in the given table. If it
** is return the address of the data pointer associated with the key.
** If it is not; create a new element for the key in the table and
** return the address of its data pointer.
**/
TrieNode MR_int_hash_lookup_or_add(TrieNode Table, Integer Key);
/*
** Look to see if the given float key is in the given table. If it
** is return the address of the data pointer associated with the key.
** If it is not create a new element for the key in the table and
** return the address of its data pointer.
**/
TrieNode MR_float_hash_lookup_or_add(TrieNode Table, Float Key);
/*
** Look to see if the given string key is in the given table. If it
** is return the address of the data pointer associated with the key.
** If it is not create a new element for the key in the table and
** return the address of its data pointer.
**/
TrieNode MR_string_hash_lookup_or_add(TrieNode Table, String Key);
#endif /* not MERCURY_TABLE_INT_FLOAT_STRING_H */