Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add metamethods for bitwise operators and remove `__gc`

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, lua
Domain
compilers

Research direction

Start with the linked Lua ltm.c reference around line 43, then locate the corresponding metamethod implementation in this repository. Verify the bitwise metamethod names, including the bshr spelling in the issue, and remove __gc; done means the operators are supported and __gc is no longer recognized.

Written by the indexing model from the issue text.

Description

GPG added metamethods for bitwise operators which I didn't do when I added them. The methods are called

"__band", "__bor", "__bshl", "bshr"

They also removed the __gc metamethod.

For inspiration only, the implementation here should not necessarily be taken as a reference.
https://github.com/lua/lua/blob/75ea9ccbea7c4886f30da147fb67b693b2624c26/ltm.c#L43

Dominant language
C
Stars
1
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FAForever/lua-lang

All issues in FAForever/lua-lang

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.