zyantific / zydis-rs

Zydis Rust Bindings
MIT License
83 stars 14 forks source link

Adding get_version function #10

Closed tathanhdinh closed 6 years ago

tathanhdinh commented 6 years ago

Hello all, The function ZydisGetVersion returns a combined value of (major, minor, patch, build). Since this feature of bindgen is not supported yet, we can not use existing macros, e.g. ZYDIS_VERSION_MAJOR to extract parts of the combined version. The PR allows:

let (major, minor, patch, build) = zydis::get_version();
athre0z commented 6 years ago

Nice, thanks! Would you mind adding a short documentation block before we merge this?

tathanhdinh commented 6 years ago

Sure, I added it.

athre0z commented 6 years ago

Thanks, merged!