Rantanen / intercom

Object based cross-language FFI for Rust
MIT License
63 stars 7 forks source link

String conversions #65

Closed Rantanen closed 6 years ago

Rantanen commented 6 years ago

Expose all strings as BSTR for now over COM. Handle conversions between BSTR and inner string types in a general way using FromWithTemporary trait.

I'll split the CString/CStr and interface selection into a different PR.

codecov-io commented 6 years ago

Codecov Report

Merging #65 into master will decrease coverage by 1.02%. The diff coverage is 75.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
- Coverage   74.04%   73.01%   -1.03%     
==========================================
  Files          56       46      -10     
  Lines        3467     3194     -273     
==========================================
- Hits         2567     2332     -235     
+ Misses        900      862      -38
Impacted Files Coverage Δ
intercom-common/src/builtin_model.rs 91.3% <ø> (ø) :arrow_up:
intercom-common/src/generators/cpp.rs 80.58% <100%> (+0.07%) :arrow_up:
intercom/src/alloc.rs 70% <100%> (+67.36%) :arrow_up:
intercom-common/src/generators/idl.rs 82.11% <100%> (ø) :arrow_up:
intercom-common/src/attributes/com_interface.rs 98.68% <100%> (-0.02%) :arrow_down:
intercom-common/src/attributes/com_impl.rs 100% <100%> (+1.75%) :arrow_up:
intercom/src/strings.rs 67.19% <67.19%> (ø)
intercom-common/src/methodinfo.rs 84.81% <70.37%> (-1.55%) :arrow_down:
intercom-common/src/tyhandlers.rs 83.49% <83.87%> (+10.63%) :arrow_up:
intercom-common/src/returnhandlers.rs 86.91% <89.18%> (-1.46%) :arrow_down:
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 50cd462...86707a1. Read the comment docs.

Rantanen commented 6 years ago

DONE! \o/

Functionality wise anyway. The remaining work is turning ComResult into a result of ComError instead of HRESULT and then implementing the Utf8String. These will happen in different PRs.