]> Pileus Git - ~andy/sunrise/blob - dev-python/ncrypt/files/cinit.patch
dev-python/ pynzb: moved to gx86 by me
[~andy/sunrise] / dev-python / ncrypt / files / cinit.patch
1 diff -Naur ncrypt-0.6.4.orig/ncrypt_bignum.pyx ncrypt-0.6.4/ncrypt_bignum.pyx
2 --- ncrypt-0.6.4.orig/ncrypt_bignum.pyx 2006-10-09 09:36:51.000000000 +0200
3 +++ ncrypt-0.6.4/ncrypt_bignum.pyx      2010-07-29 16:10:06.000632053 +0200
4 @@ -29,7 +29,7 @@
5  cdef class BigNum :
6      cdef BIGNUM *bn
7  
8 -    def __new__( self, x=None ) :
9 +    def __cinit__( self, x=None ) :
10          self.bn = BN_new()
11  
12      cdef _free( self ) :
13 diff -Naur ncrypt-0.6.4.orig/ncrypt_cipher.pyx ncrypt-0.6.4/ncrypt_cipher.pyx
14 --- ncrypt-0.6.4.orig/ncrypt_cipher.pyx 2006-10-09 09:36:51.000000000 +0200
15 +++ ncrypt-0.6.4/ncrypt_cipher.pyx      2010-07-29 16:09:08.733881668 +0200
16 @@ -43,7 +43,7 @@
17      cdef EVP_CIPHER *c
18      cdef object cipherAlgo, cipherMode
19  
20 -    def __new__( self, cipherAlgo, cipherMode ) :
21 +    def __cinit__( self, cipherAlgo, cipherMode ) :
22          self.c = NULL
23  
24      def __dealloc__( self ) :
25 @@ -84,7 +84,7 @@
26      cdef EVP_CIPHER_CTX *ctx
27      cdef int cipherFinalized
28  
29 -    def __new__( self, cipherType, key, iv, encryptFlag ) :
30 +    def __cinit__( self, cipherType, key, iv, encryptFlag ) :
31          self.outBuffer = NULL
32          self.outBufferSize = 0
33          self.ctx = AllocCipherContext()
34 diff -Naur ncrypt-0.6.4.orig/ncrypt_dh.pyx ncrypt-0.6.4/ncrypt_dh.pyx
35 --- ncrypt-0.6.4.orig/ncrypt_dh.pyx     2006-10-09 09:36:51.000000000 +0200
36 +++ ncrypt-0.6.4/ncrypt_dh.pyx  2010-07-29 16:09:34.944631842 +0200
37 @@ -50,7 +50,7 @@
38  class DHError( ncrypt_err.BaseLibraryError ) : pass
39  
40  cdef class DH :
41 -    def __new__( self ) :
42 +    def __cinit__( self ) :
43          self.dh = DH_new()
44  
45      def __dealloc__( self ) :
46 diff -Naur ncrypt-0.6.4.orig/ncrypt_digest.pyx ncrypt-0.6.4/ncrypt_digest.pyx
47 --- ncrypt-0.6.4.orig/ncrypt_digest.pyx 2006-10-09 09:36:51.000000000 +0200
48 +++ ncrypt-0.6.4/ncrypt_digest.pyx      2010-07-29 16:08:22.175632123 +0200
49 @@ -32,7 +32,7 @@
50  ALGORITHMS = ('MD5','SHA1','SHA224','SHA256','SHA384','SHA512')
51  
52  cdef class DigestType :
53 -    def __new__( self, evpMd ) :
54 +    def __cinit__( self, evpMd ) :
55          self.m = NULL
56  
57      def __dealloc__( self ) :
58 @@ -60,7 +60,7 @@
59      cdef int digestFinalized
60      cdef readonly object digestType
61  
62 -    def __new__( self, digestType ) :
63 +    def __cinit__( self, digestType ) :
64          self.ctx = NULL
65          self.digestFinalized = 0
66  
67 diff -Naur ncrypt-0.6.4.orig/ncrypt_rsa.pyx ncrypt-0.6.4/ncrypt_rsa.pyx
68 --- ncrypt-0.6.4.orig/ncrypt_rsa.pyx    2006-10-09 09:36:52.000000000 +0200
69 +++ ncrypt-0.6.4/ncrypt_rsa.pyx 2010-07-29 16:09:23.573880691 +0200
70 @@ -117,7 +117,7 @@
71  PADDING_PKCS1_OAEP = 1
72  
73  cdef class RSAKey :
74 -    def __new__( self ) :
75 +    def __cinit__( self ) :
76          self.rsa = RSA_new()
77  
78      def __dealloc__( self ) :
79 diff -Naur ncrypt-0.6.4.orig/ncrypt_ssl.pyx ncrypt-0.6.4/ncrypt_ssl.pyx
80 --- ncrypt-0.6.4.orig/ncrypt_ssl.pyx    2006-10-09 09:36:52.000000000 +0200
81 +++ ncrypt-0.6.4/ncrypt_ssl.pyx 2010-07-29 16:09:54.873632053 +0200
82 @@ -172,7 +172,7 @@
83  cdef class SSLContext :
84      cdef SSL_CTX *c
85  
86 -    def __new__( self, sslMethod, sslMethodType=-1 ) :
87 +    def __cinit__( self, sslMethod, sslMethodType=-1 ) :
88          self.c = NULL
89  
90      def __dealloc__( self ) :
91 @@ -245,7 +245,7 @@
92      cdef object sslContext
93      cdef readonly object sock
94  
95 -    def __new__( self, sslContext, sock ) :
96 +    def __cinit__( self, sslContext, sock ) :
97          self.s = NULL
98  
99      def __dealloc__( self ) :
100 diff -Naur ncrypt-0.6.4.orig/ncrypt_x509.pyx ncrypt-0.6.4/ncrypt_x509.pyx
101 --- ncrypt-0.6.4.orig/ncrypt_x509.pyx   2006-10-09 09:36:52.000000000 +0200
102 +++ ncrypt-0.6.4/ncrypt_x509.pyx        2010-07-29 16:08:47.989640504 +0200
103 @@ -128,7 +128,7 @@
104  cdef class X509Name :
105      cdef X509_NAME *xn
106  
107 -    def __new__( self ) :
108 +    def __cinit__( self ) :
109          self.xn = NULL
110  
111      def __dealloc__( self ) :
112 @@ -203,7 +203,7 @@
113          raise X509Error, 'unable to find field name: %s' % fieldName
114  
115  cdef class X509Certificate :
116 -    def __new__( self, data=None ) :
117 +    def __cinit__( self, data=None ) :
118          self.x = NULL
119  
120      def __dealloc__( self ) :