Hi,
in libssh2.h we have:
typedef struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE
{
char* text;
unsigned int length;
} LIBSSH2_USERAUTH_KBDINT_RESPONSE;
I would like to change this to:
typedef struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE
{
char* text;
size_t length;
} LIBSSH2_USERAUTH_KBDINT_RESPONSE;
since usually the length is calculated with strlen() which returns
size_t ...
then we have a bunch of APIs which should also be corrected, f.e.:
LIBSSH2_API char *libssh2_userauth_list(LIBSSH2_SESSION *session,
const char *username,
unsigned int username_len);
LIBSSH2_API int libssh2_userauth_password_ex(LIBSSH2_SESSION *session,
const char *username,
unsigned int username_len,
const char *password,
unsigned int password_len,
LIBSSH2_PASSWD_CHANGEREQ_FUNC((*passwd_change_cb)));
and a couple more; though question is here: when can we change these
public APIs? As it currently is there's only a prob (compiler warning)
on 64-bit platforms; on 32-bit both uint and size_t are 32-bit ...
so we would only produce a new compiler warning for those who are on
64-bit + have casted strlen() results to uint ...
comments?
Gün.
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel