From 210f5a37467d9d3c2e347e69bfc2111c4a2c1ee4 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Fri, 16 May 2025 21:18:16 +0200 Subject: [PATCH] chvalid: Mark functions as deprecated --- chvalid.c | 24 ++++++++---------------- include/libxml/chvalid.h | 8 ++++++++ python/generator.py | 8 ++++++++ 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/chvalid.c b/chvalid.c index 739faf54..57df5e75 100644 --- a/chvalid.c +++ b/chvalid.c @@ -78,8 +78,7 @@ xmlCharInRange (unsigned int val, const xmlChRangeGroup *rptr) { /** - * This function is DEPRECATED. - * Use xmlIsBaseChar_ch() or xmlIsBaseCharQ() instead + * @deprecated Use xmlIsBaseChar_ch() or xmlIsBaseCharQ(). * * @param ch character to validate * @returns true if argument valid, false otherwise @@ -91,8 +90,7 @@ xmlIsBaseChar(unsigned int ch) { /** - * This function is DEPRECATED. - * Use xmlIsBlank_ch() or xmlIsBlankQ() instead + * @deprecated Use xmlIsBlank_ch() or xmlIsBlankQ(). * * @param ch character to validate * @returns true if argument valid, false otherwise @@ -104,8 +102,7 @@ xmlIsBlank(unsigned int ch) { /** - * This function is DEPRECATED. - * Use xmlIsChar_ch() or xmlIsCharQ() instead + * @deprecated Use xmlIsChar_ch() or xmlIsCharQ(). * * @param ch character to validate * @returns true if argument valid, false otherwise @@ -117,8 +114,7 @@ xmlIsChar(unsigned int ch) { /** - * This function is DEPRECATED. - * Use xmlIsCombiningQ() instead + * @deprecated Use xmlIsCombiningQ(). * * @param ch character to validate * @returns true if argument valid, false otherwise @@ -130,8 +126,7 @@ xmlIsCombining(unsigned int ch) { /** - * This function is DEPRECATED. - * Use xmlIsDigit_ch() or xmlIsDigitQ() instead + * @deprecated Use xmlIsDigit_ch() or xmlIsDigitQ(). * * @param ch character to validate * @returns true if argument valid, false otherwise @@ -143,8 +138,7 @@ xmlIsDigit(unsigned int ch) { /** - * This function is DEPRECATED. - * Use xmlIsExtender_ch() or xmlIsExtenderQ() instead + * @deprecated Use xmlIsExtender_ch() or xmlIsExtenderQ(). * * @param ch character to validate * @returns true if argument valid, false otherwise @@ -156,8 +150,7 @@ xmlIsExtender(unsigned int ch) { /** - * This function is DEPRECATED. - * Use xmlIsIdeographicQ() instead + * @deprecated Use xmlIsIdeographicQ(). * * @param ch character to validate * @returns true if argument valid, false otherwise @@ -169,8 +162,7 @@ xmlIsIdeographic(unsigned int ch) { /** - * This function is DEPRECATED. - * Use xmlIsPubidChar_ch() or xmlIsPubidCharQ() instead + * @deprecated Use xmlIsPubidChar_ch() or xmlIsPubidCharQ(). * * @param ch character to validate * @returns true if argument valid, false otherwise diff --git a/include/libxml/chvalid.h b/include/libxml/chvalid.h index d64ab840..65bfd914 100644 --- a/include/libxml/chvalid.h +++ b/include/libxml/chvalid.h @@ -187,20 +187,28 @@ XMLPUBFUN int #define xmlIsPubidCharQ(c) (((c) < 0x100) ? \ xmlIsPubidChar_ch((c)) : 0) +XML_DEPRECATED XMLPUBFUN int xmlIsBaseChar(unsigned int ch); +XML_DEPRECATED XMLPUBFUN int xmlIsBlank(unsigned int ch); +XML_DEPRECATED XMLPUBFUN int xmlIsChar(unsigned int ch); +XML_DEPRECATED XMLPUBFUN int xmlIsCombining(unsigned int ch); +XML_DEPRECATED XMLPUBFUN int xmlIsDigit(unsigned int ch); +XML_DEPRECATED XMLPUBFUN int xmlIsExtender(unsigned int ch); +XML_DEPRECATED XMLPUBFUN int xmlIsIdeographic(unsigned int ch); +XML_DEPRECATED XMLPUBFUN int xmlIsPubidChar(unsigned int ch); diff --git a/python/generator.py b/python/generator.py index 05464305..5a56fa31 100755 --- a/python/generator.py +++ b/python/generator.py @@ -597,7 +597,15 @@ deprecated_funcs = { 'xmlInitializeDict': True, 'xmlIOFTPMatch': True, 'xmlIOHTTPMatch': True, + 'xmlIsBaseChar': True, + 'xmlIsBlank': True, + 'xmlIsChar': True, + 'xmlIsCombining': True, + 'xmlIsDigit': True, + 'xmlIsExtender': True, + 'xmlIsIdeographic': True, 'xmlIsLetter': True, + 'xmlIsPubidChar': True, 'xmlIsRef': True, 'xmlKeepBlanksDefault': True, 'xmlLineNumbersDefault': True,