Skip to content
Snippets Groups Projects

Stop using metatables with light userdata

Merged James R. requested to merge light-userdata-is-wrong into next

See !583 (merged), !754 (merged) and !1238 (merged). At the time I did not realize that light userdata metatables are not unique to each value. (Recently it was discovered that accessing the skin sprites list would override the metatable of a cvar from CV_FindVar.)

I started using light userdata because Lua CV_RegisterVar would allocate the cvar as userdata, meaning CV_FindVar wouldn't be able to return a reference to any cvar that wasn't registered by Lua. Well, not without making it use LUA_PushUserdata, that's what I did here.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
Please register or sign in to reply
Loading