Commit Graph

506 Commits (master)

Author SHA1 Message Date
Pierre Krieger 10c314de2b
Merge pull request #202 from kpcyrd/bump-lua52-sys
Bump lua52-sys to 0.1.2
2018-10-20 15:14:08 +02:00
kpcyrd acc791f7c2 Bump lua52-sys to 0.1.2 2018-10-20 15:07:42 +02:00
Pierre Krieger 82489e4762
Merge pull request #199 from kpcyrd/cc
Update gcc->cc
2018-09-05 19:33:09 +02:00
kpcyrd 8fd45d70a2 Update gcc->cc 2018-09-04 19:36:50 +01:00
Pierre Krieger c1806b72eb
Merge pull request #189 from mkpankov/warnings
Fix warnings
2018-04-20 12:07:36 +02:00
Michael Pankov f9275ae8ef Fix warnings 2018-04-19 17:07:02 +03:00
tomaka 84d5ea4b12
Merge pull request #181 from linkmauve/no-x
Remove the executable bit from source files
2017-11-12 20:00:58 +01:00
tomaka d075753bf5
Merge pull request #180 from linkmauve/gcc-build
Rename deprecated gcc::Config to gcc::Build
2017-11-12 20:00:47 +01:00
Emmanuel Gil Peyrot c700430e18 Remove the executable bit from source files. 2017-11-12 18:33:26 +00:00
Emmanuel Gil Peyrot 293ef98de4 Rename deprecated gcc::Config to gcc::Build. 2017-11-12 18:26:36 +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
tomaka 348c08c30a
Merge pull request #173 from linkmauve/fix-anyluastring
Parse strings entirely, without stopping at null bytes
2017-11-03 10:15:21 +01: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
tomaka b292162595
Merge pull request #172 from tpdickso/master
Read numeric strings into AnyHashableLuaValue as strings
2017-11-01 20:00:03 +01:00
Terence c3f820eb96 read numeric strings into AnyHashableLuaValue as strings 2017-11-01 14:40:46 -04:00
tomaka b486640a51
Merge pull request #171 from tpdickso/master
AnyLuaValue reads numeric strings as strings (fix #170)
2017-11-01 16:12:01 +01: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 ccdf9b5aaf Merge pull request #168 from tomaka/tomaka-patch-1
Publish 0.4.1
2017-09-19 08:06:11 +02:00
tomaka be7a730ec5 Publish 0.4.1 2017-09-19 07:47:08 +02:00
tomaka 6ac0dc2de7 Merge pull request #161 from sid0/state
allow getting at the Lua state from a Lua object
2017-09-19 07:26:42 +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
tomaka 16f8587573 Merge pull request #167 from sid0/debug
derive Debug for public types
2017-08-31 09:23:35 +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
tomaka de38a9c66c Merge pull request #165 from sid0/error
add a few missing traits to LuaFunctionCallError
2017-08-30 07:08:44 +02: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
tomaka 8467b97daf Merge pull request #162 from sid0/ref
[lua52-sys] add ref/unref functions and helper constants
2017-08-29 08:42:16 +02:00
tomaka f2e07105d5 Merge pull request #163 from sid0/pushguard
expose unsafe methods to create and forget PushGuards
2017-08-29 08:39:55 +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
Siddharth Agarwal ed51538105 [lua52-sys] add ref/unref functions and helper constants
These are useful when adding things to the Lua registry. From the
documentation at http://pgl.yoyo.org/luai/i/luaL_ref:

> As long as you do not manually add integer keys into table t, luaL_ref
> ensures the uniqueness of the key it returns.

This can be done by hand with (say) an `AtomicIsize`, but it's just
easier to use these functions.
2017-08-28 12:55:53 -07:00
tomaka 42992f1448 Merge pull request #160 from tomaka/fix-publication
Fix publication
2017-08-17 19:03:58 +02:00
Pierre Krieger 31125ef1f0 Fix publication 2017-08-17 18:57:02 +02:00
tomaka b5e87c2c2e Merge pull request #158 from tomaka/0.4.0
Publish 0.4.0
2017-08-17 08:55:54 +02:00
tomaka 69b9ad2483 Publish 0.4.0
Close #157
2017-08-17 08:29:52 +02:00
tomaka f889c8af6e Merge pull request #153 from mkpankov/read-hashmap
Implement reading HashMap
2017-08-16 10:12:18 +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