<p></p>
<p dir="auto">Thanks for this PR!</p>
<p dir="auto">I am not much into Python API, but somehow I get your comment in contradiction with the changes in the code, respectively:</p>
<pre class="notranslate"><code class="notranslate">PyErr_SetString is a void function. It doesn't return NULL.
</code></pre>
<p dir="auto">But then the changes replace:</p>
<pre class="notranslate"><code class="notranslate"> Py_INCREF(Py_None);
return Py_None;
</code></pre>
<p dir="auto">With a <code class="notranslate">NULL</code> return:</p>
<pre class="notranslate"><code class="notranslate">return NULL;
</code></pre>
<p dir="auto">Is it that after use of <code class="notranslate">PyErr_SetString(...);</code> it is not needed to reference <code class="notranslate">Py_None</code>, because it was not returning a <code class="notranslate">NULL</code> (or the <code class="notranslate">Py_None</code>) object?</p>
<p dir="auto">Since (I think), Python does not really have <code class="notranslate">NULL</code> inside, but the <code class="notranslate">None</code> keyword, what is the impact of this change returning <code class="notranslate">NULL</code>?</p>
<p dir="auto">Anything particularly wrong without this patch?</p>
<p dir="auto">Practically I am trying to figure out what exactly was wrong and this PR fixes, because the code is like this for rather long time.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/3231#issuecomment-1235402828">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZN2DKYHFR2QH6NQ4OLV4HSU3ANCNFSM6AAAAAAQDEVUYM">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZI4H7VK62ZML2YSE7TV4HSU3A5CNFSM6AAAAAAQDEVUYOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSJULAEY.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/pull/3231/c1235402828</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/3231#issuecomment-1235402828",
"url": "https://github.com/kamailio/kamailio/pull/3231#issuecomment-1235402828",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>