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

liluat.private.clone_table: added support for cloning cyclical tables… #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jleija
Copy link

@jleija jleija commented Aug 16, 2019

… (and their metatables). Fixes stack overflow error due to recursion.

… (and their metatables). Fixes stack overflow error due to recursion.
@jleija
Copy link
Author

jleija commented Aug 16, 2019

Hi,

I'm trying to use your library for my work-in-progress library: https://github.com/jleija/stencil :)
Sometimes I have tables with values referencing back to higher-level tables (cyclical), and liluat fails with a stack overflow. I found a deepcopy function that does the trick for cyclical tables and adapted it into your code. I hope the solution is in line with your work.
Let me know if you want me to modify the code to match your conventions/standards.

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

1 participant