From: Jarkko Hietaniemi Date: Mon, 19 May 2003 04:47:53 +0000 (+0000) Subject: Make Perl_ithread_self() a bit more helpful when X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fe53aa5bafbad898597f77488a12ad889fba4485;p=p5sagit%2Fp5-mst-13.2.git Make Perl_ithread_self() a bit more helpful when finding the thread fails (suggested by Stas in perl-ithreads Mar 01) p4raw-id: //depot/perl@19563 --- diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 4e34a40..994fd2b 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -532,7 +532,10 @@ Perl_ithread_self (pTHX_ SV *obj, char* Class) #else PERL_THREAD_GETSPECIFIC(self_key,thread); #endif - return ithread_to_SV(aTHX_ obj, thread, Class, TRUE); + if (thread) + return ithread_to_SV(aTHX_ obj, thread, Class, TRUE); + else + Perl_croak(aTHX_ "panic: cannot find thread data"); } /*