diff options
author | Steve Chaplin <> | 2012-05-23 08:07:51 +0800 |
---|---|---|
committer | Steve Chaplin <> | 2012-05-23 08:07:51 +0800 |
commit | cbb102e3d0735028c624583264ce5243d93ef844 (patch) | |
tree | 9baabc7df452d94b4dff88dfcea0749c8fbe90ea | |
parent | 2f9e604ac7bb5f6386179a3d0fad6f095c386f66 (diff) | |
download | pycairo-cbb102e3d0735028c624583264ce5243d93ef844.tar.gz |
Update waf to check for xpyb.
Bug #50134.
-rw-r--r-- | src/surface.c | 6 | ||||
-rw-r--r-- | wscript | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/surface.c b/src/surface.c index 0578639..d98c498 100644 --- a/src/surface.c +++ b/src/surface.c @@ -453,7 +453,9 @@ image_surface_create_for_data (PyTypeObject *type, PyObject *args) { Py_END_ALLOW_THREADS; o = PycairoSurface_FromSurface(surface, NULL); - ((PycairoSurface *)o)->buffer = buffer; + if (o != NULL) { + ((PycairoSurface *)o)->buffer = buffer; + } return o; } @@ -571,7 +573,7 @@ http://www.python.org/dev/peps/pep-3118/ */ static int image_surface_buffer_getbufferproc (PycairoImageSurface *o, Py_buffer *view, - int flags) { + int flags) { cairo_surface_t *surface = o->surface; int height, stride; void *data; @@ -9,6 +9,7 @@ d = top APPNAME='pycairo' VERSION='1.10.1' cairo_version_required = '1.10.2' +xpyb_version_required = '1.3' # optional def options(ctx): @@ -27,9 +28,16 @@ def configure(ctx): ctx.check_tool('python') ctx.check_python_version((3,1,0)) ctx.check_python_headers() - ctx.check_cfg(package='cairo', atleast_version=cairo_version_required, + + ctx.check_cfg(package='cairo', + atleast_version=cairo_version_required, args='--cflags --libs') + ctx.check_cfg(package='xpyb', + atleast_version=xpyb_version_required, + args='--cflags --libs', + mandatory=False) + # add gcc options if env['CC_NAME'] == 'gcc': env.append_unique('CCFLAGS', ['-std=c99', '-Wall']) |