CC: Tweaked

CC: Tweaked

57M Downloads

os.queueEvent/os.pullEvent do not keep table pointers

fatboychummy opened this issue ยท 1 comments

commented

Useful information to include:

  • Minecraft version: 1.16.4
  • CC: Tweaked version: 1.95.3

Expected

When you pass a specific table to queueEvent, you should end up with the same table (as a pointer) in pullEvent.

Actual

When you pass a specific table to queueEvent, you get a clone of the object when you pullEvent

Reproduction steps

local tbl = {}

os.queueEvent("some_event", tbl)

local _, tbl2 = os.pullEvent("some_event")

print(tbl == tbl2)
  1. Run the above code inside of CC.
  2. Observe when it prints false.
commented

This is working as expected.