pyqie 0.0.4

Python extension module for Pyqie, a retro game engine for Python
Documentation
use std::mem::transmute;
use std::ptr::null_mut;

use pyqie::Pyqie;

static mut PYQIE: *mut Pyqie = null_mut();

pub fn pyqie() -> &'static mut Pyqie {
    unsafe {
        if PYQIE.is_null() {
            panic!("Pyqie not initialized");
        } else {
            &mut *PYQIE
        }
    }
}

pub fn set_pyqie_instance(pyqie: Pyqie) {
    unsafe {
        PYQIE = transmute(Box::new(pyqie));
    }
}