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. 15 Mar, 2023 2 commits
    • 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
    • Vinicius Jarina's avatar
      Fix build (#483) · 9544136c
      Vinicius Jarina authored
      * Fixing build
      
      * Bump Source.Link 1.1.1
      9544136c
  4. 26 Nov, 2022 1 commit
  5. 11 Nov, 2021 2 commits
  6. 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
  7. 18 Oct, 2020 1 commit
  8. 03 May, 2020 1 commit
  9. 19 Apr, 2020 2 commits
    • Vinicius Jarina's avatar
    • Thomas Nind's avatar
      Use configurable MaximumRecursion (#368) · 7ff6e7c5
      Thomas Nind authored
      * Made RegisterGlobal maximum recursion level user configurable
      
      * Added test for MaximumRecursion field
      
      * Added reference to System.Data
      
      * Revert "Added test for MaximumRecursion field"
      
      This reverts commit d04299638765cdb73111a61288b7654ef51781ec.
      
      * Re added test (after fixing accidental whitespace changes)
      
      * Revert "Added reference to System.Data"
      
      This reverts commit 3e8838383a8d4f3e883bd3209614060fc1c755d1.
      
      * Changed TestMaximumRecursion to use NLuaTest.TestTypes.TestClass
      
      * Fix for NUnitLite not having `Greater` assertion
      7ff6e7c5
  10. 18 Jan, 2020 1 commit
  11. 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
  12. 13 Feb, 2019 1 commit
  13. 10 Feb, 2019 2 commits
  14. 09 Feb, 2019 3 commits
  15. 08 Feb, 2019 1 commit
    • Vinicius Jarina's avatar
      WIP cleanup (#275) · 5e9a190a
      Vinicius Jarina authored
      * WIP cleanup
      
      * Trying fixing iPhoneSimTests.
      
      * More cleanups
      
      * Minified initLua loadCLRpackage
      5e9a190a
  16. 30 Jan, 2019 1 commit
  17. 28 Jan, 2019 1 commit
    • Vinicius Jarina's avatar
      * Giant cleanup/reshuffle of all files. (#265) · 1cc74393
      Vinicius Jarina authored
      * * Giant cleanup/reshuffle of all files.
      
      * * Update upstream `KeraLua` to `0.1.14`
      
      * Fixed .NET Core build.
      
      * Add runsettings file
      
      * * Fixed nuspec `dependencies` node
      
      * Ignore _ in branch names for package names.
      
      * * Fixed nuspec.
      1cc74393