Merge pull request #16140 from donaldsharp/linklist_discouragement

This commit is contained in:
David Lamparter 2024-07-10 09:08:21 +02:00 committed by GitHub
commit ebf05b4ee1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 55 additions and 0 deletions

View file

@ -13,6 +13,18 @@
extern "C" {
#endif
/*
* NOTICE:
*
* If you are reading this file in an effort to add a new hash structure
* this is the wrong place to be using it. Please see the typesafe
* data structures, or ask one of the other developers.
*
* If you are reading this file as a way to update an existing usage
* of this data structure, please consider just converting the data
* structure to one of the typesafe data structures instead.
*/
/* Default hash table size. */
#define HASH_INITIAL_SIZE 256
/* Expansion threshold */

View file

@ -10,6 +10,18 @@
extern "C" {
#endif
/*
* NOTICE:
*
* If you are reading this file in an effort to add a new list structure
* this is the wrong place to be using it. Please see the typesafe
* data structures, or ask one of the other developers.
*
* If you are reading this file as a way to update an existing usage
* of this data structure, please consider just converting the data
* structure to one of the typesafe data structures instead.
*/
/* listnodes must always contain data to be valid. Adding an empty node
* to a list is invalid
*/

View file

@ -16,6 +16,22 @@
extern "C" {
#endif
/*
* NOTICE:
*
* If you are reading this file in an effort to add a new queue structure
* this is the wrong place to be using it. Please see the typesafe
* data structures, or ask one of the other developers.
*
* If you are reading this file as a way to update an existing usage
* of this data structure, please consider just converting the data
* structure to one of the typesafe data structures instead. However,
* among converting datastrucutres, the the BSD ones are the lowest
* priority / should be converted last. They are already typesafe and
* use inline linking nodes, so the only gain is consistency. Please
* convert uses of linklist.h and hash.h first.
*/
/*
* This file defines five types of data structures: singly-linked lists,
* lists, simple queues, tail queues and XOR simple queues.

View file

@ -10,6 +10,21 @@
#ifdef __cplusplus
extern "C" {
#endif
/*
* NOTICE:
*
* If you are reading this file in an effort to add a new tree structure
* this is the wrong place to be using it. Please see the typesafe
* data structures, or ask one of the other developers.
*
* If you are reading this file as a way to update an existing usage
* of this data structure, please consider just converting the data
* structure to one of the typesafe data structures instead. However,
* among converting datastrucutres, the the BSD ones are the lowest
* priority / should be converted last. They are already typesafe and
* use inline linking nodes, so the only gain is consistency. Please
* convert uses of linklist.h and hash.h first.
*/
/*
* This file defines data structures for different types of trees: