2025-05-05 Paul Eggert <eggert@cs.ucla.edu>
+ obstack: rename to _OBSTACK_CHUNK_SIZE_T
+ * lib/obstack.in.h (_OBSTACK_CHUNK_SIZE_T):
+ Rename from _CHUNK_SIZE_T, for namespace prefix consistency.
+
obstack: use int where glibc does
Make it easier to merge with glibc, by using int where
the glibc API uses int, when compiling for glibc.
/* In Gnulib, we use sane types, especially for 64-bit hosts. */
# define _OBSTACK_INDEX_T size_t
# define _OBSTACK_SIZE_T size_t
-# define _CHUNK_SIZE_T size_t
+# define _OBSTACK_CHUNK_SIZE_T size_t
# define _OBSTACK_CAST(type, expr) (expr)
# define _OBSTACK_CHUNK_CONTENTS_SIZE FLEXIBLE_ARRAY_MEMBER
#else
/* For backward compatibility, glibc limits object sizes to int range. */
# define _OBSTACK_INDEX_T int
# define _OBSTACK_SIZE_T unsigned int
-# define _CHUNK_SIZE_T unsigned long
+# define _OBSTACK_CHUNK_SIZE_T unsigned long
# define _OBSTACK_CAST(type, expr) ((type) (expr))
# define _OBSTACK_CHUNK_CONTENTS_SIZE 4
#endif
struct obstack /* control current object in current chunk */
{
- _CHUNK_SIZE_T chunk_size; /* preferred size to allocate chunks in */
+ _OBSTACK_CHUNK_SIZE_T chunk_size; /* preferred size to allocate chunks in */
struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
char *object_base; /* address of object we are building */
char *next_free; /* where to add next char to current object */