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

Already on GitHub? Sign in to your account

Imported curses ext for 1.9 #2193

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Member

hosiawak commented Mar 7, 2013

Only 1.9 mode for now because 2.0 needs rb_thread_call_without_gvl implementing first in C-API

Owner

dbussink commented Mar 9, 2013

Do you think you could update it with the 1.8 and 2.0 versions as discussed on irc?

Member

hosiawak commented Mar 10, 2013

@dbussink I started working on this but it turns out we need a bunch of C-API functions defined for the 2.0 mode:

rb_thread_call_without_gvl
TypedData_Make_Struct
TypedData_Get_Struct
rb_data_typed_object_alloc

For 1.8 mode
rb_read_check

(the list is probably not complete to make it compile in 1.8 and 2.0).
I started implementing TypedData_ in RBX C-API but quickly found that I don't know what I'm doing because the GC related internals of MRI/RBX are unfamiliar to me.

Feel free to close this one (or merge if you think having 1.9 only curses is better than having no curses).
Alternatively I could look at implementing curses as FFI ?

Owner

brixen commented Mar 18, 2013

@hosiawak I will try to get standard lib gemified this week. Then you can add a gem for this.

As for the C-API methods needed, I've just replaced use of eg TypedData_Make_Struct with the pre-1.9 versions with no problem. Very few C-exts outside of MRI's own code use this new API.

Owner

brixen commented Sep 15, 2013

This is now a gem: https://github.com/rubysl/rubysl-curses

Since I'll be merging the compiler branch shortly and that uses the standard library gems, closing this.

@brixen brixen closed this Sep 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment