Thanks, I'll remember that one... aTHX ;-)

On Sat, Sep 15, 2001 at 06:21:48PM -0000, [EMAIL PROTECTED] wrote:
> dougm       01/09/15 11:21:48
> 
>   Modified:    xs/APR/Table APR__Table.h
>   Log:
>   avoid dTHX; in APR::Table->do
>   
>   Revision  Changes    Path
>   1.2       +7 -3      modperl-2.0/xs/APR/Table/APR__Table.h
>   
>   Index: APR__Table.h
>   ===================================================================
>   RCS file: /home/cvs/modperl-2.0/xs/APR/Table/APR__Table.h,v
>   retrieving revision 1.1
>   retrieving revision 1.2
>   diff -u -r1.1 -r1.2
>   --- APR__Table.h    2001/09/15 18:17:31     1.1
>   +++ APR__Table.h    2001/09/15 18:21:48     1.2
>   @@ -1,6 +1,7 @@
>    typedef struct {
>        SV *cv;
>        apr_table_t *filter; /*XXX: or maybe a mgv ? */
>   +    PerlInterpreter *perl;
>    } mpxs_table_do_cb_data_t;
>    
>    typedef int (*mpxs_apr_table_do_cb_t)(void *, const char *, const char *);
>   @@ -8,10 +9,10 @@
>    static int mpxs_apr_table_do_cb(void *data,
>                                    const char *key, const char *val)
>    {
>   -    dTHX; /*XXX*/
>   +    mpxs_table_do_cb_data_t *tdata = (mpxs_table_do_cb_data_t *)data;
>   +    dTHXa(tdata->perl);
>        dSP;
>        int rv = 0;
>   -    mpxs_table_do_cb_data_t *tdata = (mpxs_table_do_cb_data_t *)data;
>    
>        /* Skip completely if something is wrong */
>        if (!(tdata && tdata->cv && key && val)) {
>   @@ -56,7 +57,10 @@
>             
>        tdata.cv = sub;
>        tdata.filter = NULL;
>   -    
>   +#ifdef USE_ITHREADS
>   +    tdata.perl = aTHX;
>   +#endif
>   +
>        if (items > 2) {
>            STRLEN len;
>            tdata.filter = apr_table_make(table->a.pool, items-2);
>   
>   
>   
> 

-- 
Philippe M. Chiasson  <[EMAIL PROTECTED]>
  Extropia's Resident System Guru
     http://www.eXtropia.com/

Perl is such a great deal because a lot of people have
worked a great deal on it. 
        -- Larry Wall

perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl 
Hacker!\n$/&&print||$$++&&redo}'

PGP signature

Reply via email to