diff options
author | spreis <spreis@yandex-team.ru> | 2022-02-10 16:47:13 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:13 +0300 |
commit | bcd1126cbd5d445cd0665d295198aa39c6ab8cbe (patch) | |
tree | d41d29a041d5733ef148335290dbb817b197d4cd /library/python/fs/clonefile.pyx | |
parent | 986cb5d624f352524bfa0c42c9a7695235cdaa41 (diff) | |
download | ydb-bcd1126cbd5d445cd0665d295198aa39c6ab8cbe.tar.gz |
Restoring authorship annotation for <spreis@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/python/fs/clonefile.pyx')
-rw-r--r-- | library/python/fs/clonefile.pyx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/library/python/fs/clonefile.pyx b/library/python/fs/clonefile.pyx index 830bb894f2e..c7e834a4d8a 100644 --- a/library/python/fs/clonefile.pyx +++ b/library/python/fs/clonefile.pyx @@ -1,18 +1,18 @@ import six -cdef extern from "sys/clonefile.h" nogil: - int clonefile(const char * src, const char * dst, int flags) - -cdef extern from "Python.h": - ctypedef struct PyObject - cdef PyObject *PyExc_OSError - PyObject *PyErr_SetFromErrno(PyObject *) - -cdef int _macos_clone_file(const char* src, const char* dst) except? 0: - if clonefile(src, dst, 0) == -1: - PyErr_SetFromErrno(PyExc_OSError) - return 0 - return 1 - -def macos_clone_file(src, dst): +cdef extern from "sys/clonefile.h" nogil: + int clonefile(const char * src, const char * dst, int flags) + +cdef extern from "Python.h": + ctypedef struct PyObject + cdef PyObject *PyExc_OSError + PyObject *PyErr_SetFromErrno(PyObject *) + +cdef int _macos_clone_file(const char* src, const char* dst) except? 0: + if clonefile(src, dst, 0) == -1: + PyErr_SetFromErrno(PyExc_OSError) + return 0 + return 1 + +def macos_clone_file(src, dst): return _macos_clone_file(six.ensure_binary(src), six.ensure_binary(dst)) != 0 |