[Python-checkins] r74358 - in python/branches/release31-maint: Modules/socketmodule.h setup.py

benjamin.peterson python-checkins at python.org
Wed Aug 12 20:39:45 CEST 2009


Author: benjamin.peterson
Date: Wed Aug 12 20:39:44 2009
New Revision: 74358

Log:
Merged revisions 74356-74357 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r74356 | benjamin.peterson | 2009-08-12 13:11:03 -0500 (Wed, 12 Aug 2009) | 1 line
  
  fix typo in c++ ifdef
........
  r74357 | benjamin.peterson | 2009-08-12 13:18:03 -0500 (Wed, 12 Aug 2009) | 1 line
  
  search through db.h in binary #6680
........


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Modules/socketmodule.h
   python/branches/release31-maint/setup.py

Modified: python/branches/release31-maint/Modules/socketmodule.h
==============================================================================
--- python/branches/release31-maint/Modules/socketmodule.h	(original)
+++ python/branches/release31-maint/Modules/socketmodule.h	Wed Aug 12 20:39:44 2009
@@ -192,7 +192,7 @@
 
 #define PySocketModule_ImportModuleAndAPI() PyCapsule_Import(PySocket_CAPSULE_NAME, 1)
 
-#ifdef __cpluplus
+#ifdef __cplusplus
 }
 #endif
 #endif /* !Py__SOCKET_H */

Modified: python/branches/release31-maint/setup.py
==============================================================================
--- python/branches/release31-maint/setup.py	(original)
+++ python/branches/release31-maint/setup.py	Wed Aug 12 20:39:44 2009
@@ -725,17 +725,17 @@
                 f = os.path.join(d, "db.h")
                 if db_setup_debug: print("db: looking for db.h in", f)
                 if os.path.exists(f):
-                    f = open(f).read()
-                    m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f)
+                    f = open(f, "rb").read()
+                    m = re.search(br"#define\WDB_VERSION_MAJOR\W(\d+)", f)
                     if m:
                         db_major = int(m.group(1))
-                        m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f)
+                        m = re.search(br"#define\WDB_VERSION_MINOR\W(\d+)", f)
                         db_minor = int(m.group(1))
                         db_ver = (db_major, db_minor)
 
                         # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug
                         if db_ver == (4, 6):
-                            m = re.search(r"#define\WDB_VERSION_PATCH\W(\d+)", f)
+                            m = re.search(br"#define\WDB_VERSION_PATCH\W(\d+)", f)
                             db_patch = int(m.group(1))
                             if db_patch < 21:
                                 print("db.h:", db_ver, "patch", db_patch,


More information about the Python-checkins mailing list