Take a c_ulong directly in BN construction

Closes #416
This commit is contained in:
Steven Fackler 2016-08-07 17:48:18 -07:00
parent 7ca5ccf064
commit b56908a392
1 changed files with 2 additions and 2 deletions

View File

@ -584,9 +584,9 @@ impl BigNum {
}
/// Creates a new `BigNum` with the given value.
pub fn new_from(n: u64) -> Result<BigNum, ErrorStack> {
pub fn new_from(n: c_ulong) -> Result<BigNum, ErrorStack> {
BigNum::new().and_then(|v| unsafe {
try_ssl!(ffi::BN_set_word(v.raw(), n as c_ulong));
try_ssl!(ffi::BN_set_word(v.raw(), n));
Ok(v)
})
}