summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-01-05 11:51:38 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2022-01-05 11:51:38 -0800
commit9d3ec33a02dccaaa930f839752304d1b8d0b903e (patch)
tree5b11c939f90683761eb4d6010bfeadcf2101bf01 /lib
parent403968da56573bdbdcab79adabddcdc270e05cc9 (diff)
downloadgnulib-9d3ec33a02dccaaa930f839752304d1b8d0b903e.tar.gz
stack: also update stack_size to return idx_t
* lib/stack.h (_GL_STACK_PREFIX (size)): Return idx_t, not size_t.
Diffstat (limited to 'lib')
-rw-r--r--lib/stack.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/stack.h b/lib/stack.h
index b4c35535a7..28b9d7a542 100644
--- a/lib/stack.h
+++ b/lib/stack.h
@@ -17,7 +17,7 @@
/* Written by Marc Nieper-Wißkirchen <marc@nieper-wisskirchen.de>, 2020. */
/* This header file does not have include-guards as it is meant to be
- includeable multiple times as long as the necessary defines have
+ includable multiple times as long as the necessary defines have
been set up.
A stack is implemented with a homogenous array of elements in
@@ -36,7 +36,7 @@
Popping: ELEMENT element = stack_pop (&stack);
Discarding: stack_discard (&stack);
Top-of-stack: ELEMENT element = stack_top (&stack);
- Size: size_t size = stack_size (&stack);
+ Size: idx_t size = stack_size (&stack);
Here, ELEMENT is the type to which GL_STACK_ELEMENT was defined when
this file was included.
@@ -152,7 +152,7 @@ _GL_STACK_PREFIX (top) (const _GL_STACK_TYPE *stack)
}
/* Return the currently stored number of elements in the stack. */
-GL_STACK_STORAGECLASS _GL_ATTRIBUTE_PURE size_t
+GL_STACK_STORAGECLASS _GL_ATTRIBUTE_PURE idx_t
_GL_STACK_PREFIX (size) (const _GL_STACK_TYPE *stack)
{
return stack->size;