]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Do not use `weak' modifier where it is not applicable
authorJürg Billeter <j@bitron.ch>
Sat, 20 Mar 2010 10:31:04 +0000 (11:31 +0100)
committerJürg Billeter <j@bitron.ch>
Sat, 20 Mar 2010 10:31:04 +0000 (11:31 +0100)
27 files changed:
vala/valagenietokentype.vala
vala/valamarkupreader.vala
vala/valatokentype.vala
vapi/alsa.vapi
vapi/cairo.vapi
vapi/curses.vapi
vapi/dbus-glib-1.vapi
vapi/enchant.vapi
vapi/glib-2.0.vapi
vapi/gmodule-2.0.vapi
vapi/gobject-2.0.vapi
vapi/gsl.vapi
vapi/gtkmozembed.vapi
vapi/libdaemon.vapi
vapi/libnl-1.vapi
vapi/libnl-2.0.vapi
vapi/libxml-2.0.vapi
vapi/mysql.vapi
vapi/posix.vapi
vapi/raptor.vapi
vapi/rasqal.vapi
vapi/readline.vapi
vapi/sdl-net.vapi
vapi/sqlite3.vapi
vapi/tiff.vapi
vapi/x11.vapi
vapi/zlib.vapi

index 8252b10a7e8012be92423272c3f367d836436e8b..a17807a23726a306ff3aba0d1f784c9f2a7508aa 100644 (file)
@@ -165,7 +165,7 @@ public enum Vala.Genie.TokenType {
        WRITEONLY,
        YIELD;
 
-       public weak string to_string () {
+       public unowned string to_string () {
                switch (this) {
                case ABSTRACT: return "`abstract'";
                case ARRAY: return "`array'";
index 9d495e5b83ea2df76e53761620c7810771fd642f..7d40397f89a1c451fe9b0918d2034794b990aab9 100644 (file)
@@ -227,7 +227,7 @@ public enum Vala.MarkupTokenType {
        TEXT,
        EOF;
 
-       public weak string to_string () {
+       public unowned string to_string () {
                switch (this) {
                case START_ELEMENT: return "start element";
                case END_ELEMENT: return "end element";
index 61b485958f435275633e26212edaa9528ab7259b..88b876708b9378a94ca6948828bfb485369a8ea4 100644 (file)
@@ -150,7 +150,7 @@ public enum Vala.TokenType {
        WHILE,
        YIELD;
 
-       public weak string to_string () {
+       public unowned string to_string () {
                switch (this) {
                case ABSTRACT: return "`abstract'";
                case AS: return "`as'";
index 403a1f868e27fa3ff2052034dc4f1d92acb4d200..ede0bb768874aa6fbf6104278712f6e38350269f 100644 (file)
@@ -21,7 +21,7 @@
 [CCode (lower_case_cprefix = "snd_", cheader_filename = "alsa/asoundlib.h")]
 namespace Alsa {
 
-    public weak string strerror (int error);
+    public unowned string strerror (int error);
 
     [CCode (cname = "snd_aes_iec958_t", destroy_function = "")]
     public struct AesIec958
@@ -47,11 +47,11 @@ namespace Alsa {
         [CCode (cname = "snd_ctl_card_info_malloc")]
         public static int alloc (out CardInfo info);
 
-        public weak string get_id();
-        public weak string get_longname();
+        public unowned string get_id();
+        public unowned string get_longname();
 
-        public weak string get_mixername();
-        public weak string get_components();
+        public unowned string get_mixername();
+        public unowned string get_components();
     }
 
     [Compact]
@@ -74,7 +74,7 @@ namespace Alsa {
         [CCode (cname = "snd_ctl_elem_id_malloc")]
         public static int alloc (out ElemId eid);
 
-        public weak string get_name();
+        public unowned string get_name();
         public uint get_numid();
         public uint get_index();
         public uint get_device();
@@ -190,7 +190,7 @@ namespace Alsa {
         [CCode (cname = "snd_mixer_selem_id_malloc")]
         public static int alloc (out SimpleElementId eid);
 
-        public weak string get_name();
+        public unowned string get_name();
         public uint get_index();
     }
 
index 586667b1d99034b7b868be1f0f978fc6c042c6f9..042c070f09def68e9cf5cb3d4f2220c44842aa1a 100644 (file)
@@ -31,18 +31,18 @@ namespace Cairo {
                public void save ();
                public void restore ();
                
-               public weak Surface get_target ();
+               public unowned Surface get_target ();
                public void push_group ();
                public void push_group_with_content (Content content);
                public Pattern pop_group ();
                public void pop_group_to_source ();
-               public weak Surface get_group_target ();
+               public unowned Surface get_group_target ();
                
                public void set_source_rgb (double red, double green, double blue);
                public void set_source_rgba (double red, double green, double blue, double alpha);
                public void set_source (Pattern source);
                public void set_source_surface (Surface surface, double x, double y);
-               public weak Pattern get_source ();
+               public unowned Pattern get_source ();
 
                public void set_matrix (Matrix matrix);
                public void get_matrix (out Matrix matrix);
@@ -145,7 +145,7 @@ namespace Cairo {
                public void show_text (string utf8);
                public void show_glyphs (Glyph[] glyphs);
                
-               public weak FontFace get_font_face ();
+               public unowned FontFace get_font_face ();
                public void font_extents (out FontExtents extents);
                public void set_font_face (FontFace font_face);
                public void set_scaled_font (ScaledFont font);
@@ -330,7 +330,7 @@ namespace Cairo {
                public void extents (out FontExtents extents);
                public void text_extents (string utf8, out TextExtents extents);
                public void glyph_extents (Glyph[] glyphs, out TextExtents extents);
-               public weak FontFace get_font_face ();
+               public unowned FontFace get_font_face ();
                public void get_font_options (out FontOptions options);
                public void get_font_matrix (out Matrix font_matrix);
                public void get_ctm (out Matrix ctm);
@@ -460,7 +460,7 @@ namespace Cairo {
                [CCode (cname = "cairo_image_surface_create_for_data")]
                public ImageSurface.for_data ([CCode (array_length = false)] uchar[] data, Format format, int width, int height, int stride);
                [CCode (array_length = false)]
-               public weak uchar[] get_data ();
+               public unowned uchar[] get_data ();
                public Format get_format ();
                public int get_width ();
                public int get_height ();
@@ -586,5 +586,5 @@ namespace Cairo {
        }
        
        public int version ();
-       public weak string version_string ();
+       public unowned string version_string ();
 }
index 7bddc56d12290498ca59a0cd5bd34c953c7419a7..6bf0fafb1425a3fa8665dbd4f191779de870b2a3 100644 (file)
@@ -266,7 +266,7 @@ namespace Curses {
        public class Screen {
                [CCode (cname = "newterm")]
                public Screen(string str, GLib.FileStream outfd, GLib.FileStream infd);
-               public weak Screen set_term();
+               public unowned Screen set_term();
        }
 
        public int addch(ulong ch);
@@ -321,7 +321,7 @@ namespace Curses {
        public ulong inch();
        public int inchnstr([CCode (array_length = false)] ulong[] chstr, int n);
        public int inchstr([CCode (array_length = false)] ulong[] chstr);
-       public weak Window initscr();
+       public unowned Window initscr();
        public int init_color(short color, short r, short g, short b);
        public int init_pair(short pair, Color f, Color b);
        public int innstr(string str, int n);
index f0f1ae79b36c9143904a49eebecc8016055cda75..16536bd3710e34d6906f5ed3971ded551129aabe 100644 (file)
@@ -235,7 +235,7 @@ namespace DBus {
                [CCode (cname = "dbus_g_connection_register_g_object")]
                public void register_object (string at_path, GLib.Object object);
                [CCode (cname = "dbus_g_connection_lookup_g_object")]
-               public weak GLib.Object lookup_object (string at_path);
+               public unowned GLib.Object lookup_object (string at_path);
                [CCode (cname = "dbus_g_connection_get_connection")]
                public RawConnection get_connection ();
        }
@@ -243,12 +243,12 @@ namespace DBus {
        [CCode (cname = "DBusGProxy", lower_case_csuffix = "g_proxy")]
        public class Object : GLib.Object {
                public bool call (string method, out GLib.Error error, GLib.Type first_arg_type, ...);
-               public weak ProxyCall begin_call (string method, ProxyCallNotify notify, GLib.DestroyNotify destroy, GLib.Type first_arg_type, ...);
+               public unowned ProxyCall begin_call (string method, ProxyCallNotify notify, GLib.DestroyNotify destroy, GLib.Type first_arg_type, ...);
                public bool end_call (ProxyCall call, out GLib.Error error, GLib.Type first_arg_type, ...);
                public void cancel_call (ProxyCall call);
-               public weak string get_path ();
-               public weak string get_bus_name ();
-               public weak string get_interface ();
+               public unowned string get_path ();
+               public unowned string get_bus_name ();
+               public unowned string get_interface ();
                public GLib.HashTable<string,GLib.Value?> get_all (string interface_name) throws DBus.Error;
 
                public signal void destroy ();
index 9d9ee5764174665585f9a147a58197b85cdfadf4..0dd6637782b61ab1732bade95b95a3ece577e8b6 100644 (file)
@@ -9,26 +9,26 @@ namespace Enchant {
                [CCode (cname = "enchant_broker_init")]
                public Broker ();
 
-               public weak Dict request_dict (string tag);     
-               public weak Dict request_pwl_dict (string pwl); 
+               public unowned Dict request_dict (string tag);  
+               public unowned Dict request_pwl_dict (string pwl);      
                public void free_dict (Dict dict);                      
                public int dict_exists (string tag);
                public void set_ordering (string tag, string ordering);
                public void describe (BrokerDescribeFn fn);
                public void list_dicts (DictDescribeFn fn);
-               public weak string get_error ();
+               public unowned string get_error ();
        }
 
        [Compact]
        public class Dict {
                public int check (string word, long len = -1);
-               public weak string[] suggest (string word, long len = -1);      
+               public unowned string[] suggest (string word, long len = -1);   
                public void free_string_list ([CCode (array_length = false)] string[] string_list);     
                public void add_to_session (string word, long len = -1);
                public int is_in_session (string word, long len = -1);
                public void store_replacement ( string mis, long mis_len, string cor, long cor_len);
                public void add_to_pwl ( string word, long len = -1);
                public void describe (DictDescribeFn fn);
-               public weak string get_error ();
+               public unowned string get_error ();
        }
 }
index 6b6ef382836424be811d27d1ce9f426166f2a83a..d7c758cdf72a9bc7b5e758b2a682a580ddd44bef 100644 (file)
@@ -663,9 +663,9 @@ public struct double {
        [CCode (cname = "G_ASCII_DTOSTR_BUF_SIZE")]
        public const int DTOSTR_BUF_SIZE;
        [CCode (cname = "g_ascii_dtostr", instance_pos = -1)]
-       public weak string to_str (char[] buffer);
+       public unowned string to_str (char[] buffer);
        [CCode (cname = "g_ascii_formatd", instance_pos = -1)]
-       public weak string format (char[] buffer, string format = "%g");
+       public unowned string format (char[] buffer, string format = "%g");
 
        public string to_string () {
                return this.to_str(new char[DTOSTR_BUF_SIZE]);
@@ -810,7 +810,7 @@ public enum NormalizeMode {
 [CCode (cname = "char", const_cname = "const char", copy_function = "g_strdup", free_function = "g_free", cheader_filename = "stdlib.h,string.h,glib.h", type_id = "G_TYPE_STRING", marshaller_type_name = "STRING", param_spec_function = "g_param_spec_string", get_value_function = "g_value_get_string", set_value_function = "g_value_set_string", type_signature = "s")]
 public class string {
        [CCode (cname = "strstr")]
-       public weak string? str (string needle);
+       public unowned string? str (string needle);
        [CCode (cname = "g_str_has_prefix")]
        public bool has_prefix (string prefix);
        [CCode (cname = "g_str_has_suffix")]
@@ -837,24 +837,24 @@ public class string {
        public static string nfill (size_t length, char fill_char);
 
        [CCode (cname = "g_utf8_next_char")]
-       public weak string next_char ();
+       public unowned string next_char ();
        [CCode (cname = "g_utf8_get_char")]
        public unichar get_char ();
        [CCode (cname = "g_utf8_get_char_validated")]
        public unichar get_char_validated (ssize_t max_len = -1);
        [CCode (cname = "g_utf8_offset_to_pointer")]
        [PlusOperator ()]
-       public weak string offset (long offset);
+       public unowned string offset (long offset);
        [CCode (cname = "g_utf8_pointer_to_offset")]
        public long pointer_to_offset (string pos);
        [CCode (cname = "g_utf8_prev_char")]
-       public weak string prev_char ();
+       public unowned string prev_char ();
        [CCode (cname = "g_utf8_strlen")]
        public long len (ssize_t max = -1);
        [CCode (cname = "g_utf8_strchr")]
-       public weak string chr (ssize_t len, unichar c);
+       public unowned string chr (ssize_t len, unichar c);
        [CCode (cname = "g_utf8_strrchr")]
-       public weak string rchr (ssize_t len, unichar c);
+       public unowned string rchr (ssize_t len, unichar c);
        [CCode (cname = "g_utf8_strreverse")]
        public string reverse (ssize_t len = -1);
        [CCode (cname = "g_utf8_validate")]
@@ -875,7 +875,7 @@ public class string {
        public string locale_to_utf8 (ssize_t len, out size_t bytes_read, out size_t bytes_written, out GLib.Error error = null);
   
        [CCode (cname = "g_strchomp")]
-       public weak string _chomp();
+       public unowned string _chomp();
        public string chomp () {
                string result = this.dup ();
                result._chomp ();
@@ -883,7 +883,7 @@ public class string {
        }
 
        [CCode (cname = "g_strchug")]
-       public weak string _chug();
+       public unowned string _chug();
        public string chug () {
                string result = this.dup ();
                result._chug ();
@@ -891,7 +891,7 @@ public class string {
        }
 
        [CCode (cname = "g_strstrip")]
-       public weak string _strip ();
+       public unowned string _strip ();
        public string strip () {
                string result = this.dup ();
                result._strip ();
@@ -899,7 +899,7 @@ public class string {
        }
 
        [CCode (cname = "g_strdelimit")]
-       public weak string _delimit (string delimiters, char new_delimiter);
+       public unowned string _delimit (string delimiters, char new_delimiter);
        public string delimit (string delimiters, char new_delimiter) {
                string result = this.dup ();
                result._delimit (delimiters, new_delimiter);
@@ -912,15 +912,15 @@ public class string {
        [CCode (cname = "atoi")]
        public int to_int ();
        [CCode (cname = "strtol")]
-       public long to_long (out weak string endptr = null, int _base = 0);
+       public long to_long (out unowned string endptr = null, int _base = 0);
        [CCode (cname = "g_ascii_strtod")]
-       public double to_double (out weak string endptr = null);
+       public double to_double (out unowned string endptr = null);
        [CCode (cname = "strtoul")]
-       public ulong to_ulong (out weak string endptr = null, int _base = 0);
+       public ulong to_ulong (out unowned string endptr = null, int _base = 0);
        [CCode (cname = "g_ascii_strtoll")]
-       public int64 to_int64 (out weak string endptr = null, int _base = 0);
+       public int64 to_int64 (out unowned string endptr = null, int _base = 0);
        [CCode (cname = "g_ascii_strtoull")]
-       public uint64 to_uint64 (out weak string endptr = null, int _base = 0);
+       public uint64 to_uint64 (out unowned string endptr = null, int _base = 0);
 
        public bool to_bool () {
                if (this == "true") {
@@ -963,7 +963,7 @@ public class string {
                        len = string_length - offset;
                }
                GLib.return_val_if_fail (offset + len <= string_length, null);
-               weak string start = this.offset (offset);
+               unowned string start = this.offset (offset);
                return start.ndup (((char*) start.offset (len)) - ((char*) start));
        }
 
@@ -1260,7 +1260,7 @@ namespace GLib {
                public void run ();
                public void quit ();
                public bool is_running ();
-               public weak MainContext get_context ();
+               public unowned MainContext get_context ();
        }
        
        namespace Priority {
@@ -1275,12 +1275,12 @@ namespace GLib {
        [CCode (ref_function = "g_main_context_ref", unref_function = "g_main_context_unref")]
        public class MainContext {
                public MainContext ();
-               public static weak MainContext @default ();
+               public static unowned MainContext @default ();
                public bool iteration (bool may_block);
                public bool pending ();
-               public weak Source find_source_by_id (uint source_id);
-               public weak Source find_source_by_user_data (void* user_data);
-               public weak Source find_source_by_funcs_user_data (SourceFuncs funcs, void* user_data);
+               public unowned Source find_source_by_id (uint source_id);
+               public unowned Source find_source_by_user_data (void* user_data);
+               public unowned Source find_source_by_funcs_user_data (SourceFuncs funcs, void* user_data);
                public void wakeup ();
                public bool acquire ();
                public void release ();
@@ -1297,7 +1297,7 @@ namespace GLib {
                public void remove_poll (ref PollFD fd);
                public int depth ();
                [CCode (cname = "g_main_current_source")]
-               public static weak Source current_source ();
+               public static unowned Source current_source ();
                public static unowned MainContext get_thread_default ();
                public void push_thread_default ();
                public void pop_thread_default ();
@@ -1368,7 +1368,7 @@ namespace GLib {
                public void set_can_recurse (bool can_recurse);
                public bool get_can_recurse ();
                public uint get_id ();
-               public weak MainContext get_context ();
+               public unowned MainContext get_context ();
                public void set_callback (owned SourceFunc func);
                public void set_callback_indirect (void* callback_data, SourceCallbackFuncs callback_funcs);
                public void add_poll (ref PollFD fd);
@@ -1435,9 +1435,9 @@ namespace GLib {
        [Compact]
        public class Thread {
                public static bool supported ();
-               public static weak Thread create (ThreadFunc func, bool joinable) throws ThreadError;
-               public static weak Thread create_full (ThreadFunc func, ulong stack_size, bool joinable, bool bound, ThreadPriority priority) throws ThreadError;
-               public static weak Thread self ();
+               public static unowned Thread create (ThreadFunc func, bool joinable) throws ThreadError;
+               public static unowned Thread create_full (ThreadFunc func, ulong stack_size, bool joinable, bool bound, ThreadPriority priority) throws ThreadError;
+               public static unowned Thread self ();
                public void* join ();
                public void set_priority (ThreadPriority priority);
                public static void yield ();
@@ -1625,11 +1625,11 @@ namespace GLib {
                public IOCondition get_buffer_condition ();
                public IOFlags get_flags ();
                public IOStatus set_flags (IOFlags flags) throws IOChannelError;
-               public weak string get_line_term (out int length);
+               public unowned string get_line_term (out int length);
                public void set_line_term (string line_term, int length);
                public bool get_buffered ();
                public void set_buffered (bool buffered);
-               public weak string get_encoding ();
+               public unowned string get_encoding ();
                public IOStatus set_encoding (string? encoding) throws IOChannelError;
                public bool get_close_on_unref ();
                public void set_close_on_unref (bool do_close);
@@ -1793,12 +1793,12 @@ namespace GLib {
 
        [CCode (cname = "errno", cheader_filename = "errno.h")]
        public int errno;
-       public weak string strerror (int errnum);
+       public unowned string strerror (int errnum);
 
        /* Character Set Conversions */
        
        public static string convert (string str, ssize_t len, string to_codeset, string from_codeset, out size_t bytes_read = null, out size_t bytes_written = null) throws ConvertError;
-       public static bool get_charset (out weak string charset);
+       public static bool get_charset (out unowned string charset);
 
        public struct IConv {
                [CCode (cname = "g_iconv_open")]
@@ -1854,7 +1854,7 @@ namespace GLib {
                public Checksum (ChecksumType checksum_type);
                public Checksum copy ();
                public void update ([CCode (array_length = false)] uchar[] data, size_t length);
-               public weak string get_string ();
+               public unowned string get_string ();
                public void get_digest ([CCode (array_length = false)] uint8[] buffer, ref size_t digest_len);
                [CCode (cname = "g_compute_checksum_for_data")]
                public static string compute_for_data (ChecksumType checksum_type, uchar[] data);
@@ -2041,7 +2041,7 @@ namespace GLib {
                [CCode (cname = "strftime", instance_pos = -1)]
                public size_t strftime (char[] s, string format);
                [CCode (cname = "strptime", instance_pos = -1)]
-               public weak string? strptime (string buf, string format);
+               public unowned string? strptime (string buf, string format);
        }
 
        /* Random Numbers */
@@ -2078,15 +2078,15 @@ namespace GLib {
        
        namespace Environment {
                [CCode (cname = "g_get_application_name")]
-               public static weak string? get_application_name ();
+               public static unowned string? get_application_name ();
                [CCode (cname = "g_set_application_name")]
                public static void set_application_name (string application_name);
                [CCode (cname = "g_get_prgname")]
-               public static weak string get_prgname ();
+               public static unowned string get_prgname ();
                [CCode (cname = "g_set_prgname")]
                public static void set_prgname (string application_name);
                [CCode (cname = "g_getenv")]
-               public static weak string? get_variable (string variable);
+               public static unowned string? get_variable (string variable);
                [CCode (cname = "g_setenv")]
                public static bool set_variable (string variable, string value, bool overwrite);
                [CCode (cname = "g_unsetenv")]
@@ -2094,27 +2094,27 @@ namespace GLib {
                [CCode (cname = "g_listenv", array_length = false, array_null_terminated = true)]
                public static string[] list_variables ();
                [CCode (cname = "g_get_user_name")]
-               public static weak string get_user_name ();
+               public static unowned string get_user_name ();
                [CCode (cname = "g_get_real_name")]
-               public static weak string get_real_name ();
+               public static unowned string get_real_name ();
                [CCode (cname = "g_get_user_cache_dir")]
-               public static weak string get_user_cache_dir ();
+               public static unowned string get_user_cache_dir ();
                [CCode (cname = "g_get_user_data_dir")]
-               public static weak string get_user_data_dir ();
+               public static unowned string get_user_data_dir ();
                [CCode (cname = "g_get_user_config_dir")]
-               public static weak string get_user_config_dir ();
+               public static unowned string get_user_config_dir ();
                [CCode (cname = "g_get_user_special_dir")]
-               public static weak string get_user_special_dir (UserDirectory directory);
+               public static unowned string get_user_special_dir (UserDirectory directory);
                [CCode (cname = "g_get_system_data_dirs", array_length = false, array_null_terminated = true)]
-               public static weak string[] get_system_data_dirs ();
+               public static unowned string[] get_system_data_dirs ();
                [CCode (cname = "g_get_system_config_dirs", array_length = false, array_null_terminated = true)]
-               public static weak string[] get_system_config_dirs ();
+               public static unowned string[] get_system_config_dirs ();
                [CCode (cname = "g_get_host_name")]
-               public static weak string get_host_name ();
+               public static unowned string get_host_name ();
                [CCode (cname = "g_get_home_dir")]
-               public static weak string get_home_dir ();
+               public static unowned string get_home_dir ();
                [CCode (cname = "g_get_tmp_dir")]
-               public static weak string get_tmp_dir ();
+               public static unowned string get_tmp_dir ();
                [CCode (cname = "g_get_current_dir")]
                public static string get_current_dir ();
                [CCode (cname = "g_find_program_in_path")]
@@ -2139,7 +2139,7 @@ namespace GLib {
 
        namespace Path {
                public static bool is_absolute (string file_name);
-               public static weak string skip_root (string file_name);
+               public static unowned string skip_root (string file_name);
                public static string get_basename (string file_name);
                public static string get_dirname (string file_name);
                [CCode (cname = "g_build_filename")]
@@ -2183,7 +2183,7 @@ namespace GLib {
        [Compact]
        [CCode (free_function = "g_scanner_destroy")]
        public class Scanner {
-               public weak string input_name;
+               public unowned string input_name;
                public TokenType token;
                public TokenValue value;
                public uint line;
@@ -2340,8 +2340,8 @@ namespace GLib {
                public void add_items (List<void*> items);
                public void remove_items (List<void*> items);
                public void clear_items ();
-               public weak List<void*> complete (string prefix, out string? new_prefix = null);
-               public weak List<void*> complete_utf8 (string prefix, out string? new_prefix = null);
+               public unowned List<void*> complete (string prefix, out string? new_prefix = null);
+               public unowned List<void*> complete_utf8 (string prefix, out string? new_prefix = null);
        }
 
        [CCode (has_target = false)]
@@ -2521,7 +2521,7 @@ namespace GLib {
                [CCode (cname = "fgetc")]
                public int getc ();
                [CCode (cname = "fgets", instance_pos = -1)]
-               public weak string gets (char[] s);
+               public unowned string gets (char[] s);
                [CCode (cname = "feof")]
                public bool eof ();
                [CCode (cname = "fscanf"), ScanfFormat]
@@ -2596,7 +2596,7 @@ namespace GLib {
        [CCode (free_function = "g_dir_close")]
        public class Dir {
                public static Dir open (string filename, uint _flags = 0) throws FileError;
-               public weak string read_name ();
+               public unowned string read_name ();
                public void rewind ();
        }
        
@@ -2606,7 +2606,7 @@ namespace GLib {
                [CCode (cname = "g_mkdir_with_parents")]
                public static int create_with_parents (string pathname, int mode);
                [CCode (cname = "mkdtemp")]
-               public static weak string mkdtemp (string template);
+               public static unowned string mkdtemp (string template);
                [CCode (cname = "g_rmdir")]
                public static int remove (string filename);
        }
@@ -2673,12 +2673,12 @@ namespace GLib {
        public class OptionContext {
                public OptionContext (string parameter_string);
                public void set_summary (string summary);
-               public weak string get_summary ();
+               public unowned string get_summary ();
                public void set_description (string description);
                public void get_description ();
                public void set_translate_func (TranslateFunc func, DestroyNotify? destroy_notify);
                public void set_translation_domain (string domain);
-               public bool parse ([CCode (array_length_pos = 0.9)] ref weak string[] argv) throws OptionError;
+               public bool parse ([CCode (array_length_pos = 0.9)] ref unowned string[] argv) throws OptionError;
                public void set_help_enabled (bool help_enabled);
                public bool get_help_enabled ();
                public void set_ignore_unknown_options (bool ignore_unknown);
@@ -2687,10 +2687,10 @@ namespace GLib {
                public void add_main_entries ([CCode (array_length = false)] OptionEntry[] entries, string? translation_domain);
                public void add_group (owned OptionGroup group);
                public void set_main_group (owned OptionGroup group);
-               public weak OptionGroup get_main_group ();
+               public unowned OptionGroup get_main_group ();
        }
 
-       public delegate weak string TranslateFunc (string str);
+       public delegate unowned string TranslateFunc (string str);
 
        [CCode (has_type_id = false)]
        public enum OptionArg {
@@ -2718,15 +2718,15 @@ namespace GLib {
        }
        
        public struct OptionEntry {
-               public weak string long_name;
+               public unowned string long_name;
                public char short_name;
                public int flags;
 
                public OptionArg arg;
                public void* arg_data;
 
-               public weak string description;
-               public weak string arg_description;
+               public unowned string description;
+               public unowned string arg_description;
        }
 
        [Compact]
@@ -2817,8 +2817,8 @@ namespace GLib {
        [Compact]
        [CCode (free_function = "g_match_info_free")]
        public class MatchInfo {
-               public weak Regex get_regex ();
-               public weak string get_string ();
+               public unowned Regex get_regex ();
+               public unowned string get_string ();
                public bool matches ();
                public bool next () throws RegexError;
                public int get_match_count ();
@@ -2856,8 +2856,8 @@ namespace GLib {
                public MarkupParseContext (MarkupParser parser, MarkupParseFlags _flags, void* user_data, DestroyNotify? user_data_dnotify);
                public bool parse (string text, ssize_t text_len) throws MarkupError;
                public bool end_parse () throws MarkupError;
-               public weak string get_element ();
-               public weak SList<string> get_element_stack ();
+               public unowned string get_element ();
+               public unowned SList<string> get_element_stack ();
                public void get_position (out int line_number, out int char_number);
                public void push (MarkupParser parser, void* user_data);
                public void* pop ();
@@ -3059,7 +3059,7 @@ namespace GLib {
                public static void minimized_result (double minimized_quantity, string format, ...);
                [PrintfFormat]
                public static void maximized_result (double maximized_quantity, string format, ...);
-               public static void init ([CCode (array_length_pos = 0.9)] ref weak string[] args, ...);
+               public static void init ([CCode (array_length_pos = 0.9)] ref unowned string[] args, ...);
                public static bool quick ();
                public static bool slow ();
                public static bool thorough ();
@@ -3150,7 +3150,7 @@ namespace GLib {
                public void remove_all (G data);
                
                public uint length ();
-               public List<weak G> copy ();
+               public List<unowned G> copy ();
                [ReturnsModifiedPointer ()]
                public void reverse ();
                [ReturnsModifiedPointer ()]
@@ -3163,20 +3163,20 @@ namespace GLib {
                public void concat (owned List<G> list2);
                public void @foreach (Func func);
 
-               public weak List<G> first ();
-               public weak List<G> last ();
-               public weak List<G> nth (uint n);
-               public weak G nth_data (uint n);
-               public weak List<G> nth_prev (uint n);
+               public unowned List<G> first ();
+               public unowned List<G> last ();
+               public unowned List<G> nth (uint n);
+               public unowned G nth_data (uint n);
+               public unowned List<G> nth_prev (uint n);
                
-               public weak List<G> find (G data);
-               public weak List<G> find_custom (G data, CompareFunc func);
+               public unowned List<G> find (G data);
+               public unowned List<G> find_custom (G data, CompareFunc func);
                public int position (List<G> llink);
                public int index (G data);
                
                public G data;
                public List<G> next;
-               public weak List<G> prev;
+               public unowned List<G> prev;
        }
        
        /* Singly-Linked Lists */
@@ -3206,7 +3206,7 @@ namespace GLib {
                public void remove_all (G data);
 
                public uint length ();
-               public SList<weak G> copy ();
+               public SList<unowned G> copy ();
                [ReturnsModifiedPointer ()]
                public void reverse ();
                [ReturnsModifiedPointer ()]
@@ -3219,12 +3219,12 @@ namespace GLib {
                public void concat (owned SList<G> list2);
                public void @foreach (Func func);
 
-               public weak SList<G> last ();
-               public weak SList<G> nth (uint n);
-               public weak G nth_data (uint n);
+               public unowned SList<G> last ();
+               public unowned SList<G> nth (uint n);
+               public unowned G nth_data (uint n);
 
-               public weak SList<G> find (G data);
-               public weak SList<G> find_custom (G data, CompareFunc func);
+               public unowned SList<G> find (G data);
+               public unowned SList<G> find_custom (G data, CompareFunc func);
                public int position (SList<G> llink);
                public int index (G data);
 
@@ -3245,8 +3245,8 @@ namespace GLib {
        [Compact]
        [CCode (dup_function = "g_queue_copy", free_function = "g_queue_free")]
        public class Queue<G> {
-               public weak List<G> head;
-               public weak List<G> tail;
+               public unowned List<G> head;
+               public unowned List<G> tail;
                public uint length;
        
                public Queue ();
@@ -3256,8 +3256,8 @@ namespace GLib {
                public uint get_length ();
                public void reverse ();
                public Queue copy ();
-               public weak List<G> find (G data);
-               public weak List<G> find_custom (G data, CompareFunc func);
+               public unowned List<G> find (G data);
+               public unowned List<G> find_custom (G data, CompareFunc func);
                public void sort (CompareDataFunc compare_func);
                public void push_head (owned G data);
                public void push_tail (owned G data);
@@ -3265,9 +3265,9 @@ namespace GLib {
                public G pop_head ();
                public G pop_tail ();
                public G pop_nth (uint n);
-               public weak G peek_head ();
-               public weak G peek_tail ();
-               public weak G peek_nth (uint n);
+               public unowned G peek_head ();
+               public unowned G peek_tail ();
+               public unowned G peek_nth (uint n);
                public int index (G data);
                public void remove (G data);
                public void remove_all (G data);
@@ -3304,7 +3304,7 @@ namespace GLib {
                public static void move_range (SequenceIter<G> dest, SequenceIter<G> begin, SequenceIter<G> end);
                public SequenceIter<G> search (G data, CompareDataFunc cmp_func);
                public SequenceIter<G> search_iter (G data, SequenceIterCompareFunc<G> iter_cmp);
-               public static weak G get (SequenceIter<G> iter);
+               public static unowned G get (SequenceIter<G> iter);
                public static void set (SequenceIter<G> iter, owned G data);
                public static SequenceIter<G> range_get_midpoint (SequenceIter<G> begin, SequenceIter<G> end);
        }
@@ -3322,7 +3322,7 @@ namespace GLib {
                public int compare (SequenceIter<G> other);
 
                [CCode (cname = "g_sequence_get")]
-               public weak G get ();
+               public unowned G get ();
        }
 
        public delegate int SequenceIterCompareFunc<G> (SequenceIter<G> a, SequenceIter<G> b);
@@ -3336,11 +3336,11 @@ namespace GLib {
                public HashTable.full (HashFunc? hash_func, EqualFunc? key_equal_func, DestroyNotify? key_destroy_func, DestroyNotify? value_destroy_func);
                public void insert (owned K key, owned V value);
                public void replace (owned K key, owned V value);
-               public weak V lookup (K key);
+               public unowned V lookup (K key);
                public bool remove (K key);
                public void remove_all ();
-               public List<weak K> get_keys ();
-               public List<weak V> get_values ();
+               public List<unowned K> get_keys ();
+               public List<unowned V> get_values ();
                public void @foreach (HFunc func);
                [CCode (cname = "g_hash_table_foreach")]
                public void for_each (HFunc func);
@@ -3395,18 +3395,18 @@ namespace GLib {
                public StringBuilder (string init = "");
                [CCode (cname = "g_string_sized_new")]
                public StringBuilder.sized (size_t dfl_size);
-               public weak StringBuilder assign (string rval);
-               public weak StringBuilder append (string val);
-               public weak StringBuilder append_c (char c);
-               public weak StringBuilder append_unichar (unichar wc);
-               public weak StringBuilder append_len (string val, ssize_t len);
-               public weak StringBuilder prepend (string val);
-               public weak StringBuilder prepend_c (char c);
-               public weak StringBuilder prepend_unichar (unichar wc);
-               public weak StringBuilder prepend_len (string val, ssize_t len);
-               public weak StringBuilder insert (ssize_t pos, string val);
-               public weak StringBuilder erase (ssize_t pos = 0, ssize_t len = -1);
-               public weak StringBuilder truncate (size_t len);
+               public unowned StringBuilder assign (string rval);
+               public unowned StringBuilder append (string val);
+               public unowned StringBuilder append_c (char c);
+               public unowned StringBuilder append_unichar (unichar wc);
+               public unowned StringBuilder append_len (string val, ssize_t len);
+               public unowned StringBuilder prepend (string val);
+               public unowned StringBuilder prepend_c (char c);
+               public unowned StringBuilder prepend_unichar (unichar wc);
+               public unowned StringBuilder prepend_len (string val, ssize_t len);
+               public unowned StringBuilder insert (ssize_t pos, string val);
+               public unowned StringBuilder erase (ssize_t pos = 0, ssize_t len = -1);
+               public unowned StringBuilder truncate (size_t len);
 
                [PrintfFormat]
                public void printf (string format, ...);
@@ -3424,9 +3424,9 @@ namespace GLib {
        [CCode (free_function = "g_string_chunk_free")]
        public class StringChunk {
                public StringChunk (size_t size);
-               public weak string insert (string str);
-               public weak string insert_const (string str);
-               public weak string insert_len (string str, ssize_t len);
+               public unowned string insert (string str);
+               public unowned string insert_const (string str);
+               public unowned string insert_len (string str, ssize_t len);
                public void clear ();
        }
 
@@ -3493,7 +3493,7 @@ namespace GLib {
        public struct Quark : uint32 {
                public static Quark from_string (string str);
                public static Quark try_string (string str);
-               public weak string to_string ();
+               public unowned string to_string ();
        }
 
        /* Keyed Data Lists */
@@ -3502,13 +3502,13 @@ namespace GLib {
        public struct Datalist<G> {
                public Datalist ();
                public void clear ();
-               public weak G id_get_data (Quark key_id);
+               public unowned G id_get_data (Quark key_id);
                public void id_set_data (Quark key_id, owned G data);
                public void id_set_data_full (Quark key_id, owned G data, DestroyNotify? destroy_func);
                public void id_remove_data (Quark key_id);
                public G id_remove_no_notify (Quark key_id);
                public void @foreach (DataForeachFunc func);
-               public weak G get_data (string key);
+               public unowned G get_data (string key);
                public void set_data_full (string key, owned G data, DestroyNotify? destry_func);
                public G remove_no_notify (string key);
                public void set_data (string key, owned G data);
@@ -3569,10 +3569,10 @@ namespace GLib {
                public void replace (owned K key, owned V value);
                public int nnodes ();
                public int height ();
-               public weak V lookup (K key);
+               public unowned V lookup (K key);
                public bool lookup_extended (K lookup_key, K orig_key, V value);
                public void foreach (TraverseFunc traverse_func);
-               public weak V search (CompareFunc search_func, void* user_data);
+               public unowned V search (CompareFunc search_func, void* user_data);
                public bool remove (K key);
                public bool steal (K key);
        }
@@ -3580,13 +3580,13 @@ namespace GLib {
        /* Internationalization */
        
        [CCode (cname = "_", cheader_filename = "glib.h,glib/gi18n-lib.h")]
-       public static weak string _ (string str);
+       public static unowned string _ (string str);
        [CCode (cname = "Q_", cheader_filename = "glib.h,glib/gi18n-lib.h")]
-       public static weak string Q_ (string str);
+       public static unowned string Q_ (string str);
        [CCode (cname = "N_", cheader_filename = "glib.h,glib/gi18n-lib.h")]
-       public static weak string N_ (string str);
+       public static unowned string N_ (string str);
        [CCode (cname = "ngettext", cheader_filename = "glib.h,glib/gi18n-lib.h")]
-       public static weak string ngettext (string msgid, string msgid_plural, ulong n);
+       public static unowned string ngettext (string msgid, string msgid_plural, ulong n);
        
        [CCode (cname = "int", cprefix = "LC_", cheader_filename = "locale.h", has_type_id = false)]
        public enum LocaleCategory {
@@ -3601,15 +3601,15 @@ namespace GLib {
        
        namespace Intl {
                [CCode (cname = "setlocale", cheader_filename = "locale.h")]
-               public static weak string? setlocale (LocaleCategory category, string? locale);
+               public static unowned string? setlocale (LocaleCategory category, string? locale);
                [CCode (cname = "bindtextdomain", cheader_filename = "glib/gi18n-lib.h")]
-               public static weak string? bindtextdomain (string domainname, string? dirname);
+               public static unowned string? bindtextdomain (string domainname, string? dirname);
                [CCode (cname = "textdomain", cheader_filename = "glib/gi18n-lib.h")]
-               public static weak string? textdomain (string? domainname);
+               public static unowned string? textdomain (string? domainname);
                [CCode (cname = "bind_textdomain_codeset", cheader_filename = "glib/gi18n-lib.h")]
-               public static weak string? bind_textdomain_codeset (string domainname, string? codeset);
+               public static unowned string? bind_textdomain_codeset (string domainname, string? codeset);
                [CCode (cname = "g_get_language_names", array_length = false, array_null_terminated = true)]
-               public static weak string[] get_language_names ();
+               public static unowned string[] get_language_names ();
        }
 
        [Compact]
@@ -3703,12 +3703,12 @@ namespace GLib {
                public bool equal (VariantType other);
                public bool is_subtype_of (VariantType supertype);
 
-               public weak VariantType element ();
-               public weak VariantType first ();
-               public weak VariantType next ();
-               public weak VariantType n_items ();
-               public weak VariantType key ();
-               public weak VariantType value ();
+               public unowned VariantType element ();
+               public unowned VariantType first ();
+               public unowned VariantType next ();
+               public unowned VariantType n_items ();
+               public unowned VariantType key ();
+               public unowned VariantType value ();
 
                public VariantType.array (VariantType element);
                public VariantType.maybe (VariantType element);
@@ -3725,8 +3725,8 @@ namespace GLib {
                        SIGNATURE, VARIANT, MAYBE, ARRAY, TUPLE, DICT_ENTRY
                }
 
-               public weak VariantType get_type ();
-               public weak string get_type_string ();
+               public unowned VariantType get_type ();
+               public unowned string get_type_string ();
                public bool is_of_type (VariantType type);
                public bool is_container ();
                public Class classify ();
@@ -3757,7 +3757,7 @@ namespace GLib {
                public uint64 get_uint64 ();
                public int32 get_handle ();
                public double get_double ();
-               public weak string get_string ();
+               public unowned string get_string ();
                public string dup_string ();
 
                public Variant.strv (string[] value);
index d8ed95c39f895d84ddb6e19fa2527990f3dc376a..348c90eb5cdb09442187efba1bae0ac56de28d73 100644 (file)
@@ -32,7 +32,7 @@ namespace GLib {
                public static string build_path (string? directory, string module_name);
                public static Module? open (string? file_name, ModuleFlags flags);
                public bool symbol (string symbol_name, out void* symbol);
-               public weak string name ();
+               public unowned string name ();
                public void make_resident ();
                public static weak string error ();
        }
index 69b08d88001a04bc5133cddb7251ad250efd458a..0bd8187c8527ac71a2cfaccb7c66ed44e8b1752b 100644 (file)
@@ -57,14 +57,14 @@ namespace GLib {
                public static Type from_name (string name);
                public Type[] interfaces ();
                public bool is_a (Type is_a_type);
-               public weak string name ();
+               public unowned string name ();
                public Quark qname ();
                public Type parent ();
 
                public void query (out TypeQuery query);
 
                public TypeClass class_ref ();
-               public weak TypeClass class_peek ();
+               public unowned TypeClass class_peek ();
 
                public const Type INVALID;
                public const Type INTERFACE;
@@ -75,7 +75,7 @@ namespace GLib {
 
        public struct TypeQuery {
                public Type type;
-               public weak string type_name;
+               public unowned string type_name;
                public uint class_size;
                public uint instance_size;
        }
@@ -130,9 +130,9 @@ namespace GLib {
                public bool value_convert (Value src_value, Value dest_value, bool strict_validation);
                [CCode (cname = "g_param_values_cmp")]
                public int values_cmp (Value value1, Value value2);
-               public weak string get_blurb ();
-               public weak string get_name ();
-               public weak string get_nick ();
+               public unowned string get_blurb ();
+               public unowned string get_name ();
+               public unowned string get_nick ();
                public void* get_qdata (Quark quark);
                public void set_qdata (Quark quark, void* data);
                public void set_qdata_full (Quark quark, void* data, DestroyNotify destroy);
@@ -229,14 +229,14 @@ namespace GLib {
        public class ParamSpecEnum : ParamSpec {
                [CCode (cname = "g_param_spec_enum")]
                public ParamSpecEnum (string name, string nick, string blurb, Type enum_type, int default_value, ParamFlags flags);
-               public weak EnumClass enum_class;
+               public unowned EnumClass enum_class;
                public int default_value;
        }
 
        public class ParamSpecFlags : ParamSpec {
                [CCode (cname = "g_param_spec_flags")]
                public ParamSpecFlags (string name, string nick, string blurb, Type flags_type, uint default_value, ParamFlags flags);
-               public weak FlagsClass flags_class;
+               public unowned FlagsClass flags_class;
                public uint default_value;
        }
 
@@ -272,9 +272,9 @@ namespace GLib {
 
        [CCode (lower_case_csuffix = "object_class")]
        public class ObjectClass : TypeClass {
-               public weak ParamSpec? find_property (string property_name);
+               public unowned ParamSpec? find_property (string property_name);
                [CCode (array_length_type = "guint")]
-               public weak ParamSpec[] list_properties ();
+               public unowned ParamSpec[] list_properties ();
                public void install_property (uint property_id, ParamSpec pspec);
        }
        
@@ -302,7 +302,7 @@ namespace GLib {
                public Type get_type ();
                [CCode (cname = "G_OBJECT_GET_CLASS")]
                public unowned ObjectClass get_class ();
-               public weak Object @ref ();
+               public unowned Object @ref ();
                public void unref ();
                public Object ref_sink ();
                public void weak_ref (WeakNotify notify);
@@ -332,7 +332,7 @@ namespace GLib {
                [CCode (cname = "g_object_notify")]
                public void notify_property (string property_name);
 
-               public weak Object connect (string signal_spec, ...);
+               public unowned Object connect (string signal_spec, ...);
                [CCode (cname = "g_signal_handler_disconnect")]
                public void disconnect (ulong handler_id);
 
@@ -360,27 +360,27 @@ namespace GLib {
 
        [CCode (lower_case_csuffix = "enum")]
        public class EnumClass : TypeClass {
-               public weak EnumValue? get_value (int value);
-               public weak EnumValue? get_value_by_name (string name);
-               public weak EnumValue? get_value_by_nick (string name);
+               public unowned EnumValue? get_value (int value);
+               public unowned EnumValue? get_value_by_name (string name);
+               public unowned EnumValue? get_value_by_nick (string name);
                public int minimum;
                public int maximum;
                public uint n_values;
-               public weak EnumValue[] values;
+               public unowned EnumValue[] values;
        }
 
        [Compact]
        public class EnumValue {
                public int value;
-               public weak string value_name;
-               public weak string value_nick;
+               public unowned string value_name;
+               public unowned string value_nick;
        }
 
        [CCode (lower_case_csuffix = "flags")]
        public class FlagsClass : TypeClass {
-               public weak FlagsValue? get_first_value (uint value);
-               public weak FlagsValue? get_value_by_name (string name);
-               public weak FlagsValue? get_value_by_nick (string name);
+               public unowned FlagsValue? get_first_value (uint value);
+               public unowned FlagsValue? get_value_by_name (string name);
+               public unowned FlagsValue? get_value_by_nick (string name);
                public uint mask;
                public uint n_values;
                public FlagsValue[] values;
@@ -389,8 +389,8 @@ namespace GLib {
        [Compact]
        public class FlagsValue {
                public int value;
-               public weak string value_name;
-               public weak string value_nick;
+               public unowned string value_name;
+               public unowned string value_nick;
        }
 
        [CCode (has_target = false)]
@@ -403,11 +403,11 @@ namespace GLib {
                [CCode (cname = "G_VALUE_TYPE")]
                public Type type ();
                [CCode (cname = "G_VALUE_TYPE_NAME")]
-               public weak string type_name ();
+               public unowned string type_name ();
 
                public Value (Type g_type);
                public void copy (ref Value dest_value);
-               public weak Value? reset ();
+               public unowned Value? reset ();
                public void init (Type g_type);
                public void unset ();
                public void set_instance (void* instance);
@@ -448,7 +448,7 @@ namespace GLib {
                public void set_string (string v_string);
                public void set_static_string (string v_string);
                public void take_string (owned string v_string);
-               public weak string get_string ();
+               public unowned string get_string ();
                public string dup_string ();
                public void set_pointer (void* v_pointer);
                public void* get_pointer ();
@@ -457,7 +457,7 @@ namespace GLib {
                public void* dup_boxed ();
                public void set_object (Object v_object);
                public void take_object (owned Object v_object);
-               public weak Object get_object ();
+               public unowned Object get_object ();
                public Object dup_object ();
                public void set_gtype (Type v_gtype);
                public Type get_gtype ();
@@ -510,7 +510,7 @@ namespace GLib {
                public Value[] values;
                public ValueArray (uint n_prealloced);
                public ValueArray copy ();
-               public weak Value? get_nth (uint index_);
+               public unowned Value? get_nth (uint index_);
                public void append (Value value);
                public void prepend (Value value);
                public void insert (uint index_, Value value);
@@ -522,7 +522,7 @@ namespace GLib {
        namespace Signal {
                public static void query (uint signal_id, out SignalQuery query);
                public static uint lookup (string name, Type itype);
-               public static weak string name (uint signal_id);
+               public static unowned string name (uint signal_id);
                public static uint[] list_ids (Type itype);
                public static void emit (void* instance, uint signal_id, Quark detail, ...);
                public static void emit_by_name (void* instance, string detailed_signal, ...);
@@ -566,13 +566,13 @@ namespace GLib {
 
        public struct SignalQuery {
                public uint signal_id;
-               public weak string signal_name;
+               public unowned string signal_name;
                public Type itype;
                public SignalFlags signal_flags;
                public Type return_type;
                public uint n_params;
                [CCode (array_length = false)]
-               public weak Type[] param_types;
+               public unowned Type[] param_types;
        }
 
        [CCode (cprefix = "G_SIGNAL_MATCH_", has_type_id = false)]
index bdb580232795ede268523d3dd7662b98015b4de6..3a384c2f7ade3a4d99ec1d3b665979f56c5b09fb 100644 (file)
@@ -3902,7 +3902,7 @@ namespace Gsl
                public RootFsolver (RootFsolverType* T);
                public int @set (Function* f, double x_lower, double x_upper);
                public int iterate ();
-               public weak string name ();
+               public unowned string name ();
        }
        
        [SimpleType]
@@ -3928,7 +3928,7 @@ namespace Gsl
                public RootFdfsolver (RootFdfsolverType* T);
                public int @set (FunctionFdf* fdf, double root);
                public int iterate ();
-               public weak string name ();
+               public unowned string name ();
        }
        
        [CCode (lower_case_cprefix="gsl_root_test_", cheader_filename="gsl/gsl_roots.h")]
@@ -3995,7 +3995,7 @@ namespace Gsl
                public int @set (Function* f, double x_minimum, double x_lower, double x_upper);
                public int set_with_values (Function* f, double x_minimum, double f_minimum, double x_lower, double f_lower, double x_upper, double f_upper);
                public int iterate ();
-               public weak string name ();
+               public unowned string name ();
        }
        
        [CCode (lower_case_cprefix="gsl_min_test_", cheader_filename="gsl/gsl_min.h")]
@@ -4080,7 +4080,7 @@ namespace Gsl
                public MultirootFsolver (MultirootFsolverType* T, size_t n); 
                public int @set (MultirootFunction* f, Vector x);
                public int iterate ();
-               public weak string name ();
+               public unowned string name ();
                public Vector root ();
        }
        
@@ -4123,7 +4123,7 @@ namespace Gsl
                public MultirootFdfsolver (MultirootFdfsolverType* T, size_t n);
                public int @set (MultirootFunctionFdf* fdf, Vector x);
                public int iterate ();
-               public weak string name ();
+               public unowned string name ();
                public Vector root ();
        }
        
@@ -4220,7 +4220,7 @@ namespace Gsl
                [CCode (cname="gsl_multimin_fminimizer_alloc")]
                public MultiminFminimizer (MultiminFminimizerType* T, size_t n);
                public int @set (MultiminFunction* f, Vector x, Vector step_size);
-               public weak string name ();
+               public unowned string name ();
                public int iterate ();
                public double minimum ();
        }
@@ -4271,7 +4271,7 @@ namespace Gsl
                [CCode (cname="gsl_multimin_fdfminimizer_alloc")]
                public MultiminFdfminimizer (MultiminFdfminimizerType* T, size_t n);
                public int @set (MultiminFunctionFdf* fdf, Vector x, double step_size, double tol);
-               public weak string name ();
+               public unowned string name ();
                public int iterate ();
                public int restart ();
                public double minimum ();
@@ -4408,7 +4408,7 @@ namespace Gsl
                public MultifitFsolver (MultifitFsolverType* T,  size_t n, size_t p);
                public int @set (MultifitFunction* f, Vector x);
                public int iterate ();
-               public weak string name ();
+               public unowned string name ();
                public Vector position ();
        }
        
@@ -4452,7 +4452,7 @@ namespace Gsl
                public MultifitFdfsolver (MultifitFdfsolverType* T, size_t n, size_t p);
                public int @set (MultifitFunctionFdf* fdf, Vector x);
                public int iterate ();
-               public weak string name ();
+               public unowned string name ();
                public Vector position ();
        }
        
index 38c5c8180609ac09dae32f9b16ce2e8e92125ba8..d97cc12af2eed3319ebbc08ec7b411abc6c8e943 100644 (file)
@@ -82,8 +82,8 @@ namespace Gtk {
                public void load_url (string url);
        
                public void stop_load ();
-               public weak bool can_go_back ();
-               public weak bool can_go_forward ();
+               public unowned bool can_go_back ();
+               public unowned bool can_go_forward ();
                public void go_back ();
                public void go_forward ();
 
@@ -92,10 +92,10 @@ namespace Gtk {
                public void append_data (string data, uint32 len);
 
                public void close_stream ();
-               public weak string get_link_message ();
-               public weak string get_js_status ();
-               public weak string get_title ();
-               public weak string get_location ();
+               public unowned string get_link_message ();
+               public unowned string get_js_status ();
+               public unowned string get_title ();
+               public unowned string get_location ();
 
                public void reload (MozEmbedReloadFlags flags);
                public void set_chrome_mask (MozEmbedChromeFlags flags);
index db242d9e9e9f797d7948921e9be992a0baec8377..35ec0e8634581311702ae1867ab81fe923ac47a4 100644 (file)
@@ -99,7 +99,7 @@ namespace Daemon {
        public static string log_ident;
 
        public void log (int prio, string t, ...);
-       public weak string ident_from_argv0 (string argv0);
+       public unowned string ident_from_argv0 (string argv0);
 
        public int nonblock (int fd, int b);
 
@@ -108,7 +108,7 @@ namespace Daemon {
        public static string pid_file_ident;
        public static PidFileProc pid_file_proc;
 
-       public weak string pid_file_proc_default ();
+       public unowned string pid_file_proc_default ();
        public int pid_file_create ();
        public int pid_file_remove ();
        public int pid_file_is_running ();
index 45c970aba84bcd6f4c97d35efccde26bf4cf83f0..14dbf14b93dcbb9b38bd6bccd72024ae9d0b8824 100644 (file)
@@ -66,7 +66,7 @@ namespace Netlink {
         public void     set_ifindex (int index );
         public int      get_ifindex ();
 
-        public weak RouteAddress get_local();
+        public unowned RouteAddress get_local();
     }
 
     [Compact]
index 1c9b1c2f3cbc57b072fcc95c8c89436f840efe9c..ec10a70238a028e5b70e102236f1bfed27c31fb4 100644 (file)
@@ -59,7 +59,7 @@ namespace Netlink {
         public void*    get_binary_addr();
 
         [CCode (cname = "nl_addr2str")]
-        public weak string to_stringbuf(char[] buf);
+        public unowned string to_stringbuf(char[] buf);
 
         public string to_string() {
             char[] buf = new char[256];
@@ -112,7 +112,7 @@ namespace Netlink {
         public void     set_scope (int scope);
         public int      get_scope ();
 
-        public weak Address get_local();
+        public unowned Address get_local();
     }
 
     [Compact]
index 4c33c3cde00d6d7c02be2382d5f00bbb561a9ba2..086b20fef54c87b5058a9551f186064223a14c8c 100644 (file)
@@ -106,7 +106,7 @@ namespace Xml {
        [CCode (cname = "void", cheader_filename = "libxml/nanohttp.h")]
        public class NanoHTTP {
                [CCode (cname = "xmlNanoHTTPAuthHeader")]
-               public weak string auth_header ();
+               public unowned string auth_header ();
 
                [CCode (cname = "xmlNanoHTTPCleanup")]
                public static void cleanup ();
@@ -118,7 +118,7 @@ namespace Xml {
                public int content_length ();
 
                [CCode (cname = "xmlNanoHTTPEncoding")]
-               public weak string http_encoding ();
+               public unowned string http_encoding ();
 
                [CCode (cname = "xmlNanoHTTPFetch")]
                public static int fetch (string url, string filename, out string content_type);
@@ -145,7 +145,7 @@ namespace Xml {
                public int read (void* dest, int len);
 
                [CCode (cname = "xmlNanoHTTPRedir")]
-               public weak string redir ();
+               public unowned string redir ();
 
                [CCode (cname = "xmlNanoHTTPReturnCode")]
                public int return_code ();
@@ -976,34 +976,34 @@ namespace Xml {
                public int close ();
 
                [CCode (cname = "xmlTextReaderConstBaseUri")]
-               public weak string const_base_uri ();
+               public unowned string const_base_uri ();
 
                [CCode (cname = "xmlTextReaderConstEncoding")]
-               public weak string const_encoding ();
+               public unowned string const_encoding ();
 
                [CCode (cname = "xmlTextReaderConstLocalName")]
-               public weak string const_local_name ();
+               public unowned string const_local_name ();
 
                [CCode (cname = "xmlTextReaderConstName")]
-               public weak string const_name ();
+               public unowned string const_name ();
 
                [CCode (cname = "xmlTextReaderConstNamespaceUri")]
-               public weak string const_namespace_uri ();
+               public unowned string const_namespace_uri ();
 
                [CCode (cname = "xmlTextReaderConstPrefix")]
-               public weak string const_prefix ();
+               public unowned string const_prefix ();
 
                [CCode (cname = "xmlTextReaderConstString")]
-               public weak string const_string (string str);
+               public unowned string const_string (string str);
 
                [CCode (cname = "xmlTextReaderConstValue")]
-               public weak string const_value ();
+               public unowned string const_value ();
 
                [CCode (cname = "xmlTextReaderConstXmlLang")]
-               public weak string const_xml_lang ();
+               public unowned string const_xml_lang ();
 
                [CCode (cname = "xmlTextReaderConstXmlVersion")]
-               public weak string const_xml_version ();
+               public unowned string const_xml_version ();
 
                [CCode (cname = "xmlTextReaderCurrentDoc")]
                public Doc* current_doc ();
@@ -1618,10 +1618,10 @@ namespace Html {
                public Status status_here (ElemDesc* child);
 
                [Ccode (cname = "htmlDefaultSubelement")]
-               public weak string default_subelement ();
+               public unowned string default_subelement ();
 
                [Ccode (cname = "htmlRequiredAttrs")]
-               public weak string[] required_attrs ();
+               public unowned string[] required_attrs ();
        }
 
        [Compact]
index 8e21ac01b541b140ee9b02977d05fbcbae4ee6a3..7997016b31431799a6af1baed8a7438daf68f271 100644 (file)
@@ -32,17 +32,17 @@ namespace Mysql {
                public ulong affected_rows ();
                public bool autocommit (bool mode);
                public bool change_user (string username, string passwd, string dbname);
-               public weak string character_set_name ();
+               public unowned string character_set_name ();
                public bool commit ();
                public int dump_debug_info ();
                public uint errno ();
-               public weak string error ();
-               public weak string get_host_info ();
+               public unowned string error ();
+               public unowned string get_host_info ();
                public uint get_proto_info ();
-               public weak string get_server_info ();
+               public unowned string get_server_info ();
                public ulong get_server_version ();
-               public weak string get_ssl_cipher ();
-               public weak string info ();
+               public unowned string get_ssl_cipher ();
+               public unowned string info ();
                public ulong insert_id ();
                public int kill (ulong pid);
                public Result list_dbs (string wild);
@@ -63,10 +63,10 @@ namespace Mysql {
                public int set_character_set (string csname);
                public void set_local_infile_default ();
                public int set_server_option (int option);
-               public weak string sqlstate ();
+               public unowned string sqlstate ();
                public int shutdown (int shutdown_level);
                public bool ssl_set (string key, string cert, string ca, string capath, string cipher);
-               public weak string stat ();
+               public unowned string stat ();
                public Result? store_result ();
                public ulong thread_id ();
                public Result use_result ();
@@ -81,7 +81,7 @@ namespace Mysql {
                public Field[] fetch_fields ();
                public ulong[] fetch_lengths ();
                [CCode (array_length = false)]
-               public weak string[]? fetch_row ();             
+               public unowned string[]? fetch_row ();          
                public uint fetch_count ();
                public uint num_fields ();
                public uint num_rows ();
@@ -92,7 +92,7 @@ namespace Mysql {
        public struct Field {
        }
        
-       public weak string get_client_info ();
+       public unowned string get_client_info ();
        public ulong get_client_version ();
        public void debug (string msg);
        public ulong hex_string (string to, string from, ulong length);
index 90f8fbdc909b3837592823750f4f6ca72f428419..635ccc52fad375cf30b3d3a23390b969791c6d12 100644 (file)
@@ -473,7 +473,7 @@ namespace Posix {
        [CCode (cheader_filename = "arpa/inet.h")]
        public uint32 inet_addr (string host);
        [CCode (cheader_filename = "arpa/inet.h")]
-       public weak string inet_ntoa (InAddr addr);
+       public unowned string inet_ntoa (InAddr addr);
        [CCode (cheader_filename = "arpa/inet.h")]
        public uint32 htonl (uint32 hostlong);
        [CCode (cheader_filename = "arpa/inet.h")]
@@ -2040,7 +2040,7 @@ namespace Posix {
                [CCode (cname = "fgetc")]
                public int getc ();
                [CCode (cname = "fgets", instance_pos = -1)]
-               public weak string gets (char[] s);
+               public unowned string gets (char[] s);
                [CCode (cname = "feof")]
                public bool eof ();
                [CCode (cname = "fscanf"), ScanfFormat]
index 16ab86fa10da906398497fc2d2e5a575ac226925..069d2496ed76f009daf464ecb148e7c77e0ac8d3 100644 (file)
@@ -62,7 +62,7 @@ namespace Raptor {
                [CCode (cname = "raptor_new_uri")]
                public Uri (string uri_string);
                public static string filename_to_uri_string (string filename);
-               public weak string as_string ();
+               public unowned string as_string ();
        }
 }
 
index e4431859dcd9b01b38c2859953ca7ca8ca136e14..e9f78068bad86ceaafd25f3030fac80a3642165c 100644 (file)
@@ -37,7 +37,7 @@ namespace Rasqal {
                }
 
                public Operator get_operator ();
-               public weak Triple get_triple (int idx);
+               public unowned Triple get_triple (int idx);
                public void print (GLib.FileStream fh);
        }
 
@@ -85,8 +85,8 @@ namespace Rasqal {
 
                public Type type;
 
-               public weak string? as_string ();
-               public weak Variable? as_variable ();
+               public unowned string? as_string ();
+               public unowned Variable? as_variable ();
        }
 
        [Compact]
@@ -97,10 +97,10 @@ namespace Rasqal {
                public bool get_distinct ();
                public int get_limit ();
                public int get_offset ();
-               public weak Expression? get_group_condition (int idx);
-               public weak Expression? get_order_condition (int idx);
-               public weak GraphPattern get_query_graph_pattern ();
-               public weak Variable? get_variable (int idx);
+               public unowned Expression? get_group_condition (int idx);
+               public unowned Expression? get_order_condition (int idx);
+               public unowned GraphPattern get_query_graph_pattern ();
+               public unowned Variable? get_variable (int idx);
                public int prepare (string? query_string, Raptor.Uri? base_uri);
        }
 
index bbdf0d6888ec55a1a3b8baf1b689542940388862..9f4e0a342f95c99173a3c902d424904cc81288cd 100644 (file)
@@ -630,10 +630,10 @@ namespace Readline {
        public void list_funmap_names ();
 
        [CCode (cname = "rl_invoking_keyseqs_in_map")]
-       public weak string[] invoking_keyseqs_in_map (CommandFunc func, KeyMap map);
+       public unowned string[] invoking_keyseqs_in_map (CommandFunc func, KeyMap map);
 
        [CCode (cname = "rl_invoking_keyseqs")]
-       public weak string[] invoking_keyseqs (CommandFunc func);
+       public unowned string[] invoking_keyseqs (CommandFunc func);
 
        [CCode (cname = "rl_function_dumper")]
        public void function_dumper (int readable);
@@ -684,7 +684,7 @@ namespace Readline {
        public int add_funmap_entry (string name, CommandFunc func);
 
        [CCode (cname = "rl_funmap_names")]
-       public weak string[] funmap_names ();
+       public unowned string[] funmap_names ();
 
        [CCode (cname = "rl_initialize_funmap")]
        public void initialize_funmap ();
@@ -852,7 +852,7 @@ namespace Readline {
        public void display_match_list (string[] matches, int len, int max);
 
        [CCode (cname = "rl_completion_matches")]
-       public weak string[] completion_matches (string text, CompentryFunc func);
+       public unowned string[] completion_matches (string text, CompentryFunc func);
 
        [CCode (cname = "rl_username_completion_function")]
        public string username_completion_function (string text, int state);
index c7a83ef9392e2702655da122def3ff2369877c38..51bfe7094e4b21fa352af1c2e127dad20f85079b 100644 (file)
@@ -63,7 +63,7 @@ namespace SDLNet {
                 * is returned.  
                 */
                [CCode (cname="SDLNet_ResolveIP")]
-               public weak string? lookup();
+               public unowned string? lookup();
        }// IPAddress
 
        [CCode (cname="UDPpacket", free_function="SDLNet_FreePacket")]
index c9d3e266cd2fa71d5e82d135ea79b2366f7604df..702e8e01169e89c0e6f0fcb64f3ee66afedbe559 100644 (file)
@@ -41,7 +41,7 @@ namespace Sqlite {
                public static int open (string filename, out Database db);
                public static int open_v2 (string filename, out Database db, int flags = OPEN_READWRITE | OPEN_CREATE, string? zVfs = null);
                public int errcode ();
-               public weak string errmsg ();
+               public unowned string errmsg ();
                public int prepare (string sql, int n_bytes, out Statement stmt, out string tail = null);
                public int prepare_v2 (string sql, int n_bytes, out Statement stmt, out string tail = null);
                public void trace (TraceCallback? xtrace);
@@ -74,7 +74,7 @@ namespace Sqlite {
                [CCode (cname = "sqlite3_value_int64")]
                public int64 to_int64 ();
                [CCode (cname = "sqlite3_value_text")]
-               public weak string to_text ();
+               public unowned string to_text ();
                [CCode (cname = "sqlite3_value_type")]
                public int to_type ();
                [CCode (cname = "sqlite3_value_numeric_type")]
@@ -169,11 +169,11 @@ namespace Sqlite {
        public class Statement {
                public int bind_parameter_count ();
                public int bind_parameter_index (string name);
-               public weak string bind_parameter_name (int index);
+               public unowned string bind_parameter_name (int index);
                public int clear_bindings ();
                public int column_count ();
                public int data_count ();
-               public weak Database db_handle ();
+               public unowned Database db_handle ();
                public int reset ();
                public int step ();
                public int bind_blob (int index, void* value, int n, GLib.DestroyNotify destroy_notify);
@@ -189,11 +189,11 @@ namespace Sqlite {
                public double column_double (int col);
                public int column_int (int col);
                public int64 column_int64 (int col);
-               public weak string column_text (int col);
+               public unowned string column_text (int col);
                public int column_type (int col);
-               public weak Value column_value (int col);
-               public weak string column_name (int index);
-               public weak string sql ();
+               public unowned Value column_value (int col);
+               public unowned string column_name (int index);
+               public unowned string sql ();
        }
 
        [Compact]
index fc0b368c6c8ca33a231281f386f8555b8be8dc21..f5ef308cbf5c49eb3445838a0fc6a6e236cb0a8c 100644 (file)
@@ -631,17 +631,17 @@ namespace Tiff {
                [CCode (cname = "TIFFDefaultTileSize")]
                public void DefaultTileSize (out uint32 p1, out uint32 p2);
                [CCode (cname = "TIFFFieldWithName")]
-               public weak FieldInfo FieldWithName (string p1);
+               public unowned FieldInfo FieldWithName (string p1);
                [CCode (cname = "TIFFFieldWithTag")]
-               public weak FieldInfo FieldWithTag (ttag_t p1);
+               public unowned FieldInfo FieldWithTag (ttag_t p1);
                [CCode (cname = "TIFFFileName")]
-               public weak string FileName ();
+               public unowned string FileName ();
                [CCode (cname = "TIFFFileno")]
                public int Fileno ();
                [CCode (cname = "TIFFFindFieldInfo")]
-               public weak FieldInfo FindFieldInfo (ttag_t p1, DataType p2);
+               public unowned FieldInfo FindFieldInfo (ttag_t p1, DataType p2);
                [CCode (cname = "TIFFFindFieldInfoByName")]
-               public weak FieldInfo FindFieldInfoByName (string p1, DataType p2);
+               public unowned FieldInfo FindFieldInfoByName (string p1, DataType p2);
                [CCode (cname = "TIFFFlush")]
                public bool Flush ();
                [CCode (cname = "TIFFFlushData")]
@@ -743,7 +743,7 @@ namespace Tiff {
                [CCode (cname = "TIFFSetField")]
                public bool SetField (ttag_t p1, ...);
                [CCode (cname = "TIFFSetFileName")]
-               public weak string SetFileName (string p1);
+               public unowned string SetFileName (string p1);
                [CCode (cname = "TIFFSetFileno")]
                public int SetFileno (int p1);
                [CCode (cname = "TIFFSetMode")]
index a47d5db330cbcb5c7a50527138de9831f9cde9d6..78ab64fee74ad2efb0752b7f6c0b51966600238a 100644 (file)
@@ -82,7 +82,7 @@ namespace X {
                public int flush ();
 
                [CCode (cname = "XGetKeyboardMapping", array_length = false)]
-               public weak uint[] get_keyboard_mapping (uint first_keycode, int keycode_count, ref int keysyms_per_keycode_return);
+               public unowned uint[] get_keyboard_mapping (uint first_keycode, int keycode_count, ref int keysyms_per_keycode_return);
 
                [CCode (cname = "XGetModifierMapping")]
                public ModifierKeymap get_modifier_mapping ();
@@ -184,7 +184,7 @@ namespace X {
                public int screen_count ();
 
                [CCode (cname = "XScreenOfDisplay")]
-               public weak Screen screen_of_display (int screen_number);
+               public unowned Screen screen_of_display (int screen_number);
 
                [CCode (cname = "XSelectInput")]
                public int select_input (Window w, long event_mask);
index 446d8598e8e58141a94914bbf43ac07de6bcc6da..dcd292aae858d76c6d209e562f53c653f6718ef3 100644 (file)
@@ -175,7 +175,7 @@ namespace ZLib {
                [PrintfFormat]
                public int printf (string format, ...);
                public int puts (string s);
-               public weak string gets (char[] buf);
+               public unowned string gets (char[] buf);
                public int flush (int flush);
                public int rewind ();
                public bool eof ();