Make it build with older gcc (4.X).

This commit is contained in:
Anton Berezin 2006-02-10 08:35:32 +00:00
parent 323109bb91
commit 5af33323f8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=155627
2 changed files with 25 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= HTML-Parser
PORTVERSION= 3.49
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= www perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= HTML

View File

@ -0,0 +1,24 @@
--- hparser.c.orig Fri Feb 10 09:28:37 2006
+++ hparser.c Fri Feb 10 09:28:57 2006
@@ -135,16 +135,16 @@ report_event(PSTATE* p_state,
#define CHR_DIST(a,b) ((a) - (b))
#endif
+ /* capture offsets */
+ STRLEN offset = p_state->offset;
+ STRLEN line = p_state->line;
+ STRLEN column = p_state->column;
+
/* some events might still fire after a handler has signaled eof
* so suppress them here.
*/
if (p_state->eof)
return;
-
- /* capture offsets */
- STRLEN offset = p_state->offset;
- STRLEN line = p_state->line;
- STRLEN column = p_state->column;
#if 0
{ /* used for debugging at some point */