Skip to content

Fix function return type in lib.rs #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions hlua/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,79 +563,79 @@ impl<'lua> Lua<'lua> {
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_base
#[inline]
pub fn open_base(&mut self) {
pub fn open_base(&mut self) -> i32{
unsafe { ffi::luaopen_base(self.lua.0) }
}

/// Opens bit32 library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_bit32
#[inline]
pub fn open_bit32(&mut self) {
pub fn open_bit32(&mut self) -> i32 {
unsafe { ffi::luaopen_bit32(self.lua.0) }
}

/// Opens coroutine library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_coroutine
#[inline]
pub fn open_coroutine(&mut self) {
pub fn open_coroutine(&mut self) -> i32{
unsafe { ffi::luaopen_coroutine(self.lua.0) }
}

/// Opens debug library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_debug
#[inline]
pub fn open_debug(&mut self) {
pub fn open_debug(&mut self) -> i32{
unsafe { ffi::luaopen_debug(self.lua.0) }
}

/// Opens io library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_io
#[inline]
pub fn open_io(&mut self) {
pub fn open_io(&mut self) -> i32{
unsafe { ffi::luaopen_io(self.lua.0) }
}

/// Opens math library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_math
#[inline]
pub fn open_math(&mut self) {
pub fn open_math(&mut self) -> i32{
unsafe { ffi::luaopen_math(self.lua.0) }
}

/// Opens os library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_os
#[inline]
pub fn open_os(&mut self) {
pub fn open_os(&mut self) -> i32 {
unsafe { ffi::luaopen_os(self.lua.0) }
}

/// Opens package library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_package
#[inline]
pub fn open_package(&mut self) {
pub fn open_package(&mut self) -> i32{
unsafe { ffi::luaopen_package(self.lua.0) }
}

/// Opens string library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_string
#[inline]
pub fn open_string(&mut self) {
pub fn open_string(&mut self) -> i32{
unsafe { ffi::luaopen_string(self.lua.0) }
}

/// Opens table library.
///
/// https://www.lua.org/manual/5.2/manual.html#pdf-luaopen_table
#[inline]
pub fn open_table(&mut self) {
pub fn open_table(&mut self) -> i32{
unsafe { ffi::luaopen_table(self.lua.0) }
}

Expand Down