96c9519
diff -up python3-python-smbpasswd-1.0.1-12.fc13/README.txt.org python3-python-smbpasswd-1.0.1-12.fc13/README.txt
96c9519
--- python3-python-smbpasswd-1.0.1-12.fc13/README.txt.org	2004-12-16 04:55:18.000000000 +0100
96c9519
+++ python3-python-smbpasswd-1.0.1-12.fc13/README.txt	2010-02-02 17:35:59.398053959 +0100
96c9519
@@ -26,10 +26,10 @@ In Python:
96c9519
 
96c9519
     passwd = 'mypassword'
96c9519
 
96c9519
-    print 'LANMAN hash is', smbpasswd.lmhash(passwd)
96c9519
-    print 'NT hash is', smbpasswd.nthash(passwd)
96c9519
+    print ('LANMAN hash is', smbpasswd.lmhash(passwd))
96c9519
+    print ('NT hash is', smbpasswd.nthash(passwd))
96c9519
 
96c9519
-    print 'both hashes at once = %s:%s' % smbpasswd.hash(passwd)
96c9519
+    print ('both hashes at once = %s:%s' % smbpasswd.hash(passwd))
96c9519
 
96c9519
 ------------------------------------------------------------
96c9519
                                             Enjoy
96c9519
diff -up python3-python-smbpasswd-1.0.1-12.fc13/setup.py.org python3-python-smbpasswd-1.0.1-12.fc13/setup.py
96c9519
--- python3-python-smbpasswd-1.0.1-12.fc13/setup.py.org	2004-12-16 04:54:08.000000000 +0100
96c9519
+++ python3-python-smbpasswd-1.0.1-12.fc13/setup.py	2010-02-02 17:35:59.398053959 +0100
96c9519
@@ -1,4 +1,4 @@
96c9519
-#!/usr/bin/env python
96c9519
+#!/usr/bin/env python3
96c9519
 #
96c9519
 # Python Distutils Setup file for py-smbpasswd module.  Build and
96c9519
 # install with:
96c9519
diff -up python3-python-smbpasswd-1.0.1-12.fc13/smbpasswd.c.org python3-python-smbpasswd-1.0.1-12.fc13/smbpasswd.c
96c9519
--- python3-python-smbpasswd-1.0.1-12.fc13/smbpasswd.c.org	2004-12-16 04:54:08.000000000 +0100
96c9519
+++ python3-python-smbpasswd-1.0.1-12.fc13/smbpasswd.c	2010-02-02 17:40:27.153054531 +0100
96c9519
@@ -70,7 +70,7 @@ hash_to_string(char *tmp) 
96c9519
         outbuffer[(i*2)+1] = HEXCHARS[   c   & 0x0f];
96c9519
         }
96c9519
         
96c9519
-    return PyString_FromStringAndSize(outbuffer, 32);
96c9519
+    return PyUnicode_FromStringAndSize(outbuffer, 32);
96c9519
     }
96c9519
 
96c9519
 
96c9519
@@ -158,12 +158,19 @@ static PyMethodDef smbpasswd_functions[]
96c9519
     {NULL,      NULL}   /* Sentinel */
96c9519
     };
96c9519
 
96c9519
+static struct PyModuleDef smbpasswdmodule = 
96c9519
+  { PyModuleDef_HEAD_INIT,
96c9519
+    "smbpasswd",
96c9519
+    module_doc,
96c9519
+    -1,
96c9519
+    smbpasswd_functions
96c9519
+  };
96c9519
 
96c9519
 /* Initialize this module. */
96c9519
-void 
96c9519
-initsmbpasswd(void)
96c9519
+PyMODINIT_FUNC 
96c9519
+PyInit_smbpasswd(void)
96c9519
     {
96c9519
-    Py_InitModule3("smbpasswd", smbpasswd_functions, module_doc);
96c9519
+      return PyModule_Create(&smbpasswdmodule);
96c9519
     }
96c9519
 
96c9519
 /****** EOF *********/