SeanOMik
54c9926a04
fix seg fault caused by garbage collection of `ClosureData`s
...
If the `ClosureData`s are freed on `lua_closed`, the references to the State they may have could become invalid. This was fixed by storing a StatePtr inside LuaRef's instead of a reference
2024-02-29 19:30:56 -05:00
SeanOMik
feb93f2b4e
teal: add documentation for types, fields, and functions
ci/woodpecker/push/debug Pipeline was successful
Details
2024-02-28 20:00:13 -05:00
SeanOMik
4c1a1588c5
Add optional support for teal
2024-02-28 18:39:15 -05:00
SeanOMik
936ea60634
Implement As/FromLua for Option<T>
2024-02-25 20:49:05 -05:00
SeanOMik
beea6c33fc
Implement methods for iterating through a Table
2024-02-25 17:05:16 -05:00
SeanOMik
70e2985cc4
helper Error::bad_arg method
2024-02-23 16:24:53 -05:00
SeanOMik
22b6d218bd
Implement FromLuaVec for bool, add AnyUserdata::is for checking userdata type
ci/woodpecker/push/debug Pipeline was successful
Details
2024-02-19 23:12:02 -05:00
SeanOMik
d32c138e99
Implement lua types for usize, make userdata field setter and getters return results
ci/woodpecker/push/debug Pipeline was successful
Details
2024-02-19 17:57:19 -05:00
SeanOMik
9b542fb523
Fix some warnings
2024-02-18 23:25:04 -05:00
SeanOMik
2fe5dca6c4
Fix `Userdata::execute_function/method()`
...
The two methods weren't using __index to try to find the function on the userdata
2024-02-17 19:07:22 -05:00
SeanOMik
8b88612890
Remove debugging print stacks from function
ci/woodpecker/push/debug Pipeline was successful
Details
2024-02-17 14:30:10 -05:00
SeanOMik
35bd889b48
Fix lots of bugs, add thread placeholder type, fix ValueVec when used in tuples, much more
2024-02-17 14:24:58 -05:00
SeanOMik
5694d395ab
Fix test Vec2 compile error
ci/woodpecker/push/debug Pipeline was successful
Details
2024-02-12 20:35:17 -05:00
SeanOMik
8aec55c2d6
Fix userdata methods, and Table::has_key, add Variadic<T>
...
Userdata methdos were always returning BadArgument errors with mismatching argument counts. Table::has_key was returning true even when the key didn't exist
2024-02-12 20:30:14 -05:00
SeanOMik
c0f74c169c
Fix ci
2024-02-11 10:09:23 -05:00
SeanOMik
b0902967d1
Code cleanup
2024-02-11 09:59:28 -05:00
SeanOMik
6e787af0f0
Update readme
ci/woodpecker/manual/debug Pipeline failed
Details
2024-02-11 09:46:19 -05:00
SeanOMik
c7a86c04ab
Change name of library, add readme, add woodpecker ci
2024-02-11 09:43:30 -05:00
SeanOMik
d4130c1995
Add some utility methods to Value
2024-02-10 22:55:05 -05:00
SeanOMik
845ddd4f80
Create a helper Proxy struct for retriving proxied types as function arguments
2024-02-10 22:32:50 -05:00
SeanOMik
7dc4380d5c
Create TableProxy trait and some table tests
2024-02-10 21:00:58 -05:00
SeanOMik
bed5091ecd
Implement all methods for controlling the Lua GC, and some code cleanup
2024-02-10 17:04:09 -05:00
SeanOMik
25f4116278
Create UserdataRefMut, create tests for UserdataRef and UserdataRefMut
2024-02-10 14:48:03 -05:00
SeanOMik
80b9a4ef35
Code cleanup, separate things to other source files
2024-02-10 12:10:44 -05:00
SeanOMik
ab99ff3c31
fix some significant undefined behavior caused by double dropping userdata
2024-02-10 00:17:26 -05:00
SeanOMik
03e81f5553
make it possible to provide references of rust types to lua
2024-02-06 09:23:32 -05:00
SeanOMik
6c9798eb5b
A bit of code cleanup
2024-01-29 19:44:11 -05:00
SeanOMik
eebb93a9a6
Store userdata pointers as RefCells to avoid multiple mutable borrows at once
2024-01-29 11:03:49 -05:00
SeanOMik
a3dbe82613
unref LuaRefs when they are dropped
2024-01-29 10:38:46 -05:00
SeanOMik
fcc33d4607
Write __gc metamethods for userdata, fix other memory leaks, add Table::{has_key, raw_has_key}
2024-01-28 22:37:06 -05:00
SeanOMik
f3c0dc1930
Create a chunk struct, replace the traits created for Function with FromLua, ToLua, FromLuaVec, etc.
2024-01-28 20:02:12 -05:00
SeanOMik
2848d1deee
Implement an error handler that collects the stacktrace
2024-01-28 13:32:08 -05:00
SeanOMik
c6f2d303e2
Improve error message for meta methods on userdata
2024-01-28 11:27:52 -05:00
SeanOMik
716b54797d
Improve error messages when collecting function arguments for execution
2024-01-28 11:26:30 -05:00
SeanOMik
bb692951db
Let mutable userdata references in functions
2024-01-27 16:01:50 -05:00
SeanOMik
044b08a10e
Add UserDataProxy
2024-01-27 15:53:34 -05:00
SeanOMik
a8db62fe08
Add meta methods, methods, functions, and field setters to UserData
2024-01-27 14:54:11 -05:00
SeanOMik
9ef4203619
make it so a Table can only be a normal table, or a metatable, not both at the same time
2024-01-27 11:00:02 -05:00
SeanOMik
2b03b55014
Groundwork for userdata
...
Still need a way to add methods and functions
2024-01-26 15:43:26 -05:00
SeanOMik
71199bc905
Implement calling rust functions from lua, make the Table struct support metatables
2024-01-25 23:47:30 -05:00
SeanOMik
19ee453172
Fix Table::raw_len
2024-01-23 20:31:51 -05:00
SeanOMik
6a0393f346
Add Table::raw*
2024-01-23 20:28:19 -05:00
SeanOMik
3d61349bf7
Initial commit, tables, functions
2024-01-21 22:53:53 -05:00