@@ -613,7 +613,7 @@ static inline Py_ssize_t PyUnicode_WSTR_LENGTH(PyObject *op)
613
613
If the Py_UNICODE representation is not available, it will be computed
614
614
on request. Use PyUnicode_GET_LENGTH() for the length in code points. */
615
615
616
- /* Py_DEPRECATED(3.3) */
616
+ Py_DEPRECATED (3.3 )
617
617
static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
618
618
{
619
619
_Py_COMP_DIAG_PUSH
@@ -627,10 +627,13 @@ static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
627
627
}
628
628
#define PyUnicode_GET_SIZE (op ) PyUnicode_GET_SIZE(_PyObject_CAST(op))
629
629
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)
632
632
{
633
+ _Py_COMP_DIAG_PUSH
634
+ _Py_COMP_DIAG_IGNORE_DEPR_DECLS
633
635
return PyUnicode_GET_SIZE (op) * Py_UNICODE_SIZE;
636
+ _Py_COMP_DIAG_POP
634
637
}
635
638
#define PyUnicode_GET_DATA_SIZE (op ) PyUnicode_GET_DATA_SIZE(_PyObject_CAST(op))
636
639
@@ -639,7 +642,7 @@ static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
639
642
try to port your code to use the new PyUnicode_*BYTE_DATA() macros or
640
643
use PyUnicode_WRITE() and PyUnicode_READ(). */
641
644
642
- /* Py_DEPRECATED(3.3) */
645
+ Py_DEPRECATED (3.3 )
643
646
static inline Py_UNICODE* PyUnicode_AS_UNICODE(PyObject *op)
644
647
{
645
648
wchar_t *wstr = _PyASCIIObject_CAST (op)->wstr ;
@@ -654,10 +657,13 @@ static inline Py_UNICODE* PyUnicode_AS_UNICODE(PyObject *op)
654
657
}
655
658
#define PyUnicode_AS_UNICODE (op ) PyUnicode_AS_UNICODE(_PyObject_CAST(op))
656
659
657
- /* Py_DEPRECATED(3.3) */
660
+ Py_DEPRECATED (3.3 )
658
661
static inline const char* PyUnicode_AS_DATA(PyObject *op)
659
662
{
663
+ _Py_COMP_DIAG_PUSH
664
+ _Py_COMP_DIAG_IGNORE_DEPR_DECLS
660
665
return (const char *)PyUnicode_AS_UNICODE (op);
666
+ _Py_COMP_DIAG_POP
661
667
}
662
668
#define PyUnicode_AS_DATA (op ) PyUnicode_AS_DATA(_PyObject_CAST(op))
663
669
0 commit comments