1. 31 May, 2024 1 commit
    • Stephen Toub's avatar
      Fix finalizability of Lua instances (#531) · 012d69a7
      Stephen Toub authored
      * Fix finalizability of Lua instances
      
      Lua instances end up being permanently rooted until Dispose is explicitly called, because the ctor roots the Lua instance into a static singleton of ObjectTranslatorPool. This fixes it by replacing the ConcurrentDictionary with a ConditionalWeakTable, in order to avoid the pool keeping a strong reference to the LuaState / Lua objects.
      
      * Try an alternate approach
      
      Instead of having the ObjectTranslatorPool store weak references, which means LuaState objects might get collected when still referenced by native code, have the ObjectTranslator store a weak rather than strong reference to the Lua object, which is what has the finalizer.
      
      * Disable test on mono
      012d69a7
  2. 28 Jan, 2024 1 commit
  3. 19 May, 2023 1 commit
    • dcronqvist's avatar
      Add LuaMemberAttribute (#489) · 9026d802
      dcronqvist authored
      * Registering functions now only register 1 global, fix #480
      
      * Changed `is not null` to `!= null` for backwards compatibility
      
      * Use `IsSubclassOf` instead of newer `IsAssignableTo`
      
      * Explicit type for anonymous function in unit test, for pre-C#10 compatibility
      
      * Only include test on `NETCOREAPP3_1_OR_GREATER`, added comment for test as well
      
      * Removed `NETCOREAPP3_1_OR_GREATER` check because it is unnecessary
      
      * Add LuaMemberAttribute, allows registered name in Lua to be different from C#, closes #488
      
      * Explicit typing fix
      
      * Tests use IEnumerable<T>.Contains to check for existence instead
      9026d802
  4. 15 Mar, 2023 1 commit
    • dcronqvist's avatar
      Registering functions now only register 1 global, fix #480 (#481) · 9df4990c
      dcronqvist authored
      * Registering functions now only register 1 global, fix #480
      
      * Changed `is not null` to `!= null` for backwards compatibility
      
      * Use `IsSubclassOf` instead of newer `IsAssignableTo`
      
      * Explicit type for anonymous function in unit test, for pre-C#10 compatibility
      
      * Only include test on `NETCOREAPP3_1_OR_GREATER`, added comment for test as well
      
      * Removed `NETCOREAPP3_1_OR_GREATER` check because it is unnecessary
      9df4990c
  5. 04 Feb, 2023 1 commit
  6. 31 Jan, 2023 1 commit
  7. 26 Nov, 2022 2 commits
  8. 09 Nov, 2021 1 commit
    • MegaPiggy's avatar
      Add threads and allow userdata pushing. (#443) · 151e59f9
      MegaPiggy authored
      * Added Threads
      
      * Allowed userdata to be pushed.
      
      * Added a few more methods
      
      XMove: Exchange values between different threads of the same state (i.e. threads and interpreters).
      
      NewThread: basically just coroutine.create
      
      Reset: removes function from the thread
      
      * Added Thread Test
      
      * Added UserData Test.
      
      * remove optional index
      
      * Add thread properties
      
      * Added Operators & Overrides
      
      * Added 2 more methods
      
      * improve
      
      * Add thread equality test
      
      * Remove hash code override that I added.
      
      Added this earlier. I realized it shouldn't have been because LuaBase returns reference here.
      
      * Add base hash code
      
      * base equals
      151e59f9
  9. 05 Oct, 2021 1 commit
  10. 09 Sep, 2021 1 commit
  11. 11 May, 2021 1 commit
  12. 21 Oct, 2020 1 commit
  13. 10 May, 2020 1 commit
  14. 03 May, 2020 2 commits
  15. 19 Apr, 2020 4 commits
  16. 24 Feb, 2020 1 commit
    • Vinicius Jarina's avatar
      Fixed #355 new Guid · 35dcffb0
      Vinicius Jarina authored
      * Guid has a lot of ctor overload, the `byte[]` was being used instead the `string`.
      Reorder ctor info before trying to match the parameters.
      35dcffb0
  17. 18 Jan, 2020 1 commit
  18. 13 Dec, 2019 1 commit
  19. 11 Dec, 2019 1 commit
  20. 02 Dec, 2019 1 commit
  21. 18 Oct, 2019 1 commit
  22. 14 Sep, 2019 2 commits
  23. 11 Sep, 2019 1 commit
  24. 23 Aug, 2019 3 commits
  25. 22 Aug, 2019 3 commits
  26. 21 Aug, 2019 1 commit
    • Vinicius Jarina's avatar
      * Fixed array index (#317) · a6721a31
      Vinicius Jarina authored
      * Cache invalid method call
      * Fixed array of byte, sbyte, uint, ulong, short, ushort
      * Fixed explicity interface calling.
      a6721a31
  27. 27 Jul, 2019 1 commit
  28. 26 Jul, 2019 1 commit
  29. 30 Mar, 2019 1 commit
  30. 29 Mar, 2019 1 commit
    • Vinicius Jarina's avatar
      Lua integer support (#290) · e51e3598
      Vinicius Jarina authored
      * Added support to Lua integers.
      
      * Operator [] and `GetNumber` will still return the `double` regardless of the value for backward compatibility
      LuaTable.GetObject may have breaks if your code is assuming the value will be always a double boxed.
      To get long from Lua object use `GetLong` and to get an integer `GetInteger`.
      e51e3598