about summary refs log tree commit diff
path: root/src/libstd/ffi
AgeCommit message (Collapse)AuthorLines
2018-09-17OsStr: Document that it's not NUL terminatedColin Walters-1/+4
I somehow got confused into thinking this was the case, but it's definitely not. Let's help the common case of people who have an `OsStr` and need to call e.g. Unix APIs.
2018-09-14Move std::os::raw::c_void into libcore and re-export in libstdIsaac Woods-0/+3
2018-09-14Rollup merge of #54203 - cuviper:stable-os_str_str_ref_eq, r=estebankkennytm-2/+2
Fix the stable release of os_str_str_ref_eq This was added and stabilized in commit 02503029b83a, but while that claimed to be for 1.28.0, it didn't actually make it until 1.29.0. Fixes #54195.
2018-09-13Fix the stable release of os_str_str_ref_eqJosh Stone-2/+2
This was added and stabilized in commit 02503029b83a, but while that claimed to be for 1.28.0, it didn't actually make it until 1.29.0.
2018-09-14Rollup merge of #53976 - GuillaumeGomez:expect-world, r=steveklabnikkennytm-30/+34
Replace unwrap calls in example by expect Part of #51668. r? @steveklabnik
2018-09-08`&CStr`, not `CStr`, is the counterpart of `&str`Simonas Kazlauskas-2/+3
2018-09-06Fix linkGuillaume Gomez-3/+0
2018-09-05Replace unwrap calls in example by expectGuillaume Gomez-30/+34
2018-08-11Add links to std::char::REPLACEMENT_CHARACTER from docs.Corey Farwell-4/+7
There are a few places where we mention the replacement character in the docs, and it could be helpful for users to utilize the constant which is available in the standard library, so let’s link to it!
2018-08-01Rollup merge of #52340 - cypher:document-from-trait-in-ffi, r=steveklabnikPietro Albini-0/+48
Document From trait implementations for OsStr, OsString, CString, and CStr As part of issue #51430 (cc @skade). The allocation and copy claims should be double-checked. r? @steveklabnik
2018-07-25Merge remote-tracking branches 'ljedrz/dyn_libcore', 'ljedrz/dyn_libstd' and ↵Tatsuyuki Ishi-1/+1
'ljedrz/dyn_libterm' into dyn-rollup
2018-07-23Seperate summaries from rest of the commentMarkus Wein-0/+2
2018-07-16Document From conversions for CString and CStrMarkus Wein-0/+25
2018-07-16Document From conversions for OsString and OsStrMarkus Wein-0/+21
2018-07-12Rollup merge of #51912 - mbrubeck:more_box_slice_clone, r=alexcrichtonkennytm-0/+16
impl Clone for Box<CStr>, Box<OsStr>, Box<Path> Implements #51908.
2018-07-10Deny bare trait objects in `src/libstd`.ljedrz-1/+1
2018-07-06impl Clone for Box<CStr>, Box<OsStr>, Box<Path>Matt Brubeck-0/+16
Implements #51908.
2018-06-29Fix stability attributesGabriel Majeri-2/+2
2018-06-29Implement PartialEq between &str and OsStringGabriel Majeri-0/+14
Allows for example `os_string == "something"`
2018-05-17Rollup merge of #50170 - burtonageo:more_cow_from, r=alexcrichtonkennytm-0/+64
Implement From for more types on Cow This is basically https://github.com/rust-lang/rust/pull/48191, except that it should be implemented in a way that doesn't break third party crates.
2018-05-09Fix typoGeorge Burton-1/+1
2018-05-09Update features to 1.28.0George Burton-8/+8
2018-04-30Auto merge of #48925 - zackmdavis:fn_must_stabilize, r=nikomatsakisbors-0/+2
stabilize `#[must_use]` for functions and must-use comparison operators (RFC 1940) r? @nikomatsakis
2018-04-29Fix some broken links in docs.Eric Huss-0/+1
2018-04-28stabilize `#[must_use]` for functions and must-use operatorsZack M. Davis-0/+2
This is in the matter of RFC 1940 and tracking issue #43302.
2018-04-27Update the stable attributes to use the current nightly version numberGeorge Burton-8/+8
2018-04-27Add cstring_from_cow_cstr and osstring_from_cow_osstrGeorge Burton-0/+16
2018-04-22Implement From for more types on CowGeorge Burton-0/+48
2018-04-16Remove unwanted auto-linking and updateGuillaume Gomez-2/+3
2018-03-27Implement `shrink_to` method on collectionsDiggory Blake-0/+30
2018-02-24Add new warning for CStr::from_ptrGuillaume Gomez-0/+2
2018-02-18Mark doc examples w/ `extern` blocks as `ignore`.Corey Farwell-7/+7
Fixes https://github.com/rust-lang/rust/issues/48218.
2018-01-27Make wording around 0-cost casts more preciseTobias Bucher-9/+9
2018-01-13Rollup merge of #47357 - whentze:osstr-doc-fix, r=GuillaumeGomezkennytm-2/+5
Fix docs for OsStr At present, there are two small issues with the [docs](https://doc.rust-lang.org/std/ffi/struct.OsStr.html) for std::ffi::OsStr: - The docs say "OsStr is to OsString as String is to &str: the former in each pair are borrowed references; the latter are owned strings.". The latter pair is mixed up: String is the owned variant whereas &str is the borrowed reference. - The doc links to String and &str are broken and render as [String] and [&str]. This PR fixes these issues.
2018-01-11s/OsStr/&OsStr in docs to align with &str/String comparisonmuvlon-2/+3
2018-01-11Fix dead links in docs for OsStrmuvlon-0/+2
2018-01-11Fix confusing documentation for OsStrmuvlon-1/+1
2018-01-10Fix typo.Alexis Hunt-1/+1
2017-12-27Correct a few stability attributesOliver Middleton-8/+8
2017-11-25Implement `Rc`/`Arc` conversions for string-like typesMurarth-0/+115
Provides the following conversion implementations: * `From<`{`CString`,`&CStr`}`>` for {`Arc`,`Rc`}`<CStr>` * `From<`{`OsString`,`&OsStr`}`>` for {`Arc`,`Rc`}`<OsStr>` * `From<`{`PathBuf`,`&Path`}`>` for {`Arc`,`Rc`}`<Path>`
2017-11-09std: Avoid use of `libc` in portable modulesAlex Crichton-3/+3
This commit removes usage of the `libc` crate in "portable" modules like those at the top level and `sys_common`. Instead common types like `*mut u8` or `u32` are used instead of `*mut c_void` or `c_int` as well as switching to platform-specific functions like `sys::strlen` instead of `libc::strlen`.
2017-10-20Fix most rendering warnings from switching to CommonMarksteveklabnik-2/+1
2017-10-13Rollup merge of #44855 - federicomenaquintero:master, r=steveklabnikkennytm-67/+386
Improved docs for CStr, CString, OsStr, OsString This expands the documentation for those structs and their corresponding traits, per https://github.com/rust-lang/rust/issues/29354
2017-10-11ffi/mod.rs: Use only one space after a period ending a sentenceFederico Mena Quintero-20/+20
2017-10-11ffi/mod.rs: Keep the one-sentence summary at the beginning of the moduleFederico Mena Quintero-0/+2
2017-10-11ffi/c_str.rs: Use only one space after a period ending a sentenceFederico Mena Quintero-8/+8
2017-10-11ffi/c_str.rs: Fix method/function confusionFederico Mena Quintero-3/+3
Per https://github.com/rust-lang/rust/pull/44855#discussion_r144049179
2017-10-11ffi/c_str.rs: Make all descriptions have a single-sentence summary at the ↵Federico Mena Quintero-15/+16
beginning Per https://github.com/rust-lang/rust/pull/44855#discussion_r144048837 and subsequent ones.
2017-10-02Fix broken links in documentationFederico Mena Quintero-3/+3
2017-10-02Clarify the ffi module's toplevel docs, per @clarcharr's commentsFederico Mena Quintero-54/+65