summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Chaplin <stevech1097@yahoo.com.au>2009-11-17 11:59:58 +0800
committerSteve Chaplin <stevech1097@yahoo.com.au>2009-11-17 11:59:58 +0800
commit0fbba2d3f1293a033a0064e5271d9a7198d0e736 (patch)
treeed62783401462bc11ff72a16f0e7d5ce2e13a16b
parent2a27c1c40b353fc6d567a796ae9059e241a97a25 (diff)
downloadpy2cairo-0fbba2d3f1293a033a0064e5271d9a7198d0e736.tar.gz
surface_write_to_png()
cairo_surface_write_to_png (and PyString_AsString()) requires a string so change &PyBaseString_Type to &PyString_Type to exclude unicode objects.
-rw-r--r--src/surface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/surface.c b/src/surface.c
index 1fdb92c..b08ee8c 100644
--- a/src/surface.c
+++ b/src/surface.c
@@ -274,7 +274,7 @@ static PyObject *
surface_write_to_png (PycairoSurface *o, PyObject *file) {
cairo_status_t status;
- if (PyObject_TypeCheck (file, &PyBaseString_Type)) {
+ if (PyObject_TypeCheck (file, &PyString_Type)) {
/* string (filename) argument */
Py_BEGIN_ALLOW_THREADS;
status = cairo_surface_write_to_png (o->surface,