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
49d3412f
Commit
49d3412f
authored
Jul 10, 2000
by
Fredrik Lundh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- get rid of a compiler warning on unix. (as reported
for #100836, but implemented in a different way)
parent
18104f48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
21 deletions
+13
-21
Modules/posixmodule.c
Modules/posixmodule.c
+13
-21
No files found.
Modules/posixmodule.c
View file @
49d3412f
...
@@ -512,25 +512,6 @@ posix_strint(PyObject *args, char *format, int (*func)(const char *, int))
...
@@ -512,25 +512,6 @@ posix_strint(PyObject *args, char *format, int (*func)(const char *, int))
return
Py_None
;
return
Py_None
;
}
}
static
PyObject
*
posix_strintint
(
PyObject
*
args
,
char
*
format
,
int
(
*
func
)(
const
char
*
,
int
,
int
))
{
char
*
path
;
int
i
,
i2
;
int
res
;
if
(
!
PyArg_ParseTuple
(
args
,
format
,
&
path
,
&
i
,
&
i2
))
return
NULL
;
Py_BEGIN_ALLOW_THREADS
res
=
(
*
func
)(
path
,
i
,
i2
);
Py_END_ALLOW_THREADS
if
(
res
<
0
)
return
posix_error_with_filename
(
path
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
/* pack a system stat C structure into the Python stat tuple
/* pack a system stat C structure into the Python stat tuple
(used by posix_stat() and posix_fstat()) */
(used by posix_stat() and posix_fstat()) */
...
@@ -768,7 +749,7 @@ posix_fdatasync(PyObject *self, PyObject *args)
...
@@ -768,7 +749,7 @@ posix_fdatasync(PyObject *self, PyObject *args)
#endif
/* HAVE_FDATASYNC */
#endif
/* HAVE_FDATASYNC */
#if
def
HAVE_CHOWN
#if HAVE_CHOWN
static
char
posix_chown__doc__
[]
=
static
char
posix_chown__doc__
[]
=
"chown(path, uid, gid) -> None
\n
\
"chown(path, uid, gid) -> None
\n
\
Change the owner and group id of path to the numeric uid and gid."
;
Change the owner and group id of path to the numeric uid and gid."
;
...
@@ -776,7 +757,18 @@ Change the owner and group id of path to the numeric uid and gid.";
...
@@ -776,7 +757,18 @@ Change the owner and group id of path to the numeric uid and gid.";
static
PyObject
*
static
PyObject
*
posix_chown
(
PyObject
*
self
,
PyObject
*
args
)
posix_chown
(
PyObject
*
self
,
PyObject
*
args
)
{
{
return
posix_strintint
(
args
,
"sii:chown"
,
chown
);
char
*
path
;
int
uid
,
gid
;
int
res
;
if
(
!
PyArg_ParseTuple
(
args
,
"sii:chown"
,
&
path
,
&
uid
,
&
gid
))
return
NULL
;
Py_BEGIN_ALLOW_THREADS
res
=
chown
(
path
,
(
uid_t
)
uid
,
(
gid_t
)
gid
);
Py_END_ALLOW_THREADS
if
(
res
<
0
)
return
posix_error_with_filename
(
path
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
}
#endif
/* HAVE_CHOWN */
#endif
/* HAVE_CHOWN */
...
...
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