Skip to content

Commit 72b0685

Browse files
author
Fredrik Lundh
committed
removed "register const" from scalar arguments to the unicode
predicates
1 parent bc7c896 commit 72b0685

2 files changed

Lines changed: 35 additions & 35 deletions

File tree

Include/unicodeobject.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -864,63 +864,63 @@ extern DL_IMPORT(int) PyUnicode_Contains(
864864
*/
865865

866866
extern DL_IMPORT(int) _PyUnicode_IsLowercase(
867-
register const Py_UNICODE ch /* Unicode character */
867+
Py_UNICODE ch /* Unicode character */
868868
);
869869

870870
extern DL_IMPORT(int) _PyUnicode_IsUppercase(
871-
register const Py_UNICODE ch /* Unicode character */
871+
Py_UNICODE ch /* Unicode character */
872872
);
873873

874874
extern DL_IMPORT(int) _PyUnicode_IsTitlecase(
875-
register const Py_UNICODE ch /* Unicode character */
875+
Py_UNICODE ch /* Unicode character */
876876
);
877877

878878
extern DL_IMPORT(int) _PyUnicode_IsWhitespace(
879-
register const Py_UNICODE ch /* Unicode character */
879+
Py_UNICODE ch /* Unicode character */
880880
);
881881

882882
extern DL_IMPORT(int) _PyUnicode_IsLinebreak(
883-
register const Py_UNICODE ch /* Unicode character */
883+
Py_UNICODE ch /* Unicode character */
884884
);
885885

886886
extern DL_IMPORT(Py_UNICODE) _PyUnicode_ToLowercase(
887-
register const Py_UNICODE ch /* Unicode character */
887+
Py_UNICODE ch /* Unicode character */
888888
);
889889

890890
extern DL_IMPORT(Py_UNICODE) _PyUnicode_ToUppercase(
891-
register const Py_UNICODE ch /* Unicode character */
891+
Py_UNICODE ch /* Unicode character */
892892
);
893893

894894
extern DL_IMPORT(Py_UNICODE) _PyUnicode_ToTitlecase(
895-
register const Py_UNICODE ch /* Unicode character */
895+
Py_UNICODE ch /* Unicode character */
896896
);
897897

898898
extern DL_IMPORT(int) _PyUnicode_ToDecimalDigit(
899-
register const Py_UNICODE ch /* Unicode character */
899+
Py_UNICODE ch /* Unicode character */
900900
);
901901

902902
extern DL_IMPORT(int) _PyUnicode_ToDigit(
903-
register const Py_UNICODE ch /* Unicode character */
903+
Py_UNICODE ch /* Unicode character */
904904
);
905905

906906
extern DL_IMPORT(double) _PyUnicode_ToNumeric(
907-
register const Py_UNICODE ch /* Unicode character */
907+
Py_UNICODE ch /* Unicode character */
908908
);
909909

910910
extern DL_IMPORT(int) _PyUnicode_IsDecimalDigit(
911-
register const Py_UNICODE ch /* Unicode character */
911+
Py_UNICODE ch /* Unicode character */
912912
);
913913

914914
extern DL_IMPORT(int) _PyUnicode_IsDigit(
915-
register const Py_UNICODE ch /* Unicode character */
915+
Py_UNICODE ch /* Unicode character */
916916
);
917917

918918
extern DL_IMPORT(int) _PyUnicode_IsNumeric(
919-
register const Py_UNICODE ch /* Unicode character */
919+
Py_UNICODE ch /* Unicode character */
920920
);
921921

922922
extern DL_IMPORT(int) _PyUnicode_IsAlpha(
923-
register const Py_UNICODE ch /* Unicode character */
923+
Py_UNICODE ch /* Unicode character */
924924
);
925925

926926
#ifdef __cplusplus

Objects/unicodectype.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ gettyperecord(Py_UNICODE code)
4949
/* Returns 1 for Unicode characters having the category 'Zl' or type
5050
'B', 0 otherwise. */
5151

52-
int _PyUnicode_IsLinebreak(register const Py_UNICODE ch)
52+
int _PyUnicode_IsLinebreak(Py_UNICODE ch)
5353
{
5454
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
5555

@@ -79,7 +79,7 @@ Py_UNICODE _PyUnicode_ToTitlecase(register Py_UNICODE ch)
7979
/* Returns 1 for Unicode characters having the category 'Lt', 0
8080
otherwise. */
8181

82-
int _PyUnicode_IsTitlecase(register const Py_UNICODE ch)
82+
int _PyUnicode_IsTitlecase(Py_UNICODE ch)
8383
{
8484
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
8585

@@ -89,14 +89,14 @@ int _PyUnicode_IsTitlecase(register const Py_UNICODE ch)
8989
/* Returns the integer decimal (0-9) for Unicode characters having
9090
this property, -1 otherwise. */
9191

92-
int _PyUnicode_ToDecimalDigit(register const Py_UNICODE ch)
92+
int _PyUnicode_ToDecimalDigit(Py_UNICODE ch)
9393
{
9494
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
9595

9696
return (ctype->flags & DECIMAL_MASK) ? ctype->decimal : -1;
9797
}
9898

99-
int _PyUnicode_IsDecimalDigit(register const Py_UNICODE ch)
99+
int _PyUnicode_IsDecimalDigit(Py_UNICODE ch)
100100
{
101101
if (_PyUnicode_ToDecimalDigit(ch) < 0)
102102
return 0;
@@ -106,14 +106,14 @@ int _PyUnicode_IsDecimalDigit(register const Py_UNICODE ch)
106106
/* Returns the integer digit (0-9) for Unicode characters having
107107
this property, -1 otherwise. */
108108

109-
int _PyUnicode_ToDigit(register const Py_UNICODE ch)
109+
int _PyUnicode_ToDigit(Py_UNICODE ch)
110110
{
111111
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
112112

113113
return (ctype->flags & DIGIT_MASK) ? ctype->digit : -1;
114114
}
115115

116-
int _PyUnicode_IsDigit(register const Py_UNICODE ch)
116+
int _PyUnicode_IsDigit(Py_UNICODE ch)
117117
{
118118
if (_PyUnicode_ToDigit(ch) < 0)
119119
return 0;
@@ -125,7 +125,7 @@ int _PyUnicode_IsDigit(register const Py_UNICODE ch)
125125

126126
/* TODO: replace with unicodetype_db.h table */
127127

128-
double _PyUnicode_ToNumeric(register const Py_UNICODE ch)
128+
double _PyUnicode_ToNumeric(Py_UNICODE ch)
129129
{
130130
switch (ch) {
131131
case 0x3007:
@@ -313,7 +313,7 @@ double _PyUnicode_ToNumeric(register const Py_UNICODE ch)
313313
}
314314
}
315315

316-
int _PyUnicode_IsNumeric(register const Py_UNICODE ch)
316+
int _PyUnicode_IsNumeric(Py_UNICODE ch)
317317
{
318318
if (_PyUnicode_ToNumeric(ch) < 0.0)
319319
return 0;
@@ -325,7 +325,7 @@ int _PyUnicode_IsNumeric(register const Py_UNICODE ch)
325325
/* Returns 1 for Unicode characters having the bidirectional type
326326
'WS', 'B' or 'S' or the category 'Zs', 0 otherwise. */
327327

328-
int _PyUnicode_IsWhitespace(register const Py_UNICODE ch)
328+
int _PyUnicode_IsWhitespace(Py_UNICODE ch)
329329
{
330330
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
331331

@@ -335,7 +335,7 @@ int _PyUnicode_IsWhitespace(register const Py_UNICODE ch)
335335
/* Returns 1 for Unicode characters having the category 'Ll', 0
336336
otherwise. */
337337

338-
int _PyUnicode_IsLowercase(register const Py_UNICODE ch)
338+
int _PyUnicode_IsLowercase(Py_UNICODE ch)
339339
{
340340
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
341341

@@ -345,7 +345,7 @@ int _PyUnicode_IsLowercase(register const Py_UNICODE ch)
345345
/* Returns 1 for Unicode characters having the category 'Lu', 0
346346
otherwise. */
347347

348-
int _PyUnicode_IsUppercase(register const Py_UNICODE ch)
348+
int _PyUnicode_IsUppercase(Py_UNICODE ch)
349349
{
350350
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
351351

@@ -355,7 +355,7 @@ int _PyUnicode_IsUppercase(register const Py_UNICODE ch)
355355
/* Returns the uppercase Unicode characters corresponding to ch or just
356356
ch if no uppercase mapping is known. */
357357

358-
Py_UNICODE _PyUnicode_ToUppercase(register Py_UNICODE ch)
358+
Py_UNICODE _PyUnicode_ToUppercase(Py_UNICODE ch)
359359
{
360360
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
361361

@@ -371,7 +371,7 @@ Py_UNICODE _PyUnicode_ToUppercase(register Py_UNICODE ch)
371371
/* Returns the lowercase Unicode characters corresponding to ch or just
372372
ch if no lowercase mapping is known. */
373373

374-
Py_UNICODE _PyUnicode_ToLowercase(register Py_UNICODE ch)
374+
Py_UNICODE _PyUnicode_ToLowercase(Py_UNICODE ch)
375375
{
376376
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
377377

@@ -387,7 +387,7 @@ Py_UNICODE _PyUnicode_ToLowercase(register Py_UNICODE ch)
387387
/* Returns 1 for Unicode characters having the category 'Ll', 'Lu', 'Lt',
388388
'Lo' or 'Lm', 0 otherwise. */
389389

390-
int _PyUnicode_IsAlpha(register const Py_UNICODE ch)
390+
int _PyUnicode_IsAlpha(Py_UNICODE ch)
391391
{
392392
const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
393393

@@ -399,32 +399,32 @@ int _PyUnicode_IsAlpha(register const Py_UNICODE ch)
399399
/* Export the interfaces using the wchar_t type for portability
400400
reasons: */
401401

402-
int _PyUnicode_IsWhitespace(register const Py_UNICODE ch)
402+
int _PyUnicode_IsWhitespace(Py_UNICODE ch)
403403
{
404404
return iswspace(ch);
405405
}
406406

407-
int _PyUnicode_IsLowercase(register const Py_UNICODE ch)
407+
int _PyUnicode_IsLowercase(Py_UNICODE ch)
408408
{
409409
return iswlower(ch);
410410
}
411411

412-
int _PyUnicode_IsUppercase(register const Py_UNICODE ch)
412+
int _PyUnicode_IsUppercase(Py_UNICODE ch)
413413
{
414414
return iswupper(ch);
415415
}
416416

417-
Py_UNICODE _PyUnicode_ToLowercase(register const Py_UNICODE ch)
417+
Py_UNICODE _PyUnicode_ToLowercase(Py_UNICODE ch)
418418
{
419419
return towlower(ch);
420420
}
421421

422-
Py_UNICODE _PyUnicode_ToUppercase(register const Py_UNICODE ch)
422+
Py_UNICODE _PyUnicode_ToUppercase(Py_UNICODE ch)
423423
{
424424
return towupper(ch);
425425
}
426426

427-
int _PyUnicode_IsAlpha(register const Py_UNICODE ch)
427+
int _PyUnicode_IsAlpha(Py_UNICODE ch)
428428
{
429429
return iswalpha(ch);
430430
}

0 commit comments

Comments
 (0)