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
dd3a6a55
Commit
dd3a6a55
authored
Jun 25, 2013
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix os.confstr(): the result type of the C function is size_t, not int
parent
93037498
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Modules/posixmodule.c
Modules/posixmodule.c
+2
-2
No files found.
Modules/posixmodule.c
View file @
dd3a6a55
...
@@ -9140,7 +9140,7 @@ posix_confstr(PyObject *self, PyObject *args)
...
@@ -9140,7 +9140,7 @@ posix_confstr(PyObject *self, PyObject *args)
PyObject
*
result
=
NULL
;
PyObject
*
result
=
NULL
;
int
name
;
int
name
;
char
buffer
[
255
];
char
buffer
[
255
];
in
t
len
;
size_
t
len
;
if
(
!
PyArg_ParseTuple
(
args
,
"O&:confstr"
,
conv_confstr_confname
,
&
name
))
if
(
!
PyArg_ParseTuple
(
args
,
"O&:confstr"
,
conv_confstr_confname
,
&
name
))
return
NULL
;
return
NULL
;
...
@@ -9157,7 +9157,7 @@ posix_confstr(PyObject *self, PyObject *args)
...
@@ -9157,7 +9157,7 @@ posix_confstr(PyObject *self, PyObject *args)
}
}
}
}
if
(
(
unsigned
int
)
len
>=
sizeof
(
buffer
))
{
if
(
len
>=
sizeof
(
buffer
))
{
char
*
buf
=
PyMem_Malloc
(
len
);
char
*
buf
=
PyMem_Malloc
(
len
);
if
(
buf
==
NULL
)
if
(
buf
==
NULL
)
return
PyErr_NoMemory
();
return
PyErr_NoMemory
();
...
...
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