tor/src
Isis Lovecruft fc2a42cc49
rust: Refactor protover::compute_for_old_tor().
During code review and discussion with Chelsea Komlo, she pointed out
that protover::compute_for_old_tor() was a public function whose
return type was `&'static CStr`.  We both agree that C-like parts of
APIs should:

1. not be exposed publicly (to other Rust crates),
2. only be called in the appropriate FFI code,
3. not expose types which are meant for FFI code (e.g. `*mut char`,
   `CString`, `*const c_int`, etc.) to the pure-Rust code of other
   crates.
4. FFI code (e.g. things in `ffi.rs` modules) should _never_ be called
   from pure-Rust, not even from other modules in its own crate
   (i.e. do not call `protover::ffi::*` from anywhere in
   `protover::protoset::*`, etc).

With that in mind, this commit makes the following changes:

 * CHANGE `protover::compute_for_old_tor()` to be
   visible only at the `pub(crate)` level.
 * RENAME `protover::compute_for_old_tor()` to
   `protover::compute_for_old_tor_cstr()` to reflect the last change.
 * ADD a new `protover::compute_for_old_tor()` function wrapper which
   is public and intended for other Rust code to use, which returns a
   `&str`.
2018-04-02 19:20:36 +00:00
..
common Merge remote-tracking branch 'hello71/bug25398' 2018-03-28 14:47:05 -04:00
config Merge branch 'maint-0.3.1' into maint-0.3.2 2018-03-13 10:59:30 -04:00
ext Merge branch 'bug24658-rm-curve25519-header' into bug24658-merge 2018-03-26 20:12:59 -04:00
or Merge branch 'maint-0.3.3' 2018-04-02 08:51:47 -04:00
rust rust: Refactor protover::compute_for_old_tor(). 2018-04-02 19:20:36 +00:00
test misc tiny fixes 2018-04-01 23:47:44 -04:00
tools Merge branch 'bug24658-rm-curve25519-header' into bug24658-merge 2018-03-26 20:12:59 -04:00
trace Add stub function for libor-trace. 2017-04-25 18:02:19 +02:00
trunnel Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
win32 bump version to 0.3.3.4-alpha-dev 2018-03-29 11:24:02 -04:00
include.am Add --enable-rust configure switch 2017-04-29 08:55:57 +02:00