pyosys: Use C++11 override keyword for bindings
authorXiretza <xiretza@xiretza.xyz>
Sun, 21 Jun 2020 14:27:33 +0000 (16:27 +0200)
committerXiretza <xiretza@xiretza.xyz>
Sun, 21 Jun 2020 14:30:00 +0000 (16:30 +0200)
7191dd16 dropped the YS_OVERRIDE macro, but it was still being generated
by the python bindings generator, resulting in errors like these when
compiled with ENABLE_PYOSYS=1:

kernel/python_wrappers.cc:350:21: error: expected ‘;’ at end of member declaration
  350 |   virtual void help() YS_OVERRIDE;
      |                     ^
      |                      ;
kernel/python_wrappers.cc:350:23: error: ‘YS_OVERRIDE’ does not name a type
  350 |   virtual void help() YS_OVERRIDE;
      |                       ^~~~~~~~~~~

misc/py_wrap_generator.py

index fa23e3b2c03f242fec691aa3f122ebfce94b22e0..38bd6129eea33b4c0b9e6134a8b423f88b37857f 100644 (file)
@@ -1414,7 +1414,7 @@ class WFunction:
                        text += ", "
                if len(self.args) > 0:
                        text = text[:-2]
-               text += ") YS_OVERRIDE;\n"
+               text += ") override;\n"
                return text
 
        def gen_decl_hash_py(self):