Skip to content

Commit 45e87b7

Browse files
author
Pan
committed
Added libssh2 version definitions
1 parent 096f16d commit 45e87b7

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

ssh2/ssh2.c

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh2/ssh2.pxd

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ cdef extern from "libssh2.h" nogil:
2222
enum:
2323
_LIBSSH2_SESSION_BLOCK_INBOUND "LIBSSH2_SESSION_BLOCK_INBOUND"
2424
_LIBSSH2_SESSION_BLOCK_OUTBOUND "LIBSSH2_SESSION_BLOCK_OUTBOUND"
25-
LIBSSH2_VERSION_MAJOR
26-
LIBSSH2_VERSION_MINOR
27-
LIBSSH2_VERSION_PATCH
25+
_LIBSSH2_VERSION_MAJOR "LIBSSH2_VERSION_MAJOR"
26+
_LIBSSH2_VERSION_MINOR "LIBSSH2_VERSION_MINOR"
27+
_LIBSSH2_VERSION_PATCH "LIBSSH2_VERSION_PATCH"
2828
ctypedef long long libssh2_int64_t
2929
ctypedef struct stat
3030
ctypedef struct libssh2_struct_stat
@@ -138,7 +138,6 @@ cdef extern from "libssh2.h" nogil:
138138
const char *privatekey,
139139
const char *passphrase,
140140
const char *hostname)
141-
# IF LIBSSH2_VERSION_MAJOR >= and LIBSSH2_VERSION_MINOR >= 5:
142141
int libssh2_userauth_publickey_frommemory(
143142
LIBSSH2_SESSION *session,
144143
const char *username,

ssh2/ssh2.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ LIBSSH2CHANNEL_EAGAIN = error_codes._LIBSSH2CHANNEL_EAGAIN
3030
LIBSSH2_ERROR_EAGAIN = error_codes._LIBSSH2_ERROR_EAGAIN
3131
LIBSSH2_ERROR_AUTHENTICATION_FAILED = error_codes._LIBSSH2_ERROR_AUTHENTICATION_FAILED
3232
LIBSSH2_ERROR_SOCKET_RECV = error_codes._LIBSSH2_ERROR_SOCKET_RECV
33-
LIBSSH2_SESSION_BLOCK_INBOUND = _LIBSSH2_SESSION_BLOCK_INBOUND
34-
LIBSSH2_SESSION_BLOCK_OUTBOUND = _LIBSSH2_SESSION_BLOCK_OUTBOUND
33+
LIBSSH2_SESSION_BLOCK_INBOUND = ssh2._LIBSSH2_SESSION_BLOCK_INBOUND
34+
LIBSSH2_SESSION_BLOCK_OUTBOUND = ssh2._LIBSSH2_SESSION_BLOCK_OUTBOUND
3535

3636

3737
cdef class AgentError(Exception):

0 commit comments

Comments
 (0)