* lib/wctype.in.h: Add placeholder for definition of _GL_ARG_NONNULL.
(wctype, wctrans): Mark with _GL_ARG_NONNULL ((1)).
* modules/wctype-h (Depends-on): Add snippet/arg-nonnull.
(Makefile.am): Substitute $(ARG_NONNULL_H) into wctype.h.
+2023-07-26 Bruno Haible <bruno@clisp.org>
+
+ wctype, wctrans: Require a non-NULL argument.
+ * lib/wctype.in.h: Add placeholder for definition of _GL_ARG_NONNULL.
+ (wctype, wctrans): Mark with _GL_ARG_NONNULL ((1)).
+ * modules/wctype-h (Depends-on): Add snippet/arg-nonnull.
+ (Makefile.am): Substitute $(ARG_NONNULL_H) into wctype.h.
+
2023-07-25 Bruno Haible <bruno@clisp.org>
iswctype: Add tests.
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
/* The definition of _GL_WARN_ON_USE is copied here. */
/* Solaris 2.6 <wctype.h> includes <widec.h> which includes <euc.h> which
/* Get a descriptor for a wide character property. */
#if @GNULIB_WCTYPE@
# if !@HAVE_WCTYPE_T@
-_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name));
+_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name)
+ _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name));
# if __GLIBC__ >= 2
/* Get a descriptor for a wide character case conversion. */
#if @GNULIB_WCTRANS@
# if !@HAVE_WCTRANS_T@
-_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name));
+_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name)
+ _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name));
# if __GLIBC__ >= 2
extern-inline
gen-header
include_next
+snippet/arg-nonnull
snippet/c++defs
snippet/warn-on-use
# We need the following in order to create <wctype.h> when the system
# doesn't have one that works with the given compiler.
-wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%'
$(gl_V_at)$(SED_HEADER_STDOUT) \
-e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
-e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
$(srcdir)/wctype.in.h > $@-t
$(AM_V_at)mv $@-t $@