mirror of
https://github.com/icewind1991/ivory.git
synced 2026-06-03 18:54:07 +02:00
Added php::info::print_table_row()
This commit is contained in:
parent
b1a4a5fb8d
commit
28ecf2d162
2 changed files with 19 additions and 7 deletions
22
src/info.rs
22
src/info.rs
|
|
@ -1,16 +1,30 @@
|
|||
use libc::*;
|
||||
use std::ffi::CString;
|
||||
|
||||
#[link_args = "-Wl,-undefined,dynamic_lookup"]
|
||||
extern {
|
||||
pub fn php_info_print_table_row(num_cols: c_int, ...) -> c_void;
|
||||
pub fn php_info_print_table_row_ex(num_cols: c_int, a: *const c_char, ...);
|
||||
pub fn php_info_print_table_start();
|
||||
pub fn php_info_print_table_row(num_cols: c_int, ...) -> c_void;
|
||||
pub fn php_info_print_table_end();
|
||||
pub fn php_info_print_hr();
|
||||
}
|
||||
|
||||
pub fn print_table_row(values: &[&str]) {
|
||||
let nargs = values.len() as i32;
|
||||
|
||||
if nargs != 2 {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
let v1 = CString::new(values[0]).unwrap();
|
||||
let v2 = CString::new(values[1]).unwrap();
|
||||
|
||||
unsafe {
|
||||
php_info_print_table_row(nargs, v1.as_ptr(), v2.as_ptr());
|
||||
};
|
||||
}
|
||||
|
||||
pub fn print_table_start() {
|
||||
unsafe { php_info_print_table_start() }
|
||||
unsafe { php_info_print_table_start() };
|
||||
}
|
||||
|
||||
pub fn print_table_end() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue