@@ -556,13 +556,13 @@ PyAPI_FUNC(void) _PyUnicode_FastFill(
556
556
Scan the string to find the maximum character. */
557
557
PyAPI_FUNC (PyObject*) PyUnicode_FromKindAndData(
558
558
int kind,
559
- const void *str ,
559
+ const void *buffer ,
560
560
Py_ssize_t size);
561
561
562
562
/* Create a new string from a buffer of ASCII characters.
563
563
WARNING: Don't check if the string contains any non-ASCII character. */
564
564
PyAPI_FUNC (PyObject*) _PyUnicode_FromASCII(
565
- const char *str ,
565
+ const char *buffer ,
566
566
Py_ssize_t size);
567
567
568
568
/* Compute the maximum character of the substring unicode[start:end].
@@ -629,7 +629,8 @@ typedef struct {
629
629
* By default, the minimum buffer size is 0 character and overallocation is
630
630
* disabled. Set min_length, min_char and overallocate attributes to control
631
631
* the allocation of the buffer. */
632
- PyAPI_FUNC (void ) _PyUnicodeWriter_Init(_PyUnicodeWriter *writer);
632
+ PyAPI_FUNC (void )
633
+ _PyUnicodeWriter_Init(_PyUnicodeWriter *writer);
633
634
634
635
/* Prepare the buffer to write 'length' characters
635
636
with the specified maximum character.
@@ -645,11 +646,9 @@ PyAPI_FUNC(void) _PyUnicodeWriter_Init(_PyUnicodeWriter *writer);
645
646
646
647
/* Don't call this function directly, use the _PyUnicodeWriter_Prepare() macro
647
648
instead. */
648
- PyAPI_FUNC (int ) _PyUnicodeWriter_PrepareInternal(
649
- _PyUnicodeWriter *writer,
650
- Py_ssize_t length,
651
- Py_UCS4 maxchar
652
- );
649
+ PyAPI_FUNC (int )
650
+ _PyUnicodeWriter_PrepareInternal(_PyUnicodeWriter *writer,
651
+ Py_ssize_t length, Py_UCS4 maxchar);
653
652
654
653
/* Prepare the buffer to have at least the kind KIND.
655
654
For example, kind=PyUnicode_2BYTE_KIND ensures that the writer will
@@ -664,61 +663,58 @@ PyAPI_FUNC(int) _PyUnicodeWriter_PrepareInternal(
664
663
665
664
/* Don't call this function directly, use the _PyUnicodeWriter_PrepareKind()
666
665
macro instead. */
667
- PyAPI_FUNC (int ) _PyUnicodeWriter_PrepareKindInternal(
668
- _PyUnicodeWriter *writer,
669
- enum PyUnicode_Kind kind
670
- );
666
+ PyAPI_FUNC (int )
667
+ _PyUnicodeWriter_PrepareKindInternal(_PyUnicodeWriter *writer,
668
+ enum PyUnicode_Kind kind);
671
669
672
670
/* Append a Unicode character.
673
671
Return 0 on success, raise an exception and return -1 on error. */
674
- PyAPI_FUNC (int ) _PyUnicodeWriter_WriteChar(
675
- _PyUnicodeWriter *writer,
672
+ PyAPI_FUNC (int )
673
+ _PyUnicodeWriter_WriteChar( _PyUnicodeWriter *writer,
676
674
Py_UCS4 ch
677
675
);
678
676
679
677
/* Append a Unicode string.
680
678
Return 0 on success, raise an exception and return -1 on error. */
681
- PyAPI_FUNC (int ) _PyUnicodeWriter_WriteStr(
682
- _PyUnicodeWriter *writer,
683
- PyObject *unicode /* Unicode string */
679
+ PyAPI_FUNC (int )
680
+ _PyUnicodeWriter_WriteStr( _PyUnicodeWriter *writer,
681
+ PyObject *str /* Unicode string */
684
682
);
685
683
686
684
/* Append a substring of a Unicode string.
687
685
Return 0 on success, raise an exception and return -1 on error. */
688
- PyAPI_FUNC (int ) _PyUnicodeWriter_WriteSubstring(
689
- _PyUnicodeWriter *writer,
690
- PyObject *unicode , /* Unicode string */
686
+ PyAPI_FUNC (int )
687
+ _PyUnicodeWriter_WriteSubstring( _PyUnicodeWriter *writer,
688
+ PyObject *str , /* Unicode string */
691
689
Py_ssize_t start,
692
690
Py_ssize_t end
693
691
);
694
692
695
693
/* Append an ASCII-encoded byte string.
696
694
Return 0 on success, raise an exception and return -1 on error. */
697
- PyAPI_FUNC (int ) _PyUnicodeWriter_WriteASCIIString(
698
- _PyUnicodeWriter *writer,
695
+ PyAPI_FUNC (int )
696
+ _PyUnicodeWriter_WriteASCIIString( _PyUnicodeWriter *writer,
699
697
const char *str, /* ASCII-encoded byte string */
700
698
Py_ssize_t len /* number of bytes, or -1 if unknown */
701
699
);
702
700
703
701
/* Append a latin1-encoded byte string.
704
702
Return 0 on success, raise an exception and return -1 on error. */
705
- PyAPI_FUNC (int ) _PyUnicodeWriter_WriteLatin1String(
706
- _PyUnicodeWriter *writer,
703
+ PyAPI_FUNC (int )
704
+ _PyUnicodeWriter_WriteLatin1String( _PyUnicodeWriter *writer,
707
705
const char *str, /* latin1-encoded byte string */
708
706
Py_ssize_t len /* length in bytes */
709
707
);
710
708
711
709
/* Get the value of the writer as a Unicode string. Clear the
712
710
buffer of the writer. Raise an exception and return NULL
713
711
on error. */
714
- PyAPI_FUNC (PyObject *) _PyUnicodeWriter_Finish(
715
- _PyUnicodeWriter *writer
716
- );
712
+ PyAPI_FUNC (PyObject *)
713
+ _PyUnicodeWriter_Finish(_PyUnicodeWriter *writer);
717
714
718
715
/* Deallocate memory of a writer (clear its internal buffer). */
719
- PyAPI_FUNC (void ) _PyUnicodeWriter_Dealloc(
720
- _PyUnicodeWriter *writer
721
- );
716
+ PyAPI_FUNC (void )
717
+ _PyUnicodeWriter_Dealloc(_PyUnicodeWriter *writer);
722
718
723
719
724
720
/* Format the object based on the format_spec, as defined in PEP 3101
@@ -728,13 +724,12 @@ PyAPI_FUNC(int) _PyUnicode_FormatAdvancedWriter(
728
724
PyObject *obj,
729
725
PyObject *format_spec,
730
726
Py_ssize_t start,
731
- Py_ssize_t end
732
- );
727
+ Py_ssize_t end);
733
728
734
729
/* --- wchar_t support for platforms which support it --------------------- */
735
730
736
731
#ifdef HAVE_WCHAR_H
737
- PyAPI_FUNC (void *) _PyUnicode_AsKind(PyObject *unicode , unsigned int kind);
732
+ PyAPI_FUNC (void *) _PyUnicode_AsKind(PyObject *s , unsigned int kind);
738
733
#endif
739
734
740
735
/* --- Manage the default encoding ---------------------------------------- */
@@ -761,8 +756,7 @@ PyAPI_FUNC(void*) _PyUnicode_AsKind(PyObject *unicode, unsigned int kind);
761
756
762
757
PyAPI_FUNC (const char *) PyUnicode_AsUTF8AndSize(
763
758
PyObject *unicode,
764
- Py_ssize_t *size
765
- );
759
+ Py_ssize_t *size);
766
760
767
761
#define _PyUnicode_AsStringAndSize PyUnicode_AsUTF8AndSize
768
762
@@ -822,8 +816,7 @@ PyAPI_FUNC(PyObject*) _PyUnicode_EncodeUTF7(
822
816
823
817
PyAPI_FUNC (PyObject*) _PyUnicode_AsUTF8String(
824
818
PyObject *unicode,
825
- const char *errors
826
- );
819
+ const char *errors);
827
820
828
821
Py_DEPRECATED (3.3 ) PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF8(
829
822
const Py_UNICODE *data, /* Unicode char buffer */
@@ -841,7 +834,7 @@ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF32(
841
834
);
842
835
843
836
PyAPI_FUNC (PyObject*) _PyUnicode_EncodeUTF32(
844
- PyObject *unicode , /* Unicode object */
837
+ PyObject *object , /* Unicode object */
845
838
const char *errors, /* error handling */
846
839
int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */
847
840
);
@@ -875,7 +868,7 @@ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF16(
875
868
);
876
869
877
870
PyAPI_FUNC (PyObject*) _PyUnicode_EncodeUTF16(
878
- PyObject * unicode, /* Unicode object */
871
+ PyObject* unicode, /* Unicode object */
879
872
const char *errors, /* error handling */
880
873
int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */
881
874
);
@@ -885,7 +878,7 @@ PyAPI_FUNC(PyObject*) _PyUnicode_EncodeUTF16(
885
878
/* Helper for PyUnicode_DecodeUnicodeEscape that detects invalid escape
886
879
chars. */
887
880
PyAPI_FUNC (PyObject*) _PyUnicode_DecodeUnicodeEscape(
888
- const char *str, /* Unicode-Escape encoded string */
881
+ const char *string, /* Unicode-Escape encoded string */
889
882
Py_ssize_t length, /* size of string */
890
883
const char *errors, /* error handling */
891
884
const char **first_invalid_escape /* on return, points to first
@@ -959,7 +952,7 @@ PyAPI_FUNC(PyObject*) _PyUnicode_EncodeCharmap(
959
952
Py_DEPRECATED (3.3 ) PyAPI_FUNC(PyObject *) PyUnicode_TranslateCharmap(
960
953
const Py_UNICODE *data, /* Unicode char buffer */
961
954
Py_ssize_t length, /* Number of Py_UNICODE chars to encode */
962
- PyObject *mapping, /* Translate table */
955
+ PyObject *table, /* Translate table */
963
956
const char *errors /* error handling */
964
957
);
965
958
@@ -1012,7 +1005,7 @@ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeMBCS(
1012
1005
1013
1006
/* Py_DEPRECATED(3.3) */
1014
1007
PyAPI_FUNC (PyObject*) PyUnicode_TransformDecimalToASCII(
1015
- Py_UNICODE *str, /* Unicode buffer */
1008
+ Py_UNICODE *s, /* Unicode buffer */
1016
1009
Py_ssize_t length /* Number of Py_UNICODE chars to transform */
1017
1010
);
1018
1011
@@ -1047,8 +1040,8 @@ PyAPI_FUNC(int) _PyUnicode_EqualToASCIIId(
1047
1040
0 otherwise. The right argument must be ASCII-encoded string.
1048
1041
Any error occurs inside will be cleared before return. */
1049
1042
PyAPI_FUNC (int ) _PyUnicode_EqualToASCIIString(
1050
- PyObject *unicode ,
1051
- const char *str /* ASCII-encoded string */
1043
+ PyObject *left ,
1044
+ const char *right /* ASCII-encoded string */
1052
1045
);
1053
1046
1054
1047
/* Externally visible for str.strip(unicode) */
@@ -1070,8 +1063,7 @@ PyAPI_FUNC(Py_ssize_t) _PyUnicode_InsertThousandsGrouping(
1070
1063
Py_ssize_t min_width,
1071
1064
const char *grouping,
1072
1065
PyObject *thousands_sep,
1073
- Py_UCS4 *maxchar
1074
- );
1066
+ Py_UCS4 *maxchar);
1075
1067
1076
1068
/* === Characters Type APIs =============================================== */
1077
1069
@@ -1223,12 +1215,7 @@ Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strrchr(
1223
1215
Py_UNICODE c
1224
1216
);
1225
1217
1226
- PyAPI_FUNC (PyObject*) _PyUnicode_FormatLong(
1227
- PyObject *val,
1228
- int alt,
1229
- int prec,
1230
- int type
1231
- );
1218
+ PyAPI_FUNC (PyObject*) _PyUnicode_FormatLong(PyObject *, int , int , int );
1232
1219
1233
1220
/* Create a copy of a unicode string ending with a nul character. Return NULL
1234
1221
and raise a MemoryError exception on memory allocation failure, otherwise
@@ -1239,16 +1226,13 @@ Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE*) PyUnicode_AsUnicodeCopy(
1239
1226
);
1240
1227
1241
1228
/* Return an interned Unicode object for an Identifier; may fail if there is no memory.*/
1242
- PyAPI_FUNC (PyObject*) _PyUnicode_FromId(_Py_Identifier *id );
1229
+ PyAPI_FUNC (PyObject*) _PyUnicode_FromId(_Py_Identifier* );
1243
1230
/* Clear all static strings. */
1244
1231
PyAPI_FUNC (void ) _PyUnicode_ClearStaticStrings(void );
1245
1232
1246
1233
/* Fast equality check when the inputs are known to be exact unicode types
1247
1234
and where the hash values are equal (i.e. a very probable match) */
1248
- PyAPI_FUNC (int ) _PyUnicode_EQ(
1249
- PyObject *left,
1250
- PyObject *right
1251
- );
1235
+ PyAPI_FUNC (int ) _PyUnicode_EQ(PyObject *, PyObject *);
1252
1236
1253
1237
#ifdef __cplusplus
1254
1238
}
0 commit comments