You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2001/12/14 06:47:50 UTC

souce scan explodes on apr optional functions

I've these function declarations in apr_perlio.h:

PerlIO *apr_perlio_apr_file_to_PerlIO(pTHX_ apr_file_t *file,
                                       apr_pool_t *pool);
APR_DECLARE_OPTIONAL_FN(PerlIO *,
                         apr_perlio_apr_file_to_PerlIO,
                         (pTHX_ apr_file_t *file, apr_pool_t *pool));


SV *apr_perlio_apr_file_to_glob(pTHX_ apr_file_t *file,
                                       apr_pool_t *pool, int type);
APR_DECLARE_OPTIONAL_FN(SV *,
                         apr_perlio_apr_file_to_glob,
                         (pTHX_ apr_file_t *file, apr_pool_t *pool, int 
type));


source_scan explodes on these :(

panic: length mismatch
	' PerlIO * (apr_OFN_apr_perlio_apr_file_to_PerlIO_t) ( PerlInterpreter 
*my_perl , apr_file_t *file, apr_pool_t *pool)'
whited-out as
	'PerlIO 
                                                    '
panic: length mismatch
	' SV * (apr_OFN_apr_perlio_apr_file_to_glob_t) ( PerlInterpreter *my_perl 
, apr_file_t *file, apr_pool_t *pool, int type)'
whited-out as
	'SV 
                                                    '
Expecting parenth after identifier in `apr_opt_fn_t *pfn'
after `apr_opt_fn_t ' at 
/home/stas/perl/ithread/lib/site_perl/5.7.2/C/Scan.pm line 851.
	C::Scan::do_declaration1('apr_opt_fn_t 
*pfn','HASH(0x85f13b8)','HASH(0x85fd7b4)',1) called at 
/home/stas/perl/ithread/lib/site_perl/5.7.2/C/Scan.pm line 808
	C::Scan::do_declaration('void apr_register_optional_fn(const char 
*szName,\x{a} 
apr_opt_fn_t *pfn);','HASH(0x85f13b8)','HASH(0x85fd7b4)') called at 
/home/stas/perl/ithread/lib/site_perl/5.7.2/C/Scan.pm line 738
	C::Scan::do_declarations('ARRAY(0x85f13c4)','HASH(0x85f13b8)','HASH(0x85fd7b4)') called at /home/stas/perl/ithread/lib/site_perl/5.7.2/Data/Flow.pm line 69
	Data::Flow::request('Apache::ParseSource::Scan=ARRAY(0x8adf438)','parsed_fdecls') called at /home/stas/perl/ithread/lib/site_perl/5.7.2/Data/Flow.pm line 39
	Data::Flow::get('Apache::ParseSource::Scan=ARRAY(0x8adf438)','parsed_fdecls') called at lib/Apache/ParseSource.pm line 49
	Apache::ParseSource::Scan::get('Apache::ParseSource::Scan=ARRAY(0x8adf43
8)','parsed_fdecls') called at lib/Apache/ParseSource.pm line 297
	Apache::ParseSource::get_functions('ModPerl::ParseSource=HASH(0x8cd4b0c)') called at lib/Apache/ParseSource.pm line 392
	Apache::ParseSource::write_functions_pm('ModPerl::ParseSource=HASH(0x8cd4b0c)','FunctionTable.pm','ModPerl::FunctionTable') called at lib/ModPerl/ParseSource.pm line 40
	ModPerl::ParseSource::write_functions_pm('ModPerl::ParseSource=HASH(0x8cd4b0c)') called at build/source_scan.pl line 26
make: *** [source_scan] Error 255

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: souce scan explodes on apr optional functions

Posted by Stas Bekman <st...@stason.org>.
It also explodes on:

#include "apr_optional.h"

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: souce scan explodes on apr optional functions

Posted by Stas Bekman <st...@stason.org>.
Stas Bekman wrote:

> Doug MacEachern wrote:
> 
>  > On Fri, 14 Dec 2001, Stas Bekman wrote:
>  >
>  >
>  >>Is there a way for SourceScan to tell where it borks? I mean on which
>  >>file (line?).
>  >>
>  >
>  > not that i know of, that'd be up to C::Scan.
> 
> 
> more problems with C::Scan:
> 
> 
> #ifndef MP_SOURCE_SCAN
> #include "apr_optional.h"
> #endif
> 
> static APR_OPTIONAL_FN_TYPE(apr_perlio_apr_file_to_glob) *apr_file_to_glob;
> 
> 
> doesn't report any problems, but stops the scanning (without telling 
> anything)
> 
> and generates incomplete tables. It took me a while to trace it down :(

of course the fix was to put the last line from above into #ifndef as 
well. The problem is that it wasn't reported by souce scan.

-- 


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: souce scan explodes on apr optional functions

Posted by Stas Bekman <st...@stason.org>.
Doug MacEachern wrote:

 > On Fri, 14 Dec 2001, Stas Bekman wrote:
 >
 >
 >>Is there a way for SourceScan to tell where it borks? I mean on which
 >>file (line?).
 >>
 >
 > not that i know of, that'd be up to C::Scan.


more problems with C::Scan:


#ifndef MP_SOURCE_SCAN
#include "apr_optional.h"
#endif

static APR_OPTIONAL_FN_TYPE(apr_perlio_apr_file_to_glob) *apr_file_to_glob;


doesn't report any problems, but stops the scanning (without telling 
anything)

and generates incomplete tables. It took me a while to trace it down :(




_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: souce scan explodes on apr optional functions

Posted by Doug MacEachern <do...@covalent.net>.
On Fri, 14 Dec 2001, Stas Bekman wrote:
 
> Is there a way for SourceScan to tell where it borks? I mean on which 
> file (line?).

not that i know of, that'd be up to C::Scan.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: souce scan explodes on apr optional functions

Posted by Stas Bekman <st...@stason.org>.
Doug MacEachern wrote:

> you can put #ifndef MP_SOURCE_SCAN around the trouble makers.

that works. Thanks.

Is there a way for SourceScan to tell where it borks? I mean on which 
file (line?).

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: souce scan explodes on apr optional functions

Posted by Doug MacEachern <do...@covalent.net>.
you can put #ifndef MP_SOURCE_SCAN around the trouble makers.




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org