~alextee/zrythm-cyaml

71dc351467f84548a09cfcc2ea8da17c4c9345b6 — Alexandros Theodotou 4 years ago f8eb024
apply type-check patch (https://github.com/tlsa/libcyaml/pull/112)
1 files changed, 5 insertions(+), 5 deletions(-)

M src/load.c
M src/load.c => src/load.c +5 -5
@@ 1924,11 1924,6 @@ static cyaml_err_t cyaml__read_value(
			cyaml__type_to_str(schema->type),
			schema->flags & CYAML_FLAG_POINTER ? " (pointer)" : "");

	err = cyaml__validate_event_type_for_schema(ctx, schema, event);
	if (err != CYAML_OK) {
		return err;
	}

	if (cyaml_event == CYAML_EVT_SCALAR) {
		if (cyaml__string_is_null_ptr(schema,
				(const char *)event->data.scalar.value)) {


@@ 1938,6 1933,11 @@ static cyaml_err_t cyaml__read_value(
		}
	}

	err = cyaml__validate_event_type_for_schema(ctx, schema, event);
	if (err != CYAML_OK) {
		return err;
	}

	if (cyaml__is_sequence(schema) == false) {
		/* Since sequences extend their allocation for each entry,
		 * they're handled in the sequence-specific code.