[Python-modules-commits] r12831 - in packages/utidylib/trunk/debian (3 files)
nijel at users.alioth.debian.org
nijel at users.alioth.debian.org
Thu May 6 11:23:59 UTC 2010
Date: Thursday, May 6, 2010 @ 11:23:49
Author: nijel
Revision: 12831
Fix handling of pointer on 64-bit (LP: #307000).
Added:
packages/utidylib/trunk/debian/patches/fix-pointer-size.patch
Modified:
packages/utidylib/trunk/debian/changelog
packages/utidylib/trunk/debian/patches/series
Modified: packages/utidylib/trunk/debian/changelog
===================================================================
--- packages/utidylib/trunk/debian/changelog 2010-05-06 10:02:36 UTC (rev 12830)
+++ packages/utidylib/trunk/debian/changelog 2010-05-06 11:23:49 UTC (rev 12831)
@@ -1,8 +1,9 @@
utidylib (0.2-5) UNRELEASED; urgency=low
* NOT RELEASED YET
+ * Fix handling of pointer on 64-bit (LP: #307000).
- -- Michal ÄihaÅ <nijel at debian.org> Tue, 04 May 2010 17:52:32 +0200
+ -- Michal ÄihaÅ <nijel at debian.org> Thu, 06 May 2010 13:23:02 +0200
utidylib (0.2-4) unstable; urgency=low
Added: packages/utidylib/trunk/debian/patches/fix-pointer-size.patch
===================================================================
--- packages/utidylib/trunk/debian/patches/fix-pointer-size.patch (rev 0)
+++ packages/utidylib/trunk/debian/patches/fix-pointer-size.patch 2010-05-06 11:23:49 UTC (rev 12831)
@@ -0,0 +1,92 @@
+Subject: Fix handling of 64-bit pointer
+Origin: http://developer.berlios.de/bugs/?func=detailbug&bug_id=14691&group_id=1810
+--- a/tidy/lib.py
++++ b/tidy/lib.py
+@@ -18,7 +18,7 @@
+ import weakref
+ from tidy.error import *
+
+-# search the path for libtidy using the known names; try the package
++# search the path for libtidy using the known names; try the package
+ # directory too
+ thelib=None
+ os.environ['PATH'] = "%s%s%s" % (packagedir, os.pathsep, os.environ['PATH'])
+@@ -33,7 +33,7 @@
+ raise OSError("Couldn't find libtidy, please make sure it is installed.")
+
+ class Loader:
+- """I am a trivial wrapper that eliminates the need for tidy.tidyFoo,
++ """I am a trivial wrapper that eliminates the need for tidy.tidyFoo,
+ so you can just access tidy.Foo
+ """
+ def __init__(self):
+@@ -46,6 +46,7 @@
+ return getattr(self.lib, name)
+
+ _tidy=Loader()
++_tidy.Create.restype = ctypes.POINTER(ctypes.c_void_p)
+
+ # define a callback to pass to Tidylib
+ def _putByte(handle, c):
+@@ -53,7 +54,7 @@
+ sinkfactory[handle].putByte(c)
+ return 0
+
+-PUTBYTEFUNC=ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_char)
++PUTBYTEFUNC=ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_char)
+ putByte=PUTBYTEFUNC(_putByte)
+
+ class _OutputSink(ctypes.Structure):
+@@ -94,7 +95,7 @@
+ return "line %d col %d - %s: %s" % (self.line, self.col,
+ severities[self.severity],
+ self.message)
+-
++
+ else:
+ return "%s: %s" % (severities[self.severity], self.message)
+ except KeyError:
+@@ -103,7 +104,7 @@
+ def __repr__(self):
+ return "%s('%s')" % (self.__class__.__name__,
+ str(self).replace("'", "\\'"))
+-
++
+ class FactoryDict(dict):
+ """I am a dict with a create method and no __setitem__. This allows
+ me to control my own keys.
+@@ -114,7 +115,7 @@
+ dict.__setitem__(self, name, value)
+ def __setitem__(self, name, value):
+ raise TypeError, "Use create() to get a new object"
+-
++
+
+ class SinkFactory(FactoryDict):
+ """Mapping for lookup of sinks by handle"""
+@@ -161,12 +162,12 @@
+ class DocumentFactory(FactoryDict):
+ def _setOptions(self, doc, **options):
+ for k in options.keys():
+-
++
+ # this will flush out most argument type errors...
+ if options[k] is None: options[k] = ''
+-
+- _tidy.OptParseValue(doc.cdoc,
+- k.replace('_', '-'),
++
++ _tidy.OptParseValue(doc.cdoc,
++ k.replace('_', '-'),
+ str(options[k]))
+ if doc.errors:
+ match=filter(doc.errors[-1].message.startswith, errors.keys())
+@@ -209,7 +210,7 @@
+ return doc
+ def releaseDoc(self, ref):
+ _tidy.Release(self[ref])
+-
++
+ docfactory = DocumentFactory()
+ parse = docfactory.parse
+ parseString = docfactory.parseString
Modified: packages/utidylib/trunk/debian/patches/series
===================================================================
--- packages/utidylib/trunk/debian/patches/series 2010-05-06 10:02:36 UTC (rev 12830)
+++ packages/utidylib/trunk/debian/patches/series 2010-05-06 11:23:49 UTC (rev 12831)
@@ -1 +1,2 @@
fix_libtidy_import.patch
+fix-pointer-size.patch
More information about the Python-modules-commits
mailing list