changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / rust/sys/sbcl/src/lib.rs

changeset 698: 96958d3eb5b0
parent: 6fa723592550
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 04 Oct 2024 22:04:59 -0400
permissions: -rw-r--r--
description: fixes
1 //! lib.rs --- sbcl sys
2 #![allow(non_upper_case_globals)]
3 #![allow(non_camel_case_types)]
4 #![allow(non_snake_case)]
5 
6 use std::ffi::c_char;
7 
8 #[cfg(test)]
9 mod tests {
10  use super::*;
11  use libloading::{Library, Symbol};
12  #[test]
13  fn lisp_version_test() {
14  unsafe {
15  let lib = Library::new("/usr/local/lib/libsbcl.so").unwrap();
16  let initialize_lisp = lib
17  .get::<Symbol<extern "C" fn() -> std::ffi::c_int>>(b"initialize_lisp")
18  .unwrap();
19  initialize_lisp();
20  // assert_eq!(res,0);
21  //let lisp_version = lib.get::<Symbol<extern "C" fn()->&'static
22  // str>>(b"lisp_version")
23  //.unwrap();
24  //assert_eq!(lisp_version(), "2.4.2+");
25  }
26  }
27 }