develooper Front page | perl.perl5.porters | Postings from January 2012

[perl #20609] MY_CXT macros and modules with multiple object files

Thread Next
From:
James E Keenan via RT
Date:
January 19, 2012 19:06
Subject:
[perl #20609] MY_CXT macros and modules with multiple object files
Message ID:
rt-3.6.HEAD-14510-1327028799-1994.20609-15-0@perl.org
On Wed Jan 29 11:14:24 2003, salva wrote:
> This is a bug report for perl from sfandino@yahoo.com,
> generated with the help of perlbug 1.34 running under perl
> v5.8.0.
> 

> 
> The MY_CXT family of macros to add local thread storage
> to modules are designed to be used from a single object
> (*.o) file.
> 
> i.e., imagine an extension module with two files file1.xs
> and file2.xs, and that both modules need to access MY_CXT.
> 
> When the extension is compiled in a non-threaded perl,
> MY_CXT gets defined as my_cxt, and my_cxt is
> 
>   "static my_cxt_t *my_cxt"
> 
> in file1.xs and so as it is "static" it is not accessible
> from file2.c
> 
> To correct it, my_cxt should not be defined as static
> anymore and a new macro has to be added to declare it
> in other objects.
> 

This post has not received a response since it was filed almost nine
years ago.  grepping the source code suggests that the only module in
the core distribution which *might* qualify as having multiple .xs files
is Dynaloader.

Is there an XS-expert who could evaluate the poster's argument?

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=20609

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About