Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API issue #4

Open
EngineerCoding opened this issue Mar 18, 2014 · 3 comments
Open

API issue #4

EngineerCoding opened this issue Mar 18, 2014 · 3 comments

Comments

@EngineerCoding
Copy link

Hey,

Im not sure on how many API's this really applies, but there is a bug with the string API.
Do the following:

function string:test() print( self ) end
("random"):test()

This works on CC, but not in CCLite. Im assuming you are proxying the string table or any API in that matter, but you shouldnt do that.

@gamax92
Copy link
Collaborator

gamax92 commented Apr 5, 2014

Realistically, that can only be fixed in the single computer version.

I don't know how modifying the string table gets to the strings, it doesn't have a metatable on it or anything.
Making it so that the emulated environment uses the real string table poses a problem in the multiple computers version, where each computer would share the same string api.

@EngineerCoding
Copy link
Author

Why don't you use setfenv to use some sort of proxy to the string api for each computer? I don't know the internals of ccemu, but it should be possible :p

@gamax92
Copy link
Collaborator

gamax92 commented Apr 7, 2014

Well, basically, each time the computer "starts", it gets a new api set. The math, table, coroutine, string apis get copied into a new table to prevent:

  1. Modifications of said table persisting after shutdown/reboot
  2. Crashing CCLite by changing some function that it uses

As to how I'd do a proxy, not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants