Python GC.athlete()

Basic proof of concept for CPP binding using SIP but with
our own type conversion (to avoid overhead of SIP lib/deploy).
Its far from perfect but will serve as a starting point.

.. needed to fixup type conversion in goldencheetah.sip to
   convert returning QString as PyUnicode

.. needed to fixup passing context when multi-threaded

.. needed to fixup Bindings.h/cpp to offer new API
This commit is contained in:
Mark Liversedge
2017-12-04 15:17:19 +00:00
parent 6d9731e1ed
commit db3d119f7d
13 changed files with 206 additions and 29 deletions

View File

@@ -90,7 +90,7 @@ PythonSyntax::PythonSyntax(QTextDocument *parent) : QSyntaxHighlighter(parent)
// detach source require
commonFunctionFormat.setForeground(QColor(40,255,40));
QStringList commonFunctionPatterns;
commonFunctionPatterns << "\\bdef\\b" << "\\bself\\b";
commonFunctionPatterns << "\\bGC\\b" << "\\bdef\\b" << "\\bself\\b";
foreach (QString pattern, commonFunctionPatterns) {
rule.pattern = QRegExp(pattern);
rule.format = commonFunctionFormat;