Skip to contentSkip to conversation

Switch from bison name-prefix to api.prefix

PATCH In review Daniel Burgener 2 participants 3 messages Feb 12, 2025 – Apr 7, 2025 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Switch from bison name-prefix to api.prefix

Avoid a deprecation warning when building.

api.prefix was first released in bison 2.6, which was released in July 2012 [1]. name-prefix was deprecated in favor of api.prefix in bison 3.3, released January 2019 [2].

The new api.prefix construct rewrites additional variables when compared to name-prefix, such as YYTYPE and YYDEBUG. However, these variables are unused currently in conf-parse.y, so this does not affect libsemanage.

[1] http://savannah.gnu.org/news/?id=7269
[2] http://savannah.gnu.org/news/?id=9321

---
 libsemanage/src/conf-parse.y | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libsemanage/src/conf-parse.y +1 -1
index 6cb8a598..93a04699 100644
@@ -53,7 +53,7 @@ static int parse_errors;
 
 %}
 
-%name-prefix "semanage_"
+%define api.prefix {semanage_}
 
 %union {
         int d;
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Daniel Burgener

Avoid a deprecation warning when building.

api.prefix was first released in bison 2.6, which was released in July 2012 [1]. name-prefix was deprecated in favor of api.prefix in bison 3.3, released January 2019 [2].

Quoted 8 lines

The new api.prefix construct rewrites additional variables when compared to name-prefix, such as YYTYPE and YYDEBUG. However, these variables are unused currently in conf-parse.y, so this does not affect libsemanage.

[1] http://savannah.gnu.org/news/?id=7269
[2] http://savannah.gnu.org/news/?id=9321

Quoted 21 lines
---
 libsemanage/src/conf-parse.y | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libsemanage/src/conf-parse.y +1 -2
index 6cb8a598..93a04699 100644
@@ -53,7 +53,7 @@ static int parse_errors;
 
 %}
 
-%name-prefix "semanage_"
+%define api.prefix {semanage_}
 
 %union {
         int d;
--

2.34.1

#2 lore raw
Quoted 14 lines · James Carter
Quoted 11 lines · Daniel Burgener

Avoid a deprecation warning when building.

api.prefix was first released in bison 2.6, which was released in July 2012 [1]. name-prefix was deprecated in favor of api.prefix in bison 3.3, released January 2019 [2].

The new api.prefix construct rewrites additional variables when compared to name-prefix, such as YYTYPE and YYDEBUG. However, these variables are unused currently in conf-parse.y, so this does not affect libsemanage.

Quoted 7 lines
Quoted 4 lines

[1] http://savannah.gnu.org/news/?id=7269
[2] http://savannah.gnu.org/news/?id=9321

Merged.
Thanks,
Jim

Quoted 21 lines
Quoted 21 lines
---
 libsemanage/src/conf-parse.y | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libsemanage/src/conf-parse.y +1 -2
index 6cb8a598..93a04699 100644
@@ -53,7 +53,7 @@ static int parse_errors;
 
 %}
 
-%name-prefix "semanage_"
+%define api.prefix {semanage_}
 
 %union {
         int d;
--

2.34.1