Dear Sir,

I am writing to thank you for your letter and say,

On Sat, Nov 06, 2004 at 12:25:01PM +0100, Tassilo von Parseval wrote:

> This is threads-related (note that your perl has useithreads=define). In
> a thusly configured perl, many functions and macros of the perlapi need
> to have the thread-context in scope. This is achieved by providing the
> (aTHX|pTHX)_ macros. So PerlPower probably needs to be prototyped like
> this:
> 
>     static void
>     PerlPower(pTHX_ int a, int b)
>     {
>       ...
>     }
> 
> and called this way:
> 
>     PerlPower(aTHX_ 3, 4);
> 
> Those macros are empty when your perl is not threaded. Also, for
> functions not receiving any argument, you use pTHX and aTHX which is the
> same as their underscore-counterpart only that they don't contain a
> comma in their expansion.
>

Thank you very much for the clue.

Time to try and understand perlguts again.

Adding the extra fooTHX_'s to the declaration and call leads to

[EMAIL PROTECTED] hack_validate_perl_calls $ gcc -o power `perl 
-MExtUtils::Embed -e ccopts -e ldopts`
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../crt1.o(.text+0x18): In 
function `_start':
: undefined reference to `main'
collect2: ld returned 1 exit status

Thank you very much for your help,

Yours sincerely.
 

-- 
Stanley Hopcroft

Network specialist, IT Infrastructure
IP Australia
Ph: (02) 6283 3189  Fax: (02) 6281 1353
PO Box 200 Woden  ACT 2606
http://www.ipaustralia.gov.au
--
This message contains privileged and confidential information only 
for use by the intended recipient.  If you are not the intended 
recipient of this message, you must not disseminate, copy or use 
it in any manner.  If you have received this message in error, 
please advise the sender by reply e-mail.  Please ensure all 
e-mail attachments are scanned for viruses prior to opening or 
using.

Reply via email to