From 62d0add1ec396dffae114545fc0427efc6c7153a Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 21 Mar 2025 10:39:56 +0100 Subject: all: nomem updates Signed-off-by: Drew DeVault --- cmd/demo/main.ha | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cmd/demo/main.ha') diff --git a/cmd/demo/main.ha b/cmd/demo/main.ha index af7c60c..8f9151b 100644 --- a/cmd/demo/main.ha +++ b/cmd/demo/main.ha @@ -9,7 +9,7 @@ use types::c; fn about_clicked(btn: *gtk::Button, data: *opaque) void = { let dialog = gtk::about_dialog_new(): *gtk::AboutDialog; const authors: []*c::char = [ - c::fromstr("Harriet?"), + c::nulstr("Harriet?\0"), null: *c::char, ]; gtk::about_dialog_set_license_type( @@ -22,7 +22,7 @@ fn about_clicked(btn: *gtk::Button, data: *opaque) void = { ); gtk::about_dialog_set_website( dialog, - c::fromstr("https://git.sr.ht/~yerinalexey/hare-gi"), + c::nulstr("https://git.sr.ht/~yerinalexey/hare-gi\0"), ); gtk::widget_show_all(dialog); }; @@ -30,11 +30,11 @@ fn about_clicked(btn: *gtk::Button, data: *opaque) void = { fn activate(app: *gio::Application, data: *opaque) void = { const app = app: *gtk::Application; - let button = gtk::button_new_with_label(c::fromstr("About")): *gtk::Button; + let button = gtk::button_new_with_label(c::nulstr("About\0")): *gtk::Button; gtk::button_connect_clicked(button, &about_clicked, null); let headerbar = gtk::header_bar_new(): *gtk::HeaderBar; - gtk::header_bar_set_title(headerbar, c::fromstr("hare-gi demo")); + gtk::header_bar_set_title(headerbar, c::nulstr("hare-gi demo\0")); gtk::header_bar_set_show_close_button(headerbar, glib::TRUE); gtk::header_bar_pack_end(headerbar, button); @@ -45,7 +45,7 @@ fn activate(app: *gio::Application, data: *opaque) void = { export fn main() void = { let app = gtk::application_new( - c::fromstr("hare_gi.example"), + c::nulstr("hare_gi.example\0"), gio::ApplicationFlags::FLAGS_NONE, ): *gtk::Application; gio::application_connect_activate(app, &activate, null); -- cgit 1.3.0-6-gf8a5