damien/cc-scripts — pull request #3 by eric-wieser (2012-12-14 20:12:28+00:00)
Title: Overrides the built in API functionality

An improved API loader that doesn't break closures, that replaces the builtin one

This allows APIs to declare properties and modify their own metatable, since
instead of copying members from the function environment to the API object,
it actually uses the same table for both.

Simply add `os.loadAPI('betterAPI')` to the top of your main script to make
this work (including it in the api itself is too late).

This should maybe be added in a startup script or something.

I use this for a `turtle.position` property in some other code.