-
-
Save hsbt/0092f2674704c498285522167fb2ef15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Only in yaml: LICENSE | |
Only in yaml: config.h | |
diff -u yaml-0.2.1/emitter.c yaml/emitter.c | |
--- yaml-0.2.1/emitter.c 2020-06-23 12:57:05.000000000 +0900 | |
+++ yaml/emitter.c 2018-10-20 22:28:18.000000000 +0900 | |
@@ -24,8 +24,8 @@ | |
*/ | |
#define PUT_BREAK(emitter) \ | |
- (FLUSH(emitter) \ | |
- && ((emitter->line_break == YAML_CR_BREAK ? \ | |
+ (FLUSH(emitter) ? \ | |
+ ((emitter->line_break == YAML_CR_BREAK ? \ | |
(*(emitter->buffer.pointer++) = (yaml_char_t) '\r') : \ | |
emitter->line_break == YAML_LN_BREAK ? \ | |
(*(emitter->buffer.pointer++) = (yaml_char_t) '\n') : \ | |
@@ -34,7 +34,7 @@ | |
*(emitter->buffer.pointer++) = (yaml_char_t) '\n') : 0), \ | |
emitter->column = 0, \ | |
emitter->line ++, \ | |
- 1)) | |
+ 1) : 0) | |
/* | |
* Copy a character from a string into buffer. | |
@@ -221,7 +221,7 @@ | |
static int | |
yaml_emitter_write_indicator(yaml_emitter_t *emitter, | |
- char *indicator, int need_whitespace, | |
+ const char *indicator, int need_whitespace, | |
int is_whitespace, int is_indention); | |
static int | |
@@ -1234,7 +1234,7 @@ | |
} | |
/* | |
- * Write an achor. | |
+ * Write an anchor. | |
*/ | |
static int | |
@@ -1784,7 +1784,7 @@ | |
static int | |
yaml_emitter_write_indicator(yaml_emitter_t *emitter, | |
- char *indicator, int need_whitespace, | |
+ const char *indicator, int need_whitespace, | |
int is_whitespace, int is_indention) | |
{ | |
size_t indicator_length; | |
@@ -2174,7 +2174,7 @@ | |
yaml_string_t string) | |
{ | |
char indent_hint[2]; | |
- char *chomp_hint = NULL; | |
+ const char *chomp_hint = NULL; | |
if (IS_SPACE(string) || IS_BREAK(string)) | |
{ | |
diff -u yaml-0.2.1/scanner.c yaml/scanner.c | |
--- yaml-0.2.1/scanner.c 2020-06-23 12:57:05.000000000 +0900 | |
+++ yaml/scanner.c 2020-06-23 12:56:23.000000000 +0900 | |
@@ -1636,7 +1636,7 @@ | |
if (!parser->flow_level) | |
{ | |
- /* Check if we are allowed to start a new key (not nessesary simple). */ | |
+ /* Check if we are allowed to start a new key (not necessary simple). */ | |
if (!parser->simple_key_allowed) { | |
return yaml_parser_set_scanner_error(parser, NULL, parser->mark, | |
@@ -3507,7 +3507,7 @@ | |
{ | |
if (IS_BLANK(parser->buffer)) | |
{ | |
- /* Check for tab character that abuse indentation. */ | |
+ /* Check for tab characters that abuse indentation. */ | |
if (leading_blanks && (int)parser->mark.column < indent | |
&& IS_TAB(parser->buffer)) { | |
Only in yaml: yaml.h | |
diff -u yaml-0.2.1/yaml_private.h yaml/yaml_private.h | |
--- yaml-0.2.1/yaml_private.h 2020-06-23 12:57:06.000000000 +0900 | |
+++ yaml/yaml_private.h 2018-10-20 22:28:18.000000000 +0900 | |
@@ -1,3 +1,7 @@ | |
+#ifdef RUBY_EXTCONF_H | |
+#include RUBY_EXTCONF_H | |
+#endif | |
+ | |
#if HAVE_CONFIG_H | |
#include <config.h> | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment