Instead of the goto's, how about something like:<div><br><div><span class="Apple-style-span" style="font-family:monospace"><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)">
bool err = this->CheckForError();</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"><br></div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)">
if (!err)</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"> {</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)">
mplMathTextLib = PyImport_ImportModule("matplotlib.mathtext");</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"> err = this->CheckForError(mplMathTextLib);</div>
<div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"> }</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"><br></div>
</span><span class="Apple-style-span" style="font-family:monospace"><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"> if (!err)</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)">
{</div></span><span class="Apple-style-span" style="font-family:monospace"><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"> mathTextParser = PyObject_GetAttrString(mplMathTextLib, "MathTextParser");</div>
<div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"> err = this->CheckForError(mathTextParser);</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)">
}</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"><br></div></span><span class="Apple-style-span" style="font-family:monospace"><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)">
if (!err)</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"> {</div></span><span class="Apple-style-span" style="font-family:monospace"><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)">
this->Parser =</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"> PyObject_CallFunction(mathTextParser, const_cast<char*>("s"), "bitmap");</div>
</span><span class="Apple-style-span" style="color:rgb(0,136,0);font-family:monospace;font-size:12px;white-space:pre"> err = this->CheckForError(this->Parser);</span></div><div><font class="Apple-style-span" color="#008800" face="monospace"><span class="Apple-style-span" style="font-size:12px;white-space:pre"><br>
</span></font></div><div><font class="Apple-style-span" color="#008800" face="monospace"><span class="Apple-style-span" style="font-size:12px;white-space:pre"> if (err)<br></span></font><span class="Apple-style-span" style="font-family:monospace"><span class="Apple-style-span" style="font-family:arial"><span class="Apple-style-span" style="font-family:monospace"><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)">
{</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"> // in case the error was an exception.</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)">
delete this->Parser;</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"> this->Parser = NULL;</div></span><span class="Apple-style-span" style="color:rgb(0,136,0);font-family:monospace;font-size:12px;white-space:pre"> }</span><span class="Apple-style-span" style="font-family:monospace"></span></span><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)">
}</div><div class="diff add" style="font-family:monospace;font-size:12px;white-space:pre;color:rgb(0,136,0)"><br></div></span></div></div>