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/src/scanner.c
+++ b/src/scanner.c
@@ -1118,9 +1118,10 @@ yaml_parser_save_simple_key(yaml_parser_t *parser)
 
     if (parser->simple_key_allowed)
     {
-        yaml_simple_key_t simple_key = { 1, required,
-            parser->tokens_parsed + parser->tokens.tail - parser->tokens.head,
-            { 0, 0, 0 } };
+        yaml_simple_key_t simple_key;
+        simple_key.possible = 1;
+        simple_key.required = required;
+        simple_key.token_number = parser->tokens_parsed + parser->tokens.tail - parser->tokens.head;
         simple_key.mark = parser->mark;
 
         if (!yaml_parser_remove_simple_key(parser)) return 0;
-- 
1.6.1

