mirror of
https://github.com/simonask/libyaml-safer
synced 2024-11-22 19:33:03 +00:00
Initial fork
This commit is contained in:
parent
63131f5306
commit
fbdff989b5
3 changed files with 33 additions and 26 deletions
21
Cargo.toml
21
Cargo.toml
|
@ -1,14 +1,21 @@
|
|||
[package]
|
||||
name = "unsafe-libyaml"
|
||||
version = "0.2.10"
|
||||
authors = ["David Tolnay <dtolnay@gmail.com>"]
|
||||
categories = ["encoding", "parser-implementations", "no-std"]
|
||||
description = "libyaml transpiled to rust by c2rust"
|
||||
documentation = "https://docs.rs/unsafe-libyaml"
|
||||
name = "libyaml-safer"
|
||||
version = "0.1.0"
|
||||
authors = [
|
||||
"Simon Ask Ulsnes <simon@ulsnes.dk",
|
||||
"David Tolnay <dtolnay@gmail.com>",
|
||||
]
|
||||
categories = [
|
||||
"encoding",
|
||||
"parser-implementations",
|
||||
"no-std",
|
||||
]
|
||||
description = "Safer libyaml port, based on unsafe-libyaml"
|
||||
documentation = "https://docs.rs/libyaml-safer"
|
||||
edition = "2021"
|
||||
keywords = ["yaml"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/dtolnay/unsafe-libyaml"
|
||||
repository = "https://github.com/simonask/libyaml-safer"
|
||||
rust-version = "1.56"
|
||||
|
||||
[workspace]
|
||||
|
|
|
@ -17,16 +17,7 @@
|
|||
mod cstr;
|
||||
|
||||
use self::cstr::CStr;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
use std::ffi::c_void;
|
||||
use std::fs::File;
|
||||
use std::io::{self, Read, Write};
|
||||
use std::mem::MaybeUninit;
|
||||
use std::process::{self, ExitCode};
|
||||
use std::ptr::{self, addr_of_mut};
|
||||
use std::slice;
|
||||
use unsafe_libyaml::{
|
||||
use libyaml_safer::{
|
||||
yaml_alias_event_initialize, yaml_document_end_event_initialize,
|
||||
yaml_document_start_event_initialize, yaml_emitter_delete, yaml_emitter_emit,
|
||||
yaml_emitter_initialize, yaml_emitter_set_canonical, yaml_emitter_set_output,
|
||||
|
@ -40,6 +31,15 @@ use unsafe_libyaml::{
|
|||
YAML_PLAIN_SCALAR_STYLE, YAML_SINGLE_QUOTED_SCALAR_STYLE, YAML_UTF8_ENCODING,
|
||||
YAML_WRITER_ERROR,
|
||||
};
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
use std::ffi::c_void;
|
||||
use std::fs::File;
|
||||
use std::io::{self, Read, Write};
|
||||
use std::mem::MaybeUninit;
|
||||
use std::process::{self, ExitCode};
|
||||
use std::ptr::{self, addr_of_mut};
|
||||
use std::slice;
|
||||
|
||||
pub(crate) unsafe fn unsafe_main(
|
||||
stdin: &mut dyn Read,
|
||||
|
|
|
@ -14,6 +14,15 @@
|
|||
mod cstr;
|
||||
|
||||
use self::cstr::CStr;
|
||||
use libyaml_safer::{
|
||||
yaml_event_delete, yaml_event_t, yaml_event_type_t, yaml_parser_delete, yaml_parser_initialize,
|
||||
yaml_parser_parse, yaml_parser_set_input, yaml_parser_t, YAML_ALIAS_EVENT,
|
||||
YAML_DOCUMENT_END_EVENT, YAML_DOCUMENT_START_EVENT, YAML_DOUBLE_QUOTED_SCALAR_STYLE,
|
||||
YAML_FOLDED_SCALAR_STYLE, YAML_LITERAL_SCALAR_STYLE, YAML_MAPPING_END_EVENT,
|
||||
YAML_MAPPING_START_EVENT, YAML_NO_EVENT, YAML_PLAIN_SCALAR_STYLE, YAML_SCALAR_EVENT,
|
||||
YAML_SEQUENCE_END_EVENT, YAML_SEQUENCE_START_EVENT, YAML_SINGLE_QUOTED_SCALAR_STYLE,
|
||||
YAML_STREAM_END_EVENT, YAML_STREAM_START_EVENT,
|
||||
};
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
use std::ffi::c_void;
|
||||
|
@ -24,15 +33,6 @@ use std::mem::MaybeUninit;
|
|||
use std::process::{self, ExitCode};
|
||||
use std::ptr::addr_of_mut;
|
||||
use std::slice;
|
||||
use unsafe_libyaml::{
|
||||
yaml_event_delete, yaml_event_t, yaml_event_type_t, yaml_parser_delete, yaml_parser_initialize,
|
||||
yaml_parser_parse, yaml_parser_set_input, yaml_parser_t, YAML_ALIAS_EVENT,
|
||||
YAML_DOCUMENT_END_EVENT, YAML_DOCUMENT_START_EVENT, YAML_DOUBLE_QUOTED_SCALAR_STYLE,
|
||||
YAML_FOLDED_SCALAR_STYLE, YAML_LITERAL_SCALAR_STYLE, YAML_MAPPING_END_EVENT,
|
||||
YAML_MAPPING_START_EVENT, YAML_NO_EVENT, YAML_PLAIN_SCALAR_STYLE, YAML_SCALAR_EVENT,
|
||||
YAML_SEQUENCE_END_EVENT, YAML_SEQUENCE_START_EVENT, YAML_SINGLE_QUOTED_SCALAR_STYLE,
|
||||
YAML_STREAM_END_EVENT, YAML_STREAM_START_EVENT,
|
||||
};
|
||||
|
||||
pub(crate) unsafe fn unsafe_main(
|
||||
mut stdin: &mut dyn Read,
|
||||
|
|
Loading…
Reference in a new issue