[pycrypto] FW: python crypto with python 3.0 or 3.1

Christoph Tapler christoph.tapler at gmx.net
Mon Mar 1 14:37:42 CST 2010

Hi Grail!

I think in you need to return the pointer from the newly created module. 
Currently the return value seems to be a dangling pointer.
A "return m" at the end of the generic init function in block_template.c 
may help.

Btw, in Windows, there are still a few issues which prevent successful 
Should I generate a patch? If yes, could you probably give me a hint how 
to generate this patch?

Btw, there seems to be a test suite included (python setup.py test). 
However, at that stage it is not too much of
help, because the test suite itself needs to be adapted as well. In 
Python 2 the test suite works perfectly fine.


On 01.03.2010 01:02, Grail Dane wrote:
> Hello Christoph
> I have made more head way since that one (and made a lot more changes).
> I found that the module creation required a few more steps and I have 
> come up
> with two solutions (in attached patches):
> 1. First patch follows most of the online info I could find related 
> to PyModuleDef and the related PyTypeObject.
>    This required that all tp_getattr functions be removed and set to 0 
> (zero) in the PyTypeObject definition.
> 2. The second patch retained the already created tp_getattr functions.
> With either applied I am able to compile but when running a test 
> program with the following lines only:
> #!/usr/bin/env python
> from Crypto.Cipher import AES
> import base64
> import os
> When run I receive the following error:
> Traceback (most recent call last):
>   File "./cypher.py", line 3, in <module>
>     from Crypto.Cipher import AES
> SystemError: NULL result without error in PyObject_Call
> So apply patches (and make necessary changes for Windows) and we will 
> see if I can help further :)
> Cheers Grail
> ------------------------------------------------------------------------
> Get straight to the Point Find a great deal on your next car. 
> <http://clk.atdmt.com/NMN/go/157637060/direct/01/>
> ------------------------------------------------------------------------
> Browse profiles for free! View photos of singles in your area. 
> <http://clk.atdmt.com/NMN/go/150855801/direct/01/>
> _______________________________________________
> pycrypto mailing list
> pycrypto at lists.dlitz.net
> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.dlitz.net/pipermail/pycrypto/attachments/20100301/3605d7c4/attachment.htm 

More information about the pycrypto mailing list