[Python-Dev] [Python-checkins] python/dist/src/Modules _hashopenssl.c, NONE, 2.1 sha256module.c, NONE, 2.1 sha512module.c, NONE, 2.1 md5module.c, 2.35, 2.36 shamodule.c, 2.22, 2.23

Michael Hudson mwh at python.net
Tue Aug 23 17:44:56 CEST 2005

"Raymond Hettinger" <raymond.hettinger at verizon.net> writes:

> [Raymond Hettinger] 
>> > This patch should be reverted or fixed so that the Py2.5 build works
>> > again.
>> >
>> > It contains a disasterous search and replace error that prevents it
> from
>> > compiling.  Hence, it couldn't have passed the test suite before
> being
>> > checked in.
> [Michael Hudson]
>> It works for me, on OS X.  Passes the test suite, even.  I presume
>> you're on Windows of some kind?
> Here's an excerpt from the check-in note for sha512module.c:
> RND(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],0,0x428a2f98d728ae22ULL);
> RND(S[7],S[0],S[1],S[2],S[3],S[4],S[5],S[6],1,0x7137449123ef65cdULL);
> RND(S[6],S[7],S[0],S[1],S[2],S[3],S[4],S[5],2,0xb5c0fbcfec4d3b2fULL);
> RND(S[5],S[6],S[7],S[0],S[1],S[2],S[3],S[4],3,0xe9b5dba58189dbbcULL);
> RND(S[4],S[5],S[6],S[7],S[0],S[1],S[2],S[3],4,0x3956c25bf348b538ULL);
> Perhaps OS X has some sort of Steve Jobs special constant suffix "ULL"
> that Mr. Gates and the ANSI C folks have yet to accept ;-)  

It's an C99 unsigned long long literal, AFAICT (p70 of the PDF I found
lying around somewhere...), so I think it's just Bill who's behind.
However, Python doesn't require C99, so it's pretty dodgy code by our

Hmm.  You have PY_LONG_LONG #define-d, right?  Does VC++ 6 (that's
what you use, right?) support any kind of long long literal?

> If it works for you, then it probably means that sha512module.c was left
> out of the build.


[mwh at 82-33-185-193 build-debug]$ ./python.exe 
Python 2.5a0 (#1, Aug 23 2005, 13:24:32) 
[GCC 3.3 20030304 (Apple Computer, Inc. build 1671)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import _sha512
[44297 refs]

> Maybe sha512module.c wasn't supposed to be checked in?

I think if you have a sufficiently modern openssl it's unnecessary.

> The project files are just text files and can be updated simply and
> directly.  But yes, that is no big deal and I'll just do it for him once
> the code gets to a compilable state.
> Aside from the project files, there is still config.c and whatnot.

Does anything need to be done there?  Oh, PC/config.c, right?

> We should put together a checklist of all the things that need to be
> updated when a new module is added.

Sounds like it! :)


  This makes it possible to pass complex object hierarchies to
  a C coder who thinks computer science has made no worthwhile
  advancements since the invention of the pointer.
                                       -- Gordon McMillan, 30 Jul 1998

More information about the Python-Dev mailing list