Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: meta:set_int() does not specify range. #13531

Closed
BluebirdGreycoat opened this issue May 26, 2023 · 2 comments · Fixed by #13855
Closed

Documentation: meta:set_int() does not specify range. #13531

BluebirdGreycoat opened this issue May 26, 2023 · 2 comments · Fixed by #13855
Labels
@ Documentation Feature request Issues that request the addition or enhancement of a feature good first issue

Comments

@BluebirdGreycoat
Copy link
Contributor

Problem

So I was coding, and typed out meta:set_int("time", os.time()). And suddenly I realized that A) os.time() is a huge number, and B) meta:set_int() doesn't document its min/max contiguous integer range.

Solutions

Need documentation, please. Mainly so that there's a promise that the range won't be smallered at some future date.

Alternatives

Could store os.time() in a string. I've done that, too.

Additional context

Bleh, leaving this empty.

@BluebirdGreycoat BluebirdGreycoat added the Feature request Issues that request the addition or enhancement of a feature label May 26, 2023
@sfan5
Copy link
Member

sfan5 commented May 26, 2023

And suddenly I realized that A) os.time() is a huge number

I don't think 32-bit numbers pass as huge in the computing world. Either way, this should be documented.

@rvenson
Copy link
Contributor

rvenson commented Sep 28, 2023

According to the code, the set_int function already converts the integer to a string (and the string to an integer in the get_int equivalent). So we can assume that the range is system-dependent (usually 32 bits).

The same for the set_float function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Documentation Feature request Issues that request the addition or enhancement of a feature good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants