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
|
const PdfString
|
||||||
pdf::podofo_convert_pystring(PyObject *val) {
|
pdf::podofo_convert_pystring(PyObject *val) {
|
||||||
#if PY_MAJOR_VERSION > 2
|
#if PY_MAJOR_VERSION > 2
|
||||||
PdfString s(reinterpret_cast<const pdf_utf8*>(PyUnicode_AsUTF8(val)));
|
return PdfString(reinterpret_cast<const pdf_utf8*>(PyUnicode_AsUTF8(val)));
|
||||||
return s;
|
|
||||||
#else
|
#else
|
||||||
PyObject *temp = PyUnicode_AsUTF8String(val);
|
PyObject *temp = PyUnicode_AsUTF8String(val);
|
||||||
if (!temp) throw std::bad_alloc();
|
if (!temp) throw std::bad_alloc();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user