Improve implementation of LS.getclass and LS.classname, make it more consistent.
This commit is contained in:
@@ -15,15 +15,13 @@
|
||||
// a table and stores it in the global environment. The new table is meant to be
|
||||
// used as a class. Three fields are initially created:
|
||||
//
|
||||
// __class --> the name of the class as a string
|
||||
//
|
||||
// __index --> points back to the class. Makes it convenient to use the
|
||||
// class as a metatable.
|
||||
//
|
||||
// action --> a subtable of additional methods.
|
||||
//
|
||||
// If you invoke 'makeclass' on a class that already exists, the existing table
|
||||
// is "repaired" - the __class and __index fields are restored and the action
|
||||
// is "repaired" - __index field is restored and the action
|
||||
// subtable, if not present, is recreated. If there are already functions or
|
||||
// constants inside the class, they are not affected.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user