MCPcopy Create free account
hub / github.com/Sigil-Ebook/Sigil / GetCurrentReplacementCountInPython

Method GetCurrentReplacementCountInPython

src/EmbedPython/PythonRoutines.cpp:493–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491
492
493int PythonRoutines::GetCurrentReplacementCountInPython(PyObjectPtr FSO)
494{
495 if (FSO.isNull()) {
496 fprintf(stderr, "get_current_replacement_count error - null Search Environment\n");
497 return 0;
498 }
499 int rv = 0;
500 QString traceback;
501 QList<QVariant> args;
502 EmbeddedPython* epp = EmbeddedPython::instance();
503 QVariant res = epp->callPyObjMethod(FSO, QString("get_current_replacement_count"), args, &rv, traceback);
504 if (rv) {
505 fprintf(stderr, "get_current_replacement_count error %d traceback %s\n",rv, traceback.toStdString().c_str());
506 }
507 return res.toInt();
508}
509
510
511QString PythonRoutines::GetSingleReplacementByFunction(PyObjectPtr FSO,

Callers 1

Calls 3

isNullMethod · 0.80
callPyObjMethodMethod · 0.80
QStringClass · 0.70

Tested by

no test coverage detected