<commit_before>#!/usr/bin/env seed
// Returns: 0
// STDIN:
// STDOUT:5
// STDERR:

Seed.import_namespace("Gtk");
Gtk.init(null, null);

HelloWindow = new GType({       
    parent: Gtk.Window.type,
    name: "HelloWindow",
    class_init: function(klass, prototype)
    {
        var HelloSignalDefinition = {name: "hello",
                                     parameters: [GObject.TYPE_INT],
                                     return_type: GObject.TYPE_VALUE};

        hello_signal_id = klass.install_signal(HelloSignalDefinition);
    }
});

w = new HelloWindow();

w.signal.hello.connect(function(object, number, string)
                       {
                           return 5;
                       });

Seed.print(w.signal.hello.emit(2));
<commit_msg>Still segfaulting. One fault is in Seed.print, the other one will need to wait for me to get to a machine with a WebKit debug build.<commit_after>#!/usr/bin/env seed
// Returns: 0
// STDIN:
// STDOUT:5
// STDERR:

Seed.import_namespace("Gtk");
Gtk.init(null, null);

HelloWindow = new GType({       
    parent: Gtk.Window.type,
    name: "HelloWindow",
    class_init: function(klass, prototype)
    {
        var HelloSignalDefinition = {name: "hello",
                                     parameters: [GObject.TYPE_INT],
                                     return_type: GObject.TYPE_VALUE};

        hello_signal_id = klass.install_signal(HelloSignalDefinition);
    }
});

w = new HelloWindow();

w.signal.hello.connect(function(object, number, string)
                       {
                       	   //return number; // Neither of these work
                           return [GObject.TYPE_INT, 5];
                       });

// Seed.print dies if you try to print a GValue, or something...
Seed.print(w.signal.hello.emit(2));
//w.signal.hello.emit(2);
{'fraction_non_alphanumeric': 0.12144420131291028, 'fraction_numerical': 0.004923413566739606, 'mean_word_length': 1.8667711598746082, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3818631', 'n_tokens_mistral': 556, 'n_tokens_neox': 536, 'n_words': 122}