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

Core ink fix: callstack used for external function #52

Closed
wants to merge 1 commit into from

Conversation

joningold
Copy link
Contributor

When running a function using "story.EvaluateFunction", the ink caches the old callstack and makes a new one until the function evalutation is complete. However, the VariablesState object holds a pointer to the callstack which it uses for creating temporary variables.

This fix updates the VariablesState objects callstack when the function evaluation begins, and resets it once complete.

(Matches main ink repo commit 7477026cf35ee06fa93eee194e01bf03fe94c9a8)

When running a function using "story.EvaluateFunction", the ink caches the old callstack and makes a new one until the function evalutation is complete. However, the VariablesState object holds a pointer to the callstack which it uses for creating temporary variables. 

This fix updates the VariablesState objects callstack when the function evaluation begins, and resets it once complete. 

(Matches main ink repo commit 7477026cf35ee06fa93eee194e01bf03fe94c9a8)
@y-lohse
Copy link
Owner

y-lohse commented Jan 28, 2017

Thanks!
If I'm not mistaken, this change happened after ink 0.7.0 and is not officially out yet, right? If so I'll wait to merge this PR until it's part of a published ink version, or I'll end up being all confused :D

@joningold
Copy link
Contributor Author

joningold commented Jan 28, 2017 via email

@y-lohse y-lohse self-assigned this Mar 7, 2017
@y-lohse
Copy link
Owner

y-lohse commented Mar 20, 2017

Looks like we merged that one in #53!

@y-lohse y-lohse closed this Mar 20, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants