Michael Pankov
f9275ae8ef
Fix warnings
2018-04-19 17:07:02 +03:00
Emmanuel Gil Peyrot
c700430e18
Remove the executable bit from source files.
2017-11-12 18:33:26 +00:00
tomaka
b76b72f50f
Merge pull request #179 from tpdickso/master
...
Store index with UserdataOnStack so that correct value is read in Deref
2017-11-09 10:34:39 +01:00
Terence
d4db5e8729
Store index with UserdataOnStack so that correct value is read in Deref
2017-11-08 15:33:31 -05:00
tomaka
ee673d2b03
Merge pull request #177 from tpdickso/master
...
Implement reading arrays into AnyLuaValue and AnyHashableLuaValue
2017-11-07 10:33:00 +01:00
Terence
066d5646d1
Implement reading arrays into AnyLuaValue and AnyHashableLuaValue
2017-11-06 16:30:18 -05:00
Emmanuel Gil Peyrot
a96f06f93e
Fix strings aborting parsing at the first null character.
2017-11-03 02:06:50 +00:00
Emmanuel Gil Peyrot
be512308b6
Add tests for invalid UTF-8 string behaviour.
2017-11-03 01:58:18 +00:00
Terence
c3f820eb96
read numeric strings into AnyHashableLuaValue as strings
2017-11-01 14:40:46 -04:00
Terence
bda1f00a5f
AnyLuaValue always reads strings as strings, even if they could be parsed as numbers ( fix #170 )
2017-11-01 10:26:07 -04:00
tomaka
be7a730ec5
Publish 0.4.1
2017-09-19 07:47:08 +02:00
Siddharth Agarwal
ed5c73e6d7
allow getting at the Lua state from a Lua object
...
This is most useful when the caller wants to do low-level operations on
the state that aren't supported through the main API.
Also add a test to verify that low-level access works.
2017-09-18 19:06:18 -07:00
Siddharth Agarwal
613c79587b
reexport lua52_sys as ffi
...
In https://github.com/tomaka/hlua/pull/161 there was some concern that
exporting a pointer to the underlying Lua state directly would cause
semver issues. This neatly bypasses those issues.
2017-09-18 19:03:00 -07:00
tomaka
0777506794
Merge pull request #166 from sid0/match
...
rewrite function return value handling to use a match statement
2017-08-31 09:26:41 +02:00
Siddharth Agarwal
2486f44f26
derive Debug for public types
...
This proves to be pretty useful while debugging weird low-level Lua issues.
2017-08-30 19:58:16 -07:00
Siddharth Agarwal
336481a445
rewrite function return value handling to use a match statement
...
This avoids a bunch of return statements and makes it clear that each
branch actually returns.
2017-08-30 17:24:01 -07:00
Siddharth Agarwal
a1fc1672b7
add a few missing traits to LuaFunctionCallError
...
* Make it implement `Error` when possible.
* Allow conversions from `LuaFunctionCallError<Void>` to `LuaError`.
2017-08-29 10:56:51 -07:00
tomaka
6e354a86be
Merge pull request #164 from sid0/userdata-stack
...
implement AsLua and AsMutLua for UserdataOnStack
2017-08-29 08:43:41 +02:00
Siddharth Agarwal
700b264117
implement AsLua and AsMutLua for UserdataOnStack
...
While working with some userdata on a stack, I discovered that this
would be really useful.
2017-08-28 19:01:30 -07:00
Siddharth Agarwal
89dc90c6ea
drop redundant AsLua requirement on UserdataOnStack
...
`AsMutLua` already implies `AsLua`.
2017-08-28 18:59:10 -07:00
Siddharth Agarwal
e8bcc05367
expose methods to operate on PushGuards from outside this library
...
This is most useful when using a library to poke at the Rust state.
The most important methods made public are `new` to create a new
`PushGuard`, and `forget` to not run this `PushGuard`'s destructor.
They're both unsafe because their misuse can easily cause crashes.
Also expose a `size` method to access the number of elements this
`PushGuard` is managing, and provide an internal-only safe version of
`forget` under the assumption that consumers within this crate know what
they're doing.
2017-08-28 13:39:17 -07:00
Pierre Krieger
31125ef1f0
Fix publication
2017-08-17 18:57:02 +02:00
tomaka
69b9ad2483
Publish 0.4.0
...
Close #157
2017-08-17 08:29:52 +02:00
Michael Pankov
2161123a24
Fix review issues
2017-08-16 10:49:06 +03:00
Michael Pankov
52ca35e500
Implement reading HashMap
2017-08-15 14:52:15 +03:00
Michael Pankov
f9db98459f
Simplify reading a vector a bit
2017-08-15 14:52:03 +03:00
tomaka
a6b3bc8970
Merge pull request #145 from mkpankov/read-vec
...
Implement reading vectors of AnyLuaValue
2017-04-19 08:34:41 +02:00
Michael Pankov
eb545e300b
Add another test and document reading a Vec
2017-04-18 23:43:59 +03:00
Michael Pankov
f6feeb8d97
Fix the cleanup
2017-04-18 23:26:25 +03:00
Michael Pankov
9fc96fead6
Implement reading vectors of AnyLuaValue
2017-04-18 01:09:45 +03:00
tomaka
73c0120de5
Merge pull request #144 from mkpankov/error
...
Implement Error for LuaError
2017-04-16 15:50:59 +02:00
Michael Pankov
e4dd56acc2
Implement Error for LuaError
...
Supersedes #60
Fixes #50
2017-04-16 16:41:51 +03:00
Michael Pankov
ce68dd43c3
Add methods to open individual libraries
...
Fix #122
2017-04-16 16:15:26 +03:00
tomaka
571302483e
Merge pull request #141 from mkpankov/non-utf-8
...
Implement LuaPlainString for non-UTF-8
2017-04-15 20:07:28 +02:00
Michael Pankov
1982569b9c
Wrap Vec<u8> in AnyLuaString
2017-04-15 20:57:42 +03:00
Michael Pankov
81fcd670c9
Implement LuaPlainString for non-UTF-8
...
Fix #135
2017-04-15 19:36:05 +03:00
tomaka
05ab876b85
Merge pull request #139 from mkpankov/drop
...
Drop closure environment
2017-04-15 18:16:21 +02:00
Michael Pankov
a5952bf7c0
Use Arc
2017-04-15 19:10:32 +03:00
Michael Pankov
21cd68bb82
Use Arc in test
2017-04-15 18:58:01 +03:00
Michael Pankov
6b3fdeeaaa
Add a closure destructor wrapper
2017-04-15 18:56:14 +03:00
Michael Pankov
5d39da3ac4
Move the test
2017-04-15 18:39:30 +03:00
Michael Pankov
9063d00579
Don't panic in test
2017-04-15 18:24:10 +03:00
Michael Pankov
c285db538f
Fix the test
...
Forgot the move
2017-04-15 18:20:40 +03:00
Michael Pankov
862e1d0f87
Implement execute_from_reader ReadError test
...
Fix #127
2017-04-15 18:17:19 +03:00
Michael Pankov
3ae7e73b18
Drop closure environment
2017-04-15 17:48:22 +03:00
Jonas Schievink
ca3dc2da76
Remove unnecessary FnMut bound
...
Just FnOnce should be enough here
2017-04-02 11:02:09 +02:00
Jonas Schievink
c2b66e707f
Remove left-over for<'b> quantifier
2017-02-15 19:22:47 +01:00
Jonas Schievink
97b5dea004
Allow pushing Options
...
* Some(T) pushes the T
* None pushes `nil`
Closes #124
2017-02-15 13:26:11 +01:00
tomaka
f16fbfd2e4
Merge pull request #132 from jonas-schievink/popen
...
Support `io.popen` on Linux
2017-02-15 13:19:17 +01:00
Jonas Schievink
a875ca24b4
Add a REPL example
...
Useful for testing something quick without creating a new Rust project
2017-02-15 12:54:00 +01:00