From 47c31972d7a5c29c0ca0c261b19c4e37bdce42a3 Mon Sep 17 00:00:00 2001
From: Yuval Kogman <nothingmuch@woobling.org>
Date: Thu, 15 Jan 2009 13:26:20 +0200
Subject: [PATCH] ANSI compliant initialization of yaml_simple_key_t
Apparently the native HP-UX compiler can't handle the inline struct
declaration and wants it to be done dynamically.
This was reported against YAML::LibYAML:
http://rt.cpan.org/Public/Bug/Display.html?id=42405
---
src/scanner.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/scanner.c b/src/scanner.c
index f96a9f4..4cf9599 100644
|
a
|
b
|
yaml_parser_save_simple_key(yaml_parser_t *parser) |
| 1118 | 1118 | |
| 1119 | 1119 | if (parser->simple_key_allowed) |
| 1120 | 1120 | { |
| 1121 | | yaml_simple_key_t simple_key = { 1, required, |
| 1122 | | parser->tokens_parsed + parser->tokens.tail - parser->tokens.head, |
| 1123 | | { 0, 0, 0 } }; |
| | 1121 | yaml_simple_key_t simple_key; |
| | 1122 | simple_key.possible = 1; |
| | 1123 | simple_key.required = required; |
| | 1124 | simple_key.token_number = parser->tokens_parsed + parser->tokens.tail - parser->tokens.head; |
| 1124 | 1125 | simple_key.mark = parser->mark; |
| 1125 | 1126 | |
| 1126 | 1127 | if (!yaml_parser_remove_simple_key(parser)) return 0; |