diff options
author | Steve Chaplin <stevech1097@yahoo.com.au> | 2009-11-17 11:59:58 +0800 |
---|---|---|
committer | Steve Chaplin <stevech1097@yahoo.com.au> | 2009-11-17 11:59:58 +0800 |
commit | 0fbba2d3f1293a033a0064e5271d9a7198d0e736 (patch) | |
tree | ed62783401462bc11ff72a16f0e7d5ce2e13a16b | |
parent | 2a27c1c40b353fc6d567a796ae9059e241a97a25 (diff) | |
download | py2cairo-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.c | 2 |
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, |