@@ -613,7 +613,7 @@ static inline Py_ssize_t PyUnicode_WSTR_LENGTH(PyObject *op)
613613 If the Py_UNICODE representation is not available, it will be computed
614614 on request. Use PyUnicode_GET_LENGTH() for the length in code points. */
615615
616- /* Py_DEPRECATED(3.3) */
616+ Py_DEPRECATED (3.3 )
617617static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
618618{
619619 _Py_COMP_DIAG_PUSH
@@ -627,10 +627,13 @@ static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
627627}
628628#define PyUnicode_GET_SIZE (op ) PyUnicode_GET_SIZE(_PyObject_CAST(op))
629629
630- /* Py_DEPRECATED(3.3) */
631- static inline Py_ssize_t PyUnicode_GET_DATA_SIZE (PyObject *op)
630+ Py_DEPRECATED (3.3 )
631+ static inline Py_ssize_t PyUnicode_GET_DATA_SIZE(PyObject *op)
632632{
633+ _Py_COMP_DIAG_PUSH
634+ _Py_COMP_DIAG_IGNORE_DEPR_DECLS
633635 return PyUnicode_GET_SIZE (op) * Py_UNICODE_SIZE;
636+ _Py_COMP_DIAG_POP
634637}
635638#define PyUnicode_GET_DATA_SIZE (op ) PyUnicode_GET_DATA_SIZE(_PyObject_CAST(op))
636639
@@ -639,7 +642,7 @@ static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
639642 try to port your code to use the new PyUnicode_*BYTE_DATA() macros or
640643 use PyUnicode_WRITE() and PyUnicode_READ(). */
641644
642- /* Py_DEPRECATED(3.3) */
645+ Py_DEPRECATED (3.3 )
643646static inline Py_UNICODE* PyUnicode_AS_UNICODE(PyObject *op)
644647{
645648 wchar_t *wstr = _PyASCIIObject_CAST (op)->wstr ;
@@ -654,10 +657,13 @@ static inline Py_UNICODE* PyUnicode_AS_UNICODE(PyObject *op)
654657}
655658#define PyUnicode_AS_UNICODE (op ) PyUnicode_AS_UNICODE(_PyObject_CAST(op))
656659
657- /* Py_DEPRECATED(3.3) */
660+ Py_DEPRECATED (3.3 )
658661static inline const char* PyUnicode_AS_DATA(PyObject *op)
659662{
663+ _Py_COMP_DIAG_PUSH
664+ _Py_COMP_DIAG_IGNORE_DEPR_DECLS
660665 return (const char *)PyUnicode_AS_UNICODE (op);
666+ _Py_COMP_DIAG_POP
661667}
662668#define PyUnicode_AS_DATA (op ) PyUnicode_AS_DATA(_PyObject_CAST(op))
663669
0 commit comments