[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: lstrlib.c initialization - why createmetatable?
- From: Ralph Hempel <rhempel@...>
- Date: Sun, 18 Apr 2010 09:11:21 -0400
OK, I've been breaking my head for hours on this and
cannot see the purpose of the createmetatable() call
The reason I'm fooling around in this code is an attempt
to make even the standard libraries unloadable to save
precious RAM in my pbLua for the LEGO MINDSTORMS NXT.
I've had to modify my main() to create the _LOADED registry
table with weak values so that when a particular library
like "table" is set to nil, the table can be garbage collected.
But string eludes me.
So, long story short, if someone can explain to me what's going
on then the string library is created, I'd appreciate it :-)