mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
93911255f6
commit
b808ee0078
@ -31,8 +31,7 @@ pdf::podofo_convert_pdfstring(const PdfString &s) {
|
||||
const PdfString
|
||||
pdf::podofo_convert_pystring(PyObject *val) {
|
||||
#if PY_MAJOR_VERSION > 2
|
||||
PdfString s(reinterpret_cast<const pdf_utf8*>(PyUnicode_AsUTF8(val)));
|
||||
return s;
|
||||
return PdfString(reinterpret_cast<const pdf_utf8*>(PyUnicode_AsUTF8(val)));
|
||||
#else
|
||||
PyObject *temp = PyUnicode_AsUTF8String(val);
|
||||
if (!temp) throw std::bad_alloc();
|
||||
|
Loading…
x
Reference in New Issue
Block a user