Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
30b5c5d0
Commit
30b5c5d0
authored
Dec 19, 2005
by
Neal Norwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix SF bug #1072182, problems with signed characters.
Most of these can be backported.
parent
5d0ad50f
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
16 additions
and
14 deletions
+16
-14
Modules/_hotshot.c
Modules/_hotshot.c
+1
-1
Modules/_tkinter.c
Modules/_tkinter.c
+1
-1
Modules/posixmodule.c
Modules/posixmodule.c
+1
-1
Modules/pyexpat.c
Modules/pyexpat.c
+1
-1
Modules/socketmodule.c
Modules/socketmodule.c
+2
-1
Modules/stropmodule.c
Modules/stropmodule.c
+1
-1
Parser/grammar.c
Parser/grammar.c
+2
-1
Parser/tokenizer.c
Parser/tokenizer.c
+1
-1
Python/ast.c
Python/ast.c
+1
-1
Python/dynload_aix.c
Python/dynload_aix.c
+1
-1
Python/getargs.c
Python/getargs.c
+4
-4
No files found.
Modules/_hotshot.c
View file @
30b5c5d0
...
...
@@ -1396,7 +1396,7 @@ get_version_string(void)
char
*
buffer
;
int
i
=
0
;
while
(
*
rev
&&
!
isdigit
(
(
int
)
*
rev
))
while
(
*
rev
&&
!
isdigit
(
Py_CHARMASK
(
*
rev
)
))
++
rev
;
while
(
rev
[
i
]
!=
' '
&&
rev
[
i
]
!=
'\0'
)
++
i
;
...
...
Modules/_tkinter.c
View file @
30b5c5d0
...
...
@@ -636,7 +636,7 @@ Tkapp_New(char *screenName, char *baseName, char *className,
}
strcpy
(
argv0
,
className
);
if
(
isupper
(
(
int
)(
argv0
[
0
]
)))
if
(
isupper
(
Py_CHARMASK
((
argv0
[
0
])
)))
argv0
[
0
]
=
tolower
(
argv0
[
0
]);
Tcl_SetVar
(
v
->
interp
,
"argv0"
,
argv0
,
TCL_GLOBAL_ONLY
);
ckfree
(
argv0
);
...
...
Modules/posixmodule.c
View file @
30b5c5d0
...
...
@@ -463,7 +463,7 @@ os2_formatmsg(char *msgbuf, int msglen, char *reason)
if
(
strlen
(
msgbuf
)
>
0
)
{
/* If Non-Empty Msg, Trim CRLF */
char
*
lastc
=
&
msgbuf
[
strlen
(
msgbuf
)
-
1
];
while
(
lastc
>
msgbuf
&&
isspace
(
*
lastc
))
while
(
lastc
>
msgbuf
&&
isspace
(
Py_CHARMASK
(
*
lastc
)
))
*
lastc
--
=
'\0'
;
/* Trim Trailing Whitespace (CRLF) */
}
...
...
Modules/pyexpat.c
View file @
30b5c5d0
...
...
@@ -1803,7 +1803,7 @@ get_version_string(void)
char
*
rev
=
rcsid
;
int
i
=
0
;
while
(
!
isdigit
(
(
int
)
*
rev
))
while
(
!
isdigit
(
Py_CHARMASK
(
*
rev
)
))
++
rev
;
while
(
rev
[
i
]
!=
' '
&&
rev
[
i
]
!=
'\0'
)
++
i
;
...
...
Modules/socketmodule.c
View file @
30b5c5d0
...
...
@@ -506,7 +506,8 @@ set_error(void)
if
(
strlen
(
outbuf
)
>
0
)
{
/* If non-empty msg, trim CRLF */
char
*
lastc
=
&
outbuf
[
strlen
(
outbuf
)
-
1
];
while
(
lastc
>
outbuf
&&
isspace
(
*
lastc
))
{
while
(
lastc
>
outbuf
&&
isspace
(
Py_CHARMASK
(
*
lastc
)))
{
/* Trim trailing whitespace (CRLF) */
*
lastc
--
=
'\0'
;
}
...
...
Modules/stropmodule.c
View file @
30b5c5d0
...
...
@@ -757,7 +757,7 @@ strop_atoi(PyObject *self, PyObject *args)
x
=
(
long
)
PyOS_strtoul
(
s
,
&
end
,
base
);
else
x
=
PyOS_strtol
(
s
,
&
end
,
base
);
if
(
end
==
s
||
!
isalnum
(
(
int
)
end
[
-
1
]
))
if
(
end
==
s
||
!
isalnum
(
Py_CHARMASK
(
end
[
-
1
])
))
goto
bad
;
while
(
*
end
&&
isspace
(
Py_CHARMASK
(
*
end
)))
end
++
;
...
...
Parser/grammar.c
View file @
30b5c5d0
...
...
@@ -180,7 +180,8 @@ translabel(grammar *g, label *lb)
}
if
(
lb
->
lb_type
==
STRING
)
{
if
(
isalpha
((
int
)(
lb
->
lb_str
[
1
]))
||
lb
->
lb_str
[
1
]
==
'_'
)
{
if
(
isalpha
(
Py_CHARMASK
(
lb
->
lb_str
[
1
]))
||
lb
->
lb_str
[
1
]
==
'_'
)
{
char
*
p
;
char
*
src
;
char
*
dest
;
...
...
Parser/tokenizer.c
View file @
30b5c5d0
...
...
@@ -229,7 +229,7 @@ get_coding_spec(const char *s, int size)
}
while
(
t
[
0
]
==
'\x20'
||
t
[
0
]
==
'\t'
);
begin
=
t
;
while
(
isalnum
(
(
int
)
t
[
0
]
)
||
while
(
isalnum
(
Py_CHARMASK
(
t
[
0
])
)
||
t
[
0
]
==
'-'
||
t
[
0
]
==
'_'
||
t
[
0
]
==
'.'
)
t
++
;
...
...
Python/ast.c
View file @
30b5c5d0
...
...
@@ -2879,7 +2879,7 @@ static PyObject *
parsestr
(
const
char
*
s
,
const
char
*
encoding
)
{
size_t
len
;
int
quote
=
*
s
;
int
quote
=
Py_CHARMASK
(
*
s
)
;
int
rawmode
=
0
;
int
need_encoding
;
int
unicode
=
0
;
...
...
Python/dynload_aix.c
View file @
30b5c5d0
...
...
@@ -144,7 +144,7 @@ aix_loaderror(const char *pathname)
if
(
nerr
==
load_errtab
[
j
].
errNo
&&
load_errtab
[
j
].
errstr
)
ERRBUF_APPEND
(
load_errtab
[
j
].
errstr
);
}
while
(
isdigit
(
*
message
[
i
]
))
message
[
i
]
++
;
while
(
isdigit
(
Py_CHARMASK
(
*
message
[
i
])
))
message
[
i
]
++
;
ERRBUF_APPEND
(
message
[
i
]);
ERRBUF_APPEND
(
"
\n
"
);
}
...
...
Python/getargs.c
View file @
30b5c5d0
...
...
@@ -166,7 +166,7 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int compat)
if
(
level
==
0
)
{
if
(
c
==
'O'
)
max
++
;
else
if
(
isalpha
(
c
))
{
else
if
(
isalpha
(
Py_CHARMASK
(
c
)
))
{
if
(
c
!=
'e'
)
/* skip encoded */
max
++
;
}
else
if
(
c
==
'|'
)
...
...
@@ -255,7 +255,7 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int compat)
}
}
if
(
*
format
!=
'\0'
&&
!
isalpha
(
(
int
)(
*
format
))
&&
if
(
*
format
!=
'\0'
&&
!
isalpha
(
Py_CHARMASK
((
*
format
)
))
&&
*
format
!=
'('
&&
*
format
!=
'|'
&&
*
format
!=
':'
&&
*
format
!=
';'
)
{
PyErr_Format
(
PyExc_SystemError
,
...
...
@@ -347,7 +347,7 @@ converttuple(PyObject *arg, const char **p_format, va_list *p_va, int *levels,
}
else
if
(
c
==
':'
||
c
==
';'
||
c
==
'\0'
)
break
;
else
if
(
level
==
0
&&
isalpha
(
c
))
else
if
(
level
==
0
&&
isalpha
(
Py_CHARMASK
(
c
)
))
n
++
;
}
...
...
@@ -1223,7 +1223,7 @@ vgetargskeywords(PyObject *args, PyObject *keywords, const char *format,
min
=
-
1
;
max
=
0
;
while
((
i
=
*
format
++
)
!=
'\0'
)
{
if
(
isalpha
(
i
)
&&
i
!=
'e'
)
{
if
(
isalpha
(
Py_CHARMASK
(
i
)
)
&&
i
!=
'e'
)
{
max
++
;
if
(
*
p
==
NULL
)
{
PyErr_SetString
(
PyExc_RuntimeError
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment