<br><br><div><span class="gmail_quote">On 2/12/06, <b class="gmail_sendername">Sascha Volkenandt (ML)</b> <<a href="mailto:lists@magoa.net">lists@magoa.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Klaus Schmidinger wrote:<br>> This would allow anybody to do<br>><br>> cThread t;<br>> StartThread(&t);<br>><br>> which I don't think would be a good thing to do.<br>><br>> Any ideas how to prevent this from happening?
<br><br>It's perfectly okay to declare StartThread<br><br>extern "C" static void *StartThread(cThread *Thread);<br><br>
</blockquote></div><br>
Shouldn't a nameless namepsace be used here? gcc 3.4.3 does not like extern "C" static<br>
at all (error: multiple storage classes in declaration of ...). i.e., in thread.c:<br>
<br>
namespace {<br>
extern "C" void *StartThread(cThread *Thread)<br>
{<br>
....<br>
}<br>
}<br>
<br>
<br>
<br>