Patch to get py-bcrypt module to build on Windows (using VS2008, Python 2.6).
Created attachment 1938 [details] Patch for building on Win32
What error does this fix? I'd prefer not to make extra copies of the password as each increases the chance that it will remain in memory.
(In reply to comment #2) > What error does this fix? I'd prefer not to make extra copies of the > password as each increases the chance that it will remain in memory. See attached build log. This was on Windows XP SP3, using MS Visual C++ 2008 Express Edition as the compiler. There may well be a better way of fixing this. Although I've been programming in Python for quite a while, I'm extremely new to C.
Created attachment 1941 [details] Build log (with errors) of current version (without patches).
(In reply to comment #2) > What error does this fix? I'd prefer not to make extra copies of the > password as each increases the chance that it will remain in memory. The patch only moves the declarations of the variables to the beginning of the block, so no extra copies. With it applied, py-bcrypt builds (and tests) successfully with both Python 2.6.6 and Python 2.7.1 (using MSVC 2008).
It looks like the MSVC compiler is being extra strict. I.e. enforcing C the standard (declare all variables at top of function) as opposed to the less strict c++ style rule (declare anywhere, prior to first use). I'd strongly recommend accepting this patch. The patch only moves the declaration of the variables, it does not affect the duplication operation in anyway.
Patch has been committed: http://code.google.com/p/py-bcrypt/source/detail?r=1cbdb1427b
close resolved bugs now that openssh-5.9 has been released