On Mon, Sep 24, 2001 at 01:08:47AM +0800, Stas Bekman wrote:
> On Sun, 23 Sep 2001, Philippe M . Chiasson wrote:
>
> > Here is my second attempt at implementing an TIEHASH interface for APR::Table
> >
> > It is now complete according to the Tied hash interface and make test passes
> > without any warning ;-)
> >
> > There aren't a lot of outstanding issues about this patch, except:
> >
> > 1. I am not sure where to put mpxs_typemap_(in/out)put_APR__Table... right
> > now I placed them in modperl_util.[ch] as other people will need it.
> > 2. I still have to define this:
> >
> > #define mp_xs_sv2_APR__Table(sv) mpxs_typemap_input_APR__Table(aTHX_ sv,
>NULL)
> >
> > And I can forsee problems if other modules start playing with tables in the
> > 'standard' way using mpxs_usage_va*, as it will revert back to it's default
> > behaviour and things will start to break ;-(
> > 3. I can't generate the xs/tables/current/*.pm since source_scan seems to be
>broken
> > now...
> >
> > That's all I can think of for now, and I love how all of a sudden
>$r->headers_out->{KEY}
> > suddently works. Didn't add test for them though... should I ?
> >
> > This time I also spent quite some time fiddling with gnu-indent and all it's
>millions
> > of options to try and proprely indent the whole thing. I think I might have
>succeded
> > this time, and if I did, I will share my indent receipe (still needed manual fixing
> > a couple of times)
> >
> > Let me know if this works for anybody but me.
>
> cannot compile with your patch, must be incomplete patch?
>
> /home/stas/apache.org/gozer> patch -p0 < gozer
> patching file lib/ModPerl/WrapXS.pm
> patching file src/modules/perl/modperl_perl_includes.h
> patching file src/modules/perl/modperl_util.c
> patching file src/modules/perl/modperl_util.h
> patching file t/response/TestAPR/table.pm
> patching file todo/api.txt
> patching file xs/typemap
> patching file xs/APR/Table/APR__Table.h
> patching file xs/maps/apr_functions.map
>
> is that correct?
>
> cc -I/home/stas/apache.org/gozer/src/modules/perl
> -I/home/stas/apache.org/gozer/xs -I/home/stas/httpd/prefork/include
> -D_REENTRANT -DDEBUGGING -fno-strict-aliasing -I/usr/local/include
> -I/home/stas/perl/ithread/lib/5.7.2/i686-linux-thread-multi/CORE
> -DMOD_PERL -DMP_USE_GTOP -Wall -Wmissing-prototypes -Wstrict-prototypes
> -Wmissing-declarations -DAP_DEBUG -DAP_HAVE_DESIGNATED_INITIALIZER -g
> -DMP_DEBUG -DMP_IOBUFSIZE=16384 -Werror -DMP_TRACE -fpic \
> -c modperl_util.c && mv modperl_util.o modperl_util.lo
> cc1: warnings being treated as errors
> modperl_util.c: In function `mpxs_typemap_input_APR__Table':
> modperl_util.c:364: warning: suggest parentheses around assignment used as
> truth value
> make[1]: *** [modperl_util.lo] Error 1
> make[1]: Leaving directory `/home/stas/apache.org/gozer/src/modules/perl'
> make: *** [modperl_lib] Error 2
Is modperl_util.c:364:
> if (mg = mg_find(hv, PERL_MAGIC_tied)) {
??
That's a funny message from cc (I am using gcc)
Where does it want parentheses ??
> if (mg = ( mg_find(hv, PERL_MAGIC_tied))) {
or
> if ((mg = mg_find(hv, PERL_MAGIC_tied))) {
Can you try these 2 changes and let me know if it works...
P.S. Also attached it my FunctionTable.pm, since source_scan is currently broken...
Index: xs/tables/current/Apache/FunctionTable.pm
===================================================================
RCS file: /home/anoncvs/mod_perl-2-cvs/xs/tables/current/Apache/FunctionTable.pm,v
retrieving revision 1.19
diff -u -U15 -b -B -I'$Id' -I'$Revision' -r1.19 FunctionTable.pm
--- xs/tables/current/Apache/FunctionTable.pm 2001/09/15 17:53:12 1.19
+++ xs/tables/current/Apache/FunctionTable.pm 2001/09/23 15:11:49
@@ -10762,30 +10762,40 @@
'name' => 'val'
}
]
},
{
'return_type' => 'void',
'name' => 'apr_table_clear',
'args' => [
{
'type' => 'apr_table_t *',
'name' => 't'
}
]
},
{
+ 'return_type' => 'void',
+ 'name' => 'apr_table_CLEAR',
+ 'args' => [
+ {
+ 'type' => 'apr_table_t *',
+ 'name' => 't'
+ }
+ ]
+ },
+ {
'return_type' => 'apr_table_t *',
'name' => 'apr_table_copy',
'args' => [
{
'type' => 'apr_pool_t *',
'name' => 'p'
},
{
'type' => 'const apr_table_t *',
'name' => 't'
}
]
},
{
'return_type' => 'void',
@@ -10812,30 +10822,83 @@
{
'return_type' => 'const char *',
'name' => 'apr_table_get',
'args' => [
{
'type' => 'const apr_table_t *',
'name' => 't'
},
{
'type' => 'const char *',
'name' => 'key'
}
]
},
{
+ 'return_type' => 'int',
+ 'name' => 'apr_table_EXISTS',
+ 'args' => [
+ {
+ 'type' => 'const apr_table_t *',
+ 'name' => 't'
+ },
+ {
+ 'type' => 'const char *',
+ 'name' => 'key'
+ }
+ ]
+ },
+ {
+ 'return_type' => 'const char *',
+ 'name' => 'apr_table_FIRSTKEY',
+ 'args' => [
+ {
+ 'type' => 'SV *',
+ 'name' => 'tsv'
+ },
+ ]
+ },
+ {
+ 'return_type' => 'const char *',
+ 'name' => 'apr_table_NEXTKEY',
+ 'args' => [
+ {
+ 'type' => 'SV *',
+ 'name' => 'tsv'
+ },
+ {
+ 'type' => 'SV *',
+ 'name' => 'p_key',
+ },
+ ]
+ },
+
+ {
+ 'return_type' => 'const char *',
+ 'name' => 'apr_table_FETCH',
+ 'args' => [
+ {
+ 'type' => 'const apr_table_t *',
+ 'name' => 't'
+ },
+ {
+ 'type' => 'const char *',
+ 'name' => 'key'
+ }
+ ]
+ },
+ {
'return_type' => 'apr_table_t *',
'name' => 'apr_table_make',
'args' => [
{
'type' => 'apr_pool_t *',
'name' => 'p'
},
{
'type' => 'int',
'name' => 'nelts'
}
]
},
{
'return_type' => 'void',
@@ -10917,49 +10980,81 @@
'type' => 'apr_table_t *',
'name' => 't'
},
{
'type' => 'const char *',
'name' => 'key'
},
{
'type' => 'const char *',
'name' => 'val'
}
]
},
{
'return_type' => 'void',
+ 'name' => 'apr_table_STORE',
+ 'args' => [
+ {
+ 'type' => 'apr_table_t *',
+ 'name' => 't'
+ },
+ {
+ 'type' => 'const char *',
+ 'name' => 'key'
+ },
+ {
+ 'type' => 'const char *',
+ 'name' => 'val'
+ }
+ ]
+ },
+ {
+ 'return_type' => 'void',
'name' => 'apr_table_setn',
'args' => [
{
'type' => 'apr_table_t *',
'name' => 't'
},
{
'type' => 'const char *',
'name' => 'key'
},
{
'type' => 'const char *',
'name' => 'val'
}
]
},
{
'return_type' => 'void',
'name' => 'apr_table_unset',
+ 'args' => [
+ {
+ 'type' => 'apr_table_t *',
+ 'name' => 't'
+ },
+ {
+ 'type' => 'const char *',
+ 'name' => 'key'
+ }
+ ]
+ },
+ {
+ 'return_type' => 'void',
+ 'name' => 'apr_table_DELETE',
'args' => [
{
'type' => 'apr_table_t *',
'name' => 't'
},
{
'type' => 'const char *',
'name' => 'key'
}
]
},
{
'return_type' => 'void',
'name' => 'apr_table_vdo',
'args' => [
>
> _____________________________________________________________________
> Stas Bekman JAm_pH -- Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide http://perl.apache.org/guide
> mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/
> http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
>
>
--
+----------------------------------------------------+
| Philippe M. Chiasson <[EMAIL PROTECTED]> |
+----------------------------------------------------+
| F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5 |
+----------------------------------------------------+
gethostent not implemented : Your C library apparently
doesn't implement gethostent(), probably because if it did,
it'd feel morally obligated to return every hostname on the
Internet.
-- perldiag(1)
perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl
Hacker!\n$/&&print||$$++&&redo}'
PGP signature