Lua - How could I edit the Registry?
up vote
1
down vote
favorite
I wanted to know how I could edit the Lua registry?
https://www.lua.org/pil/27.3.1.html
This registry, should include all of the functions, userdata, booleans, and tables.
lua registry
add a comment |
up vote
1
down vote
favorite
I wanted to know how I could edit the Lua registry?
https://www.lua.org/pil/27.3.1.html
This registry, should include all of the functions, userdata, booleans, and tables.
lua registry
1
"I" being who in this case? If you're in a Lua script, you can't touch the registry, period. If you're in C code, then you have complete control over the registry and can do whatever you want with it. So it's not clear what you mean here.
– Nicol Bolas
Nov 11 at 6:34
The registry doesn't store everything, it is a hidden table useful for native code to store references to Lua objects. You don't need it in Lua.
– IllidanS4
Nov 11 at 11:32
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I wanted to know how I could edit the Lua registry?
https://www.lua.org/pil/27.3.1.html
This registry, should include all of the functions, userdata, booleans, and tables.
lua registry
I wanted to know how I could edit the Lua registry?
https://www.lua.org/pil/27.3.1.html
This registry, should include all of the functions, userdata, booleans, and tables.
lua registry
lua registry
asked Nov 11 at 1:59
James
303
303
1
"I" being who in this case? If you're in a Lua script, you can't touch the registry, period. If you're in C code, then you have complete control over the registry and can do whatever you want with it. So it's not clear what you mean here.
– Nicol Bolas
Nov 11 at 6:34
The registry doesn't store everything, it is a hidden table useful for native code to store references to Lua objects. You don't need it in Lua.
– IllidanS4
Nov 11 at 11:32
add a comment |
1
"I" being who in this case? If you're in a Lua script, you can't touch the registry, period. If you're in C code, then you have complete control over the registry and can do whatever you want with it. So it's not clear what you mean here.
– Nicol Bolas
Nov 11 at 6:34
The registry doesn't store everything, it is a hidden table useful for native code to store references to Lua objects. You don't need it in Lua.
– IllidanS4
Nov 11 at 11:32
1
1
"I" being who in this case? If you're in a Lua script, you can't touch the registry, period. If you're in C code, then you have complete control over the registry and can do whatever you want with it. So it's not clear what you mean here.
– Nicol Bolas
Nov 11 at 6:34
"I" being who in this case? If you're in a Lua script, you can't touch the registry, period. If you're in C code, then you have complete control over the registry and can do whatever you want with it. So it's not clear what you mean here.
– Nicol Bolas
Nov 11 at 6:34
The registry doesn't store everything, it is a hidden table useful for native code to store references to Lua objects. You don't need it in Lua.
– IllidanS4
Nov 11 at 11:32
The registry doesn't store everything, it is a hidden table useful for native code to store references to Lua objects. You don't need it in Lua.
– IllidanS4
Nov 11 at 11:32
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Lua registry is just regular Lua table. There just no reference to it from global scope.
You can e.g. use debug.getregistry()
function to get it.
But be sure you know what you are doing.
And of course not all libraries stores its data in registry. Some of them use e.g. upvalues or uservalues to store some internal structure. Also any library can change its internals in any time. And most of them I think didn't expect that their data will be changed outside.
Thanks, I will look into that
– James
Nov 12 at 16:44
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Lua registry is just regular Lua table. There just no reference to it from global scope.
You can e.g. use debug.getregistry()
function to get it.
But be sure you know what you are doing.
And of course not all libraries stores its data in registry. Some of them use e.g. upvalues or uservalues to store some internal structure. Also any library can change its internals in any time. And most of them I think didn't expect that their data will be changed outside.
Thanks, I will look into that
– James
Nov 12 at 16:44
add a comment |
up vote
2
down vote
accepted
Lua registry is just regular Lua table. There just no reference to it from global scope.
You can e.g. use debug.getregistry()
function to get it.
But be sure you know what you are doing.
And of course not all libraries stores its data in registry. Some of them use e.g. upvalues or uservalues to store some internal structure. Also any library can change its internals in any time. And most of them I think didn't expect that their data will be changed outside.
Thanks, I will look into that
– James
Nov 12 at 16:44
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Lua registry is just regular Lua table. There just no reference to it from global scope.
You can e.g. use debug.getregistry()
function to get it.
But be sure you know what you are doing.
And of course not all libraries stores its data in registry. Some of them use e.g. upvalues or uservalues to store some internal structure. Also any library can change its internals in any time. And most of them I think didn't expect that their data will be changed outside.
Lua registry is just regular Lua table. There just no reference to it from global scope.
You can e.g. use debug.getregistry()
function to get it.
But be sure you know what you are doing.
And of course not all libraries stores its data in registry. Some of them use e.g. upvalues or uservalues to store some internal structure. Also any library can change its internals in any time. And most of them I think didn't expect that their data will be changed outside.
answered Nov 11 at 11:14
moteus
1,8961715
1,8961715
Thanks, I will look into that
– James
Nov 12 at 16:44
add a comment |
Thanks, I will look into that
– James
Nov 12 at 16:44
Thanks, I will look into that
– James
Nov 12 at 16:44
Thanks, I will look into that
– James
Nov 12 at 16:44
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245204%2flua-how-could-i-edit-the-registry%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
"I" being who in this case? If you're in a Lua script, you can't touch the registry, period. If you're in C code, then you have complete control over the registry and can do whatever you want with it. So it's not clear what you mean here.
– Nicol Bolas
Nov 11 at 6:34
The registry doesn't store everything, it is a hidden table useful for native code to store references to Lua objects. You don't need it in Lua.
– IllidanS4
Nov 11 at 11:32