docs: Move the GTrashStack SECTION

Move it to the struct docs.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3037
This commit is contained in:
Philip Withnall 2023-11-15 16:14:44 +00:00
parent 1625c24d58
commit 8179688c07

View File

@ -33,35 +33,27 @@
#include "gtrashstack.h" #include "gtrashstack.h"
/**
* SECTION:trash_stack
* @title: Trash Stacks
* @short_description: maintain a stack of unused allocated memory chunks
*
* A #GTrashStack is an efficient way to keep a stack of unused allocated
* memory chunks. Each memory chunk is required to be large enough to hold
* a #gpointer. This allows the stack to be maintained without any space
* overhead, since the stack pointers can be stored inside the memory chunks.
*
* There is no function to create a #GTrashStack. A %NULL #GTrashStack*
* is a perfectly valid empty stack.
*
* There is no longer any good reason to use #GTrashStack. If you have
* extra pieces of memory, free() them and allocate them again later.
*
* Deprecated: 2.48: #GTrashStack is deprecated without replacement
*/
/** /**
* GTrashStack: * GTrashStack:
* @next: pointer to the previous element of the stack, * @next: pointer to the previous element of the stack,
* gets stored in the first `sizeof (gpointer)` * gets stored in the first `sizeof (gpointer)`
* bytes of the element * bytes of the element
* *
* Each piece of memory that is pushed onto the stack * A `GTrashStack` is an efficient way to keep a stack of unused allocated
* is cast to a GTrashStack*. * memory chunks. Each memory chunk is required to be large enough to hold
* a `gpointer`. This allows the stack to be maintained without any space
* overhead, since the stack pointers can be stored inside the memory chunks.
* *
* Deprecated: 2.48: #GTrashStack is deprecated without replacement * There is no function to create a `GTrashStack`. A `NULL` `GTrashStack*`
* is a perfectly valid empty stack.
*
* Each piece of memory that is pushed onto the stack is cast to a
* `GTrashStack*`.
*
* There is no longer any good reason to use `GTrashStack`. If you have
* extra pieces of memory, `free()` them and allocate them again later.
*
* Deprecated: 2.48: `GTrashStack` is deprecated without replacement
*/ */
/** /**