summaryrefslogtreecommitdiffstats
path: root/third_party/rust/cubeb/src/context.rs
blob: c45876a71f05b5ba7da0652a25448d56b315dfda (plain)
1
2
3
4
5
6
7
8
use {Context, Result};
use std::ffi::CString;

pub fn init<T: Into<Vec<u8>>>(name: T) -> Result<Context> {
    let name = CString::new(name)?;

    Context::init(Some(name.as_c_str()), None)
}