Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FIX: VS2008 compile error

password_copy and salt_copy has to be declared before they can be used
  • Loading branch information...
commit e9949fb2fe2c2e024a68bcc6cfea788cc6d62917 1 parent 328bc2c
@hleumas hleumas authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 bcrypt/bcrypt_python.c
View
6 bcrypt/bcrypt_python.c
@@ -69,13 +69,15 @@ bcrypt_hashpw(PyObject *self, PyObject *args, PyObject *kw_args)
static char *keywords[] = { "password", "salt", NULL };
char *password = NULL, *salt = NULL;
char *ret;
+ char *password_copy;
+ char *salt_copy;
if (!PyArg_ParseTupleAndKeywords(args, kw_args, "ss:hashpw", keywords,
&password, &salt))
return NULL;
- char *password_copy = strdup(password);
- char *salt_copy = strdup(salt);
+ password_copy = strdup(password);
+ salt_copy = strdup(salt);
Py_BEGIN_ALLOW_THREADS;
ret = pybc_bcrypt(password_copy, salt_copy);
Please sign in to comment.
Something went wrong with that request. Please try again.