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

update to latest mruby #30

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

Conversation

masahino
Copy link

update to latest mruby

mruby/mruby@2f8dbd8

fix #29

@ppibburr
Copy link
Contributor

i find memory issues with extensive use

@ppibburr
Copy link
Contributor

the issues ui is unresponsive for me, sorry bout the repeated posts.

@ppibburr
Copy link
Contributor

CFunc::libcall(CFunc::Void,lib="/usr/lib/i386-linux-gnu/libgobject-2.0.so",:g_type_init)
ptr=CFunc::libcall(CFunc::Pointer,lib="/usr/lib/libgirepository-1.0.so",:g_irepository_get_default)
tl = CFunc::libcall(CFunc::Pointer,lib, :g_irepository_require, ptr, "Gtk", nil);

#
# This does not work
#

# Warns about assertion and returns NULL 
p CFunc::libcall(CFunc::Pointer, lib, :g_irepository_find_by_name, ptr, "Gtk", "Window");

#
# This works
#

ary = CFunc::SInt8[4]
ary[0].value="G".bytes[0]
ary[1].value="t".bytes[0]
ary[2].value="k".bytes[0]
ary[3].value=0

ary2 = CFunc::SInt8[7]
i = -1
"Window".bytes.each do |b|
 ary2[i+=1].value = b
end
ary2[6].value = 0

p CFunc::libcall(CFunc::Pointer, lib, :g_irepository_find_by_name, ptr, ary, ary2);

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.

build fails with latest mruby
2 participants