[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: computing the hashcode of lua objects in a program
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 28 Apr 2021 10:25:03 -0300
> > Lua 5.4.2 Copyright (C) 1994-2020 Lua.org, PUC-Rio
> > > string.format("%p", print)
> > 0x5626ad9b2709
> > > print(print)
> > function: 0x5626ad9b2709
> On my Windows 10 these addresses are output without 0x. Why is it different?
Lua uses C's 'printf' to do this formatting. C has no rules about how it
does that. By the book, it does not even has to be a number. All the
standard says is this:
The value of the pointer is converted to a sequence of printing
characters, in an implementation-defined manner.