chiark / gitweb /
*.pyx: Replace __new__ with __cinit__ like the program says.
[mLib-python] / url.pyx
diff --git a/url.pyx b/url.pyx
index 20c51ce0efdf62ad0184e6fa60f983bf9091c54a..613630d21170e113206f4140ff6e8158aff6750b 100644 (file)
--- a/url.pyx
+++ b/url.pyx
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.
-# 
+#
 # mLib/Python is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with mLib/Python; if not, write to the Free Software Foundation,
 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -29,7 +29,7 @@ cdef class URLEncode:
   cdef url_ectx ctx
   cdef dstr d
 
-  def __new__(me, *hunoz, **hukairz):
+  def __cinit__(me, *hunoz, **hukairz):
     url_initenc(&me.ctx)
     DCREATE(&me.d)
   def __init__(me, strictp = False, laxp = False, semip = False):
@@ -71,7 +71,7 @@ cdef class URLEncode:
       if val:
         me.ctx.f = me.ctx.f | URLF_SEMI
       else:
-        me.ctx.f = me.ctx.f & ~URLF_SEMI  
+        me.ctx.f = me.ctx.f & ~URLF_SEMI
   def __del__(me):
     dstr_destroy(&me.d)
 
@@ -79,7 +79,7 @@ cdef class URLDecode:
   cdef url_dctx ctx
   cdef char *p
 
-  def __new__(me, *hunoz, **hukairz):
+  def __cinit__(me, *hunoz, **hukairz):
     me.p = xstrdup('')
     url_initdec(&me.ctx, me.p)
   def __init__(me, char *string, semip = False):