Skip to content

get GI generation script running and fix argument order in @GType_decl #582

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gen/gi_gen_consts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function write_gtk_consts(fn)
gtk = GINamespace(:Gtk,"$version.0")
gtk_exclude = ["STOCK_", "STYLE_", "PRINT_SETTINGS_"]
for (name,val) in GI.get_consts(gtk)
if !any([beginswith(string(name),prefix) for prefix in gtk_exclude])
if !any([startswith(string(name),prefix) for prefix in gtk_exclude])
push!(exprs, const_expr("GTK_$name",val))
end
end
Expand All @@ -60,7 +60,7 @@ function write_gtk_consts(fn)
gdk = GINamespace(:Gdk)
#Key names could go into a Dict/submodule or something
for (name,val) in GI.get_consts(gdk)
if !beginswith(string(name),"KEY_")
if !startswith(string(name),"KEY_")
push!(exprs, const_expr("GDK_$name",val))
end
end
Expand All @@ -84,6 +84,6 @@ function write_gtk_consts(fn)
end
end

version = (length(ARGS) > 0) ? int(ARGS[1]) : 3
version = (length(ARGS) > 0) ? parse(Int,ARGS[1]) : 3

write_gtk_consts("gconsts$version", version)
write_gtk_consts("gconsts$version")
2 changes: 1 addition & 1 deletion src/GLib/gtype.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function get_type_decl(name, iname, gtyp, gtype_decl, cm)
end

macro Gtype_decl(name, gtyp, gtype_decl)
get_type_decl(name, Symbol(string(name, __module__.suffix)), gtyp, gtype_decl, __module__)
get_type_decl(Symbol(string(name, __module__.suffix)), name, gtyp, gtype_decl, __module__)
end

macro Gtype(iname, lib, symname)
Expand Down