diff -Nru cairocffi-0.7.2/cairocffi/compat.py cairocffi-0.8.0/cairocffi/compat.py --- cairocffi-0.7.2/cairocffi/compat.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/compat.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi.compat ~~~~~~~~~~~~~~~~ diff -Nru cairocffi-0.7.2/cairocffi/constants.py cairocffi-0.8.0/cairocffi/constants.py --- cairocffi-0.7.2/cairocffi/constants.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/constants.py 2017-02-03 13:01:47.000000000 +0000 @@ -2023,6 +2023,31 @@ cairo_win32_scaled_font_get_device_to_logical (cairo_scaled_font_t *scaled_font, cairo_matrix_t *device_to_logical); + + typedef void* CGContextRef; + typedef void* CGFontRef; + typedef void* ATSUFontID; + + +cairo_surface_t * +cairo_quartz_surface_create (cairo_format_t format, + unsigned int width, + unsigned int height); + +cairo_surface_t * +cairo_quartz_surface_create_for_cg_context (CGContextRef cgContext, + unsigned int width, + unsigned int height); + +CGContextRef +cairo_quartz_surface_get_cg_context (cairo_surface_t *surface); + +cairo_font_face_t * +cairo_quartz_font_face_create_for_cgfont (CGFontRef font); + +cairo_font_face_t * +cairo_quartz_font_face_create_for_atsu_font_id (ATSUFontID font_id); + """ _CAIRO_XCB_HEADERS = r""" diff -Nru cairocffi-0.7.2/cairocffi/context.py cairocffi-0.8.0/cairocffi/context.py --- cairocffi-0.7.2/cairocffi/context.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/context.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi.context ~~~~~~~~~~~~~~~~~ @@ -10,7 +10,7 @@ """ -from . import ffi, cairo, _check_status, constants +from . import ffi, cairo, _check_status, constants, _keepref from .matrix import Matrix from .patterns import Pattern from .surfaces import Surface @@ -101,7 +101,7 @@ self._init_pointer(cairo.cairo_create(target._pointer)) def _init_pointer(self, pointer): - self._pointer = ffi.gc(pointer, cairo.cairo_destroy) + self._pointer = ffi.gc(pointer, _keepref(cairo, cairo.cairo_destroy)) self._check_status() def _check_status(self): diff -Nru cairocffi-0.7.2/cairocffi/ffi_build.py cairocffi-0.8.0/cairocffi/ffi_build.py --- cairocffi-0.7.2/cairocffi/ffi_build.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/ffi_build.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi.ffi_build ~~~~~~~~~~~~~~~~~~~ @@ -16,7 +16,7 @@ # Path hack to import constants when this file is exec'd by setuptools this_file = os.path.abspath(__file__) -this_dir = os.path.split(this_file)[0] +this_dir = os.path.dirname(this_file) sys.path.append(this_dir) import constants @@ -24,9 +24,7 @@ # Primary cffi definitions ffi = FFI() -if hasattr(ffi, 'set_source'): - # PyPy < 2.6 compatibility - ffi.set_source('cairocffi._ffi', None) +ffi.set_source('cairocffi._ffi', None) ffi.cdef(constants._CAIRO_HEADERS) # include xcffib cffi definitions for cairo xcb support @@ -39,9 +37,7 @@ # gdk pixbuf cffi definitions ffi_pixbuf = FFI() -if hasattr(ffi_pixbuf, 'set_source'): - # PyPy < 2.6 compatibility - ffi_pixbuf.set_source('cairocffi._ffi_pixbuf', None) +ffi_pixbuf.set_source('cairocffi._ffi_pixbuf', None) ffi_pixbuf.include(ffi) ffi_pixbuf.cdef(''' typedef unsigned long gsize; diff -Nru cairocffi-0.7.2/cairocffi/fonts.py cairocffi-0.8.0/cairocffi/fonts.py --- cairocffi-0.7.2/cairocffi/fonts.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/fonts.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi.fonts ~~~~~~~~~~~~~~~ @@ -10,7 +10,7 @@ """ -from . import ffi, cairo, _check_status, constants +from . import ffi, cairo, _check_status, constants, _keepref from .matrix import Matrix from .compat import xrange @@ -31,7 +31,8 @@ """ def __init__(self, pointer): - self._pointer = ffi.gc(pointer, cairo.cairo_font_face_destroy) + self._pointer = ffi.gc( + pointer, _keepref(cairo, cairo.cairo_font_face_destroy)) self._check_status() def _check_status(self): @@ -137,7 +138,8 @@ ctm._pointer, options._pointer)) def _init_pointer(self, pointer): - self._pointer = ffi.gc(pointer, cairo.cairo_scaled_font_destroy) + self._pointer = ffi.gc( + pointer, _keepref(cairo, cairo.cairo_scaled_font_destroy)) self._check_status() def _check_status(self): @@ -347,9 +349,10 @@ status = cairo.cairo_scaled_font_text_to_glyphs( self._pointer, x, y, _encode_string(text), -1, glyphs, num_glyphs, clusters, num_clusters, cluster_flags) - glyphs = ffi.gc(glyphs[0], cairo.cairo_glyph_free) + glyphs = ffi.gc(glyphs[0], _keepref(cairo, cairo.cairo_glyph_free)) if with_clusters: - clusters = ffi.gc(clusters[0], cairo.cairo_text_cluster_free) + clusters = ffi.gc( + clusters[0], _keepref(cairo, cairo.cairo_text_cluster_free)) _check_status(status) glyphs = [ (glyph.index, glyph.x, glyph.y) @@ -393,7 +396,8 @@ getattr(self, 'set_' + name)(value) def _init_pointer(self, pointer): - self._pointer = ffi.gc(pointer, cairo.cairo_font_options_destroy) + self._pointer = ffi.gc( + pointer, _keepref(cairo, cairo.cairo_font_options_destroy)) self._check_status() def _check_status(self): diff -Nru cairocffi-0.7.2/cairocffi/__init__.py cairocffi-0.8.0/cairocffi/__init__.py --- cairocffi-0.7.2/cairocffi/__init__.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/__init__.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi ~~~~~~~~~ @@ -15,14 +15,9 @@ from . import constants from .compat import FileNotFoundError +from ._ffi import ffi -try: - from ._ffi import ffi -except ImportError: - # PyPy < 2.6 compatibility - from .ffi_build import ffi - -VERSION = '0.7.2' +VERSION = '0.8.0' # pycairo compat: version = '1.10.0' version_info = (1, 10, 0) @@ -46,6 +41,16 @@ cairo = dlopen(ffi, 'cairo', 'cairo-2') +class _keepref(object): + """Function wrapper that keeps a reference to another object.""" + def __init__(self, ref, func): + self.ref = ref + self.func = func + + def __call__(self, *args, **kwargs): + self.func(*args, **kwargs) + + class CairoError(Exception): """Raised when cairo returns an error status.""" def __init__(self, message, status): @@ -105,7 +110,8 @@ # Implementation is in submodules, but public API is all here. from .surfaces import (Surface, ImageSurface, PDFSurface, PSSurface, - SVGSurface, RecordingSurface, Win32PrintingSurface) + SVGSurface, RecordingSurface, Win32Surface, + Win32PrintingSurface) try: from .xcb import XCBSurface except ImportError: diff -Nru cairocffi-0.7.2/cairocffi/matrix.py cairocffi-0.8.0/cairocffi/matrix.py --- cairocffi-0.7.2/cairocffi/matrix.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/matrix.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi.matrix ~~~~~~~~~~~~~~~~ diff -Nru cairocffi-0.7.2/cairocffi/patterns.py cairocffi-0.8.0/cairocffi/patterns.py --- cairocffi-0.7.2/cairocffi/patterns.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/patterns.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi.patterns ~~~~~~~~~~~~~~~~~~ @@ -10,7 +10,7 @@ """ -from . import ffi, cairo, _check_status, constants +from . import ffi, cairo, _check_status, constants, _keepref from .matrix import Matrix from .surfaces import Surface from .compat import xrange @@ -34,7 +34,8 @@ """ def __init__(self, pointer): - self._pointer = ffi.gc(pointer, cairo.cairo_pattern_destroy) + self._pointer = ffi.gc( + pointer, _keepref(cairo, cairo.cairo_pattern_destroy)) self._check_status() def _check_status(self): diff -Nru cairocffi-0.7.2/cairocffi/pixbuf.py cairocffi-0.8.0/cairocffi/pixbuf.py --- cairocffi-0.7.2/cairocffi/pixbuf.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/pixbuf.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi.pixbuf ~~~~~~~~~~~~~~~~ @@ -16,13 +16,9 @@ from array import array from . import dlopen, ImageSurface, Context, constants +from ._ffi_pixbuf import ffi from .compat import xrange -try: - from ._ffi_pixbuf import ffi -except ImportError: - # PyPy < 2.6 compatibility - from .ffi_build import ffi_pixbuf as ffi __all__ = ['decode_to_image_surface'] diff -Nru cairocffi-0.7.2/cairocffi/surfaces.py cairocffi-0.8.0/cairocffi/surfaces.py --- cairocffi-0.7.2/cairocffi/surfaces.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/surfaces.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi.surface ~~~~~~~~~~~~~~~~~ @@ -15,7 +15,7 @@ import ctypes import weakref -from . import ffi, cairo, _check_status, constants +from . import ffi, cairo, _check_status, constants, _keepref from .fonts import FontOptions, _encode_string @@ -128,7 +128,8 @@ """ def __init__(self, pointer, target_keep_alive=None): - self._pointer = ffi.gc(pointer, cairo.cairo_surface_destroy) + self._pointer = ffi.gc( + pointer, _keepref(cairo, cairo.cairo_surface_destroy)) self._check_status() if target_keep_alive not in (None, ffi.NULL): keep_alive = KeepAlive(target_keep_alive) @@ -440,7 +441,7 @@ else: # TODO: avoid making a copy here if possible. length = len(data) - data = ffi.new('char[]', data) + data = ffi.new('unsigned char[]', data) keep_alive = KeepAlive(data, mime_type) _check_status(cairo.cairo_surface_set_mime_data( self._pointer, mime_type, data, length, @@ -648,7 +649,7 @@ raise ValueError('Got a %d bytes buffer, needs at least %d.' % (length, stride * height)) pointer = cairo.cairo_image_surface_create_for_data( - ffi.cast('char*', address), format, width, height, stride) + ffi.cast('unsigned char*', address), format, width, height, stride) Surface.__init__(self, pointer, target_keep_alive=data) @classmethod @@ -1274,6 +1275,31 @@ return tuple(extents) +class Win32Surface(Surface): + """ Creates a cairo surface that targets the given DC. + + The DC will be queried for its initial clip extents, and this + will be used as the size of the cairo surface. The resulting + surface will always be of format CAIRO_FORMAT_RGB24; should + you need another surface format, you will need to create one + through cairo_win32_surface_create_with_dib(). + + :param hdc : + The DC to create a surface for, + as obtained from :func:`win32gui.CreateDC`. + **Note**: this unsafely inteprets an integer as a pointer. + Make sure it actually points to a valid DC! + :type hdc: int + + *New in cairocffi 0.8* + + """ + def __init__(self, hdc): + pointer = cairo.cairo_win32_surface_create( + ffi.cast('void*', hdc)) + Surface.__init__(self, pointer) + + class Win32PrintingSurface(Surface): """ Creates a cairo surface that targets the given DC. @@ -1308,5 +1334,6 @@ constants.SURFACE_TYPE_PDF: PDFSurface, constants.SURFACE_TYPE_SVG: SVGSurface, constants.SURFACE_TYPE_RECORDING: RecordingSurface, + constants.SURFACE_TYPE_WIN32: Win32Surface, constants.SURFACE_TYPE_WIN32_PRINTING: Win32PrintingSurface } diff -Nru cairocffi-0.7.2/cairocffi/test_cairo.py cairocffi-0.8.0/cairocffi/test_cairo.py --- cairocffi-0.7.2/cairocffi/test_cairo.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/test_cairo.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi.tests ~~~~~~~~~~~~~~~ @@ -1064,8 +1064,8 @@ assert 5 == x1 < x2 < x3 assert clusters == [(2, 1), (1, 1), (1, 1)] assert is_backwards == 0 - assert font.glyph_extents(glyphs) == font.text_extents(text) - assert font.glyph_extents(glyphs) == context.glyph_extents(glyphs) + assert round_tuple(font.glyph_extents(glyphs)) == round_tuple(font.text_extents(text)) + assert round_tuple(font.glyph_extents(glyphs)) == round_tuple(context.glyph_extents(glyphs)) assert context.copy_path() == [] context.glyph_path(glyphs) diff -Nru cairocffi-0.7.2/cairocffi/test_pixbuf.py cairocffi-0.8.0/cairocffi/test_pixbuf.py --- cairocffi-0.7.2/cairocffi/test_pixbuf.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/test_pixbuf.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi.test_pixbuf ~~~~~~~~~~~~~~~~~~~~~ diff -Nru cairocffi-0.7.2/cairocffi/test_xcb.py cairocffi-0.8.0/cairocffi/test_xcb.py --- cairocffi-0.7.2/cairocffi/test_xcb.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/test_xcb.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi.test_xcb diff -Nru cairocffi-0.7.2/cairocffi/xcb.py cairocffi-0.8.0/cairocffi/xcb.py --- cairocffi-0.7.2/cairocffi/xcb.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/cairocffi/xcb.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 """ cairocffi.xcb ~~~~~~~~~~~~~ diff -Nru cairocffi-0.7.2/CHANGES cairocffi-0.8.0/CHANGES --- cairocffi-0.7.2/CHANGES 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/CHANGES 2017-02-03 13:01:47.000000000 +0000 @@ -1,6 +1,53 @@ cairocffi changelog ------------------- +Version 0.8.0 +............. + +Released on 2017-02-03 + +* Follow semver +* `#76 `_: + Avoid implicit relative import +* `#74 `_: + Use utf-8 instead of utf8 in headers +* `#73 `_: + Keep cairo library loaded until all relevant objects are freed +* `#86 `_: + Add cairo_quartz_* functions for MacOS +* Use the default ReadTheDocs theme +* Fix implicit casts + + +Version 0.7.2 +............. + +Released on 2015-08-04 + +* Use ctypes.util.find_library with dlopen. + + +Version 0.7.1 +............. + +Released on 2015-06-22 + +* Allow installing cairocffi when cffi<1.0 is installed. + + +Version 0.7 +........... + +Released on 2015-06-05 + +* `#47 `_: + Fix PyPy support. +* `#60 `_: + Use CFFI-1.0 methods. +* `#61 `_: + Allow ffi import when package is pip installed. + + Version 0.6 ........... diff -Nru cairocffi-0.7.2/debian/changelog cairocffi-0.8.0/debian/changelog --- cairocffi-0.7.2/debian/changelog 2017-05-01 00:32:16.000000000 +0000 +++ cairocffi-0.8.0/debian/changelog 2017-09-19 11:26:29.000000000 +0000 @@ -1,3 +1,23 @@ +cairocffi (0.8.0-0ubuntu2) artful; urgency=medium + + * Skip xcb tests. + + -- Matthias Klose Tue, 19 Sep 2017 13:26:29 +0200 + +cairocffi (0.8.0-0ubuntu1) artful; urgency=medium + + * New upstream version. + + -- Matthias Klose Sun, 17 Sep 2017 17:53:25 +0200 + +cairocffi (0.7.2-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Re-adds Build-Depends and Recommends on xcffib and the xcb tests + (Closes: #861680) + + -- Iain R. Learmonth Sat, 15 Jul 2017 11:26:54 +0100 + cairocffi (0.7.2-2) unstable; urgency=medium [ Ondřej Nový ] diff -Nru cairocffi-0.7.2/debian/control cairocffi-0.8.0/debian/control --- cairocffi-0.7.2/debian/control 2017-05-01 00:32:16.000000000 +0000 +++ cairocffi-0.8.0/debian/control 2017-07-15 10:13:46.000000000 +0000 @@ -10,6 +10,7 @@ python3-all, python3-setuptools, python-cffi (>= 1.1.0), python3-cffi (>= 1.1.0), + python-xcffib (>= 0.3.2), python3-xcffib (>= 0.3.2), python-sphinx | python3-sphinx, python-pytest, python3-pytest, xvfb, xauth, @@ -27,6 +28,7 @@ Package: python-cairocffi Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python-cffi, libcairo2, libgdk-pixbuf2.0-0 +Recommends: python-xcffib (>= 0.3.2) Suggests: python-cairocffi-doc Description: cffi-based cairo bindings for Python cairocffi is a CFFI-based drop-in replacement for Pycairo, @@ -37,6 +39,7 @@ Package: python3-cairocffi Architecture: all Depends: ${misc:Depends}, ${python3:Depends}, python3-cffi, libcairo2, libgdk-pixbuf2.0-0 +Recommends: python3-xcffib (>= 0.3.2) Suggests: python-cairocffi-doc Description: cffi-based cairo bindings for Python (Python3) cairocffi is a CFFI-based drop-in replacement for Pycairo, diff -Nru cairocffi-0.7.2/docs/overview.rst cairocffi-0.8.0/docs/overview.rst --- cairocffi-0.7.2/docs/overview.rst 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/docs/overview.rst 2017-02-03 13:01:47.000000000 +0000 @@ -81,7 +81,8 @@ cairo versions -------------- -The same cairocffi version can be used with a variety of cairo version. +Cairo, pycairo, and cairocffi each have version numbers. The same cairocffi version can +be used with a variety of cairo versions. For example, the :meth:`Surface.set_mime_data` method is based on the :c:func:`cairo_surface_set_mime_data` C function, which is only available since cairo 1.10. @@ -89,11 +90,22 @@ You can however still use the rest of the API. There is no need for cairocffi’s versions to be tied to cairo’s versions. -Use :func:`cairo_version` to test the version number:: +Use :func:`cairo_version` to test the version number for cairo:: - if cairo.cairo_version() > 11000: + if cairocffi.cairo_version() > 11000: surface.set_mime_data('image/jpeg', jpeg_bytes) +Here are all the version numbers:: + + >>> print("The cairo version is %s, meaning %s." + ... % (cairocffi.cairo_version(), cairocffi.cairo_version_string()) + The cairo version is 11402, meaning 1.14.02. + >>> print("The latest pycairo version this cairocffi version is compatible with is %s." + ... % cairo.version) + The latest pycairo version this cairocffi version is compatible with is 1.10.0. + >>> print("The cairocffi version is %s." % cairo.VERSION) + The cairocffi version is 0.7.2 + cairocffi is tested with both cairo 1.8.2 and the latest (1.12.8 as of this writing.) @@ -130,7 +142,9 @@ For doing something useful with cairo, you need at least a surface and a context:: - surface = cairo.ImageSurface(cairo.FORMAT_RGB24, 300, 200) + import cairocffi as cairo + + surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 300, 200) context = cairo.Context(surface) with context: context.set_source_rgb(1, 1, 1) # White diff -Nru cairocffi-0.7.2/setup.py cairocffi-0.8.0/setup.py --- cairocffi-0.7.2/setup.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/setup.py 2017-02-03 13:01:47.000000000 +0000 @@ -2,7 +2,6 @@ from os import path import re import io -import sys VERSION = re.search( @@ -18,29 +17,6 @@ encoding='utf-8', ).read() -if '_cffi_backend' in sys.builtin_module_names: - import _cffi_backend - requires_cffi = "cffi==" + _cffi_backend.__version__ -else: - requires_cffi = "cffi>=1.1.0" - -# PyPy < 2.6 compatibility -if requires_cffi.startswith("cffi==0."): - cffi_args = dict() -else: - cffi_args = dict(cffi_modules=[ - 'cairocffi/ffi_build.py:ffi', - 'cairocffi/ffi_build.py:ffi_pixbuf' - ]) - -try: - import cffi - if cffi.__version__.startswith('0.'): - # https://github.com/SimonSapin/cairocffi/issues/64 - cffi_args = dict() -except ImportError: - pass - setup( name='cairocffi', version=VERSION, @@ -59,8 +35,11 @@ 'Topic :: Multimedia :: Graphics', ], packages=find_packages(), - install_requires=[requires_cffi], - setup_requires=[requires_cffi], + install_requires=['cffi>=1.1.0'], + setup_requires=['cffi>=1.1.0'], + cffi_modules=[ + 'cairocffi/ffi_build.py:ffi', + 'cairocffi/ffi_build.py:ffi_pixbuf' + ], extras_require={'xcb': ['xcffib>=0.3.2']}, - **cffi_args ) diff -Nru cairocffi-0.7.2/.travis.yml cairocffi-0.8.0/.travis.yml --- cairocffi-0.7.2/.travis.yml 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/.travis.yml 2017-02-03 13:01:47.000000000 +0000 @@ -5,12 +5,13 @@ - "3.2" - "3.3" - "3.4" - - "pypy" + - "3.5" before_install: - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" install: - "pip install xcffib" - "pip install ." + - "python cairocffi/ffi_build.py" script: "py.test" sudo: false diff -Nru cairocffi-0.7.2/utils/cairocffi_to_pycairo.py cairocffi-0.8.0/utils/cairocffi_to_pycairo.py --- cairocffi-0.7.2/utils/cairocffi_to_pycairo.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/utils/cairocffi_to_pycairo.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 import ctypes import cairo # pycairo diff -Nru cairocffi-0.7.2/utils/cairo_coverage.py cairocffi-0.8.0/utils/cairo_coverage.py --- cairocffi-0.7.2/utils/cairo_coverage.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/utils/cairo_coverage.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 import inspect import pycparser diff -Nru cairocffi-0.7.2/utils/compare_pycairo.py cairocffi-0.8.0/utils/compare_pycairo.py --- cairocffi-0.7.2/utils/compare_pycairo.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/utils/compare_pycairo.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 import cairo as pycairo import cairocffi diff -Nru cairocffi-0.7.2/utils/mkconstants.py cairocffi-0.8.0/utils/mkconstants.py --- cairocffi-0.7.2/utils/mkconstants.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/utils/mkconstants.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 import os import sys import re @@ -50,12 +50,21 @@ source += read_cairo_header(cairo_git_dir, '-pdf') source += read_cairo_header(cairo_git_dir, '-ps') source += read_cairo_header(cairo_git_dir, '-svg') + source += ''' typedef void* HDC; typedef void* HFONT; typedef void LOGFONTW; ''' source += read_cairo_header(cairo_git_dir, '-win32') + + source += ''' + typedef void* CGContextRef; + typedef void* CGFontRef; + typedef void* ATSUFontID; + ''' + source += read_cairo_header(cairo_git_dir, '-quartz') + ast = pycparser.CParser().parse(source) print('# *** Do not edit this file ***') diff -Nru cairocffi-0.7.2/utils/pango_example.py cairocffi-0.8.0/utils/pango_example.py --- cairocffi-0.7.2/utils/pango_example.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/utils/pango_example.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 import cairocffi import cffi diff -Nru cairocffi-0.7.2/utils/pycairo_to_cairocffi.py cairocffi-0.8.0/utils/pycairo_to_cairocffi.py --- cairocffi-0.7.2/utils/pycairo_to_cairocffi.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/utils/pycairo_to_cairocffi.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 import cairo # pycairo import cairocffi diff -Nru cairocffi-0.7.2/utils/tests.py cairocffi-0.8.0/utils/tests.py --- cairocffi-0.7.2/utils/tests.py 2015-08-04 14:26:36.000000000 +0000 +++ cairocffi-0.8.0/utils/tests.py 2017-02-03 13:01:47.000000000 +0000 @@ -1,4 +1,4 @@ -# coding: utf8 +# coding: utf-8 import io import cairo # pycairo