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

Ren c ffi #62

Merged
merged 5 commits into from
Aug 25, 2015
Merged

Ren c ffi #62

merged 5 commits into from
Aug 25, 2015

Conversation

zsx
Copy link

@zsx zsx commented Aug 25, 2015

This series makes gtk-demo.r runnable again.

MKS_LOCK flag might not be necessary, as it can be set after being created. But it's convenient, and it conceptually makes sense to lock down the series while it's being created.

Don't see why zero-sized series should be requested, which usually
indicates an error.

Also because we might eventually call "malloc" to allocate memory, whose
behivor on zero-sized allocation is implementation dependant. We better
disallow it here.

http://stackoverflow.com/questions/2022335/whats-the-point-in-malloc0
Call_Routine could run GC, which could have GC'ed args
As pointed out by @HostilFork, saving out form Do_* in an expandable
series is unsafe: the pointer could become dangling if it expands.
Because we don't [UN]SAVE_VALUE, use a length of 1 series for this
purpose. MKS_LOCK is not necessary here, as it's clear that this series
is not expanded, but in general, it should be used for series used for
this purpose.

The Data_Stack usage in callback_dispatcher should be fine. But, for
consistency, it's also changed.
@hostilefork hostilefork merged commit bea831a into metaeducation:master Aug 25, 2015
@zsx zsx deleted the ren-c-ffi branch March 14, 2016 17:46
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