You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: device.rs
    path of file: ./repos/arrayfire-rust/src/core
    
    the code of the file until where you have to start completion: use super::defines::AfError;
use super::error::HANDLE_ERROR;
use super::util::{dim_t, free_host, void_ptr};

use libc::{c_char, c_int, size_t};
use std::borrow::Cow;
use std::ffi::{CStr, CString};

extern "C" {
    fn af_get_version(major: *mu
    
pub fn get_version() -> (i32, i32, i32) {
    let mut maj: i32 = 0;
    let mut min: i32 = 0;
    let mut pat: i32 = 0;
    let err_val = unsafe {
        af_get_version(
            &mut maj as *mut c_int,
            &mut min as *mut c_int,
            &mut pat as *mut c_int,
        )
    };
    HANDLE_ERROR(AfError::from(err_val));
    (maj, min, pat)
}