This is not a highlightable cpp code block

This commit is contained in:
Marijn van der Zee
2017-03-11 14:48:20 +01:00
parent 85762b8282
commit 0cb55a887b
+5 -4
View File
@@ -96,26 +96,27 @@ Example: Overloading __repr__
std::string getName(); std::string getName();
}; };
:file:`myclass.i` :file:`myclass.i`
.. code-block:: c++ .. code-block::
:linenos: :linenos:
%include "string.i" %include "string.i"
%module myclass %module myclass
%{ %{
#include <string> #include <string>
#include "MyClass.h" #include "MyClass.h"
%} %}
%extend MyClass { %extend MyClass {
std::string __repr__() std::string __repr__()
{ {
return $self->getName(); return $self->getName();
} }
} }
%include "MyClass.h" %include "MyClass.h"