From 2be52d76ced24827052ac56b0d4c7ee61ee5ccfd Mon Sep 17 00:00:00 2001
From: Martin Nilsson <mani@lysator.liu.se>
Date: Sat, 10 Nov 2007 22:36:27 +0100
Subject: [PATCH] Added const to yyerror, yyerror_reserved and yytype_error.

Rev: src/language.yacc:1.390
Rev: src/las.c:1.396
Rev: src/las.h:1.75
---
 src/language.yacc | 6 +++---
 src/las.c         | 4 ++--
 src/las.h         | 8 ++++----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/language.yacc b/src/language.yacc
index 0946c14e14..18dc1c5070 100644
--- a/src/language.yacc
+++ b/src/language.yacc
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: language.yacc,v 1.389 2007/10/13 15:21:51 grubba Exp $
+|| $Id: language.yacc,v 1.390 2007/11/10 21:36:27 nilsson Exp $
 */
 
 %pure_parser
@@ -4199,14 +4199,14 @@ void low_yyerror(struct pike_string *str)
   STACK_LEVEL_DONE(0);
 }
 
-PMOD_EXPORT void yyerror(char *str)
+PMOD_EXPORT void yyerror(const char *str)
 {
   push_text(str);
   low_yyerror(Pike_sp[-1].u.string);
   pop_stack();
 }
 
-static void yyerror_reserved(char *keyword)
+static void yyerror_reserved(const char *keyword)
 {
   char fmt[100];
   SNPRINTF(fmt, sizeof(fmt), "%s is a reserved word.", keyword);
diff --git a/src/las.c b/src/las.c
index c1d3ff6bd9..315e1d9e71 100644
--- a/src/las.c
+++ b/src/las.c
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: las.c,v 1.395 2007/10/15 17:55:22 mast Exp $
+|| $Id: las.c,v 1.396 2007/11/10 21:36:27 nilsson Exp $
 */
 
 #include "global.h"
@@ -3036,7 +3036,7 @@ static void low_build_function_type(node *n)
   }
 }
 
-void yytype_error(char *msg, struct pike_type *expected_t,
+void yytype_error(const char *msg, struct pike_type *expected_t,
 		  struct pike_type *got_t, unsigned int flags)
 {
   if (msg)
diff --git a/src/las.h b/src/las.h
index 106c723d66..35a9d66ed9 100644
--- a/src/las.h
+++ b/src/las.h
@@ -2,7 +2,7 @@
 || This file is part of Pike. For copyright information see COPYRIGHT.
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
 || for more information.
-|| $Id: las.h,v 1.74 2007/10/06 13:45:22 grubba Exp $
+|| $Id: las.h,v 1.75 2007/11/10 21:36:27 nilsson Exp $
 */
 
 #ifndef LAS_H
@@ -20,11 +20,11 @@ typedef void (*c_fun)(INT32);
 /* Flags used by yytype_error() */
 #define YYTE_IS_WARNING	1
 
-void yytype_error(char *msg, struct pike_type *expected_t,
+void yytype_error(const char *msg, struct pike_type *expected_t,
 		  struct pike_type *got_t, unsigned int flags);
 void low_yyerror(struct pike_string *str);
-PMOD_EXPORT void yyerror(char *s);
-static void yyerror_reserved(char *keyword);
+PMOD_EXPORT void yyerror(const char *s);
+static void yyerror_reserved(const char *keyword);
 int islocal(struct pike_string *str);
 int verify_declared(struct pike_string *str);
 void cleanup_compiler(void);
-- 
GitLab