[glibmm/gmmproc-refactor] Remove some deprecated macro options.



commit 7a2a9b7f4aa315e4f4f0a6d4d5f7822cad2d3bda
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Sun Jul 22 15:53:25 2012 +0200

    Remove some deprecated macro options.

 glib/src/bytes.hg         |    2 --
 glib/src/checksum.hg      |    9 +++------
 glib/src/convert.hg       |    4 +---
 glib/src/date.hg          |    6 ++----
 glib/src/datetime.hg      |    2 --
 glib/src/fileutils.hg     |    6 ++----
 glib/src/iochannel.hg     |   28 +++++++++++++---------------
 glib/src/keyfile.hg       |   40 ++++++++++++++++++----------------------
 glib/src/markup.hg        |    6 ++----
 glib/src/module.hg        |    4 +---
 glib/src/nodetree.hg      |    2 --
 glib/src/optioncontext.hg |    8 ++------
 glib/src/optionentry.hg   |    2 --
 glib/src/optiongroup.hg   |    2 --
 glib/src/regex.hg         |   26 +++++++++++---------------
 glib/src/shell.hg         |    4 +---
 glib/src/spawn.hg         |    6 ++----
 glib/src/threads.hg       |    5 +----
 glib/src/timezone.hg      |    4 +---
 glib/src/unicode.hg       |   10 ++++------
 glib/src/uriutils.hg      |    2 --
 glib/src/valuearray.hg    |    2 --
 glib/src/variant.hg       |    5 -----
 glib/src/variantiter.hg   |    1 -
 glib/src/varianttype.hg   |    6 ------
 25 files changed, 64 insertions(+), 128 deletions(-)
---
diff --git a/glib/src/bytes.hg b/glib/src/bytes.hg
index 24aa1e0..3bbc2fc 100644
--- a/glib/src/bytes.hg
+++ b/glib/src/bytes.hg
@@ -17,8 +17,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmmconfig.h>
 #include <glibmm/refptr.h>
 #include <glibmm/ustring.h>
diff --git a/glib/src/checksum.hg b/glib/src/checksum.hg
index 28bf21b..1897bfa 100644
--- a/glib/src/checksum.hg
+++ b/glib/src/checksum.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glib.h>
 #include <string>
 
@@ -61,9 +59,7 @@ public:
    *
    * @newin{2,16}
    */
-  _WRAP_ENUM(ChecksumType, GChecksumType, NO_GTYPE)
-
-#m4 _CONVERSION(`ChecksumType', `GChecksumType', `(($2)$3)')
+  _WRAP_ENUM(ChecksumType, GChecksumType)
 
   /** Creates a new Checksum, using the checksum algorithm @a checksum_type. 
    * If the checksum_type is not known, then operator bool() will return false.
@@ -80,8 +76,9 @@ public:
   _WRAP_METHOD(void reset(), g_checksum_reset)
   
   //TODO: length should really be gssize, not gsize, when we can break ABI:
-#m4 _CONVERSION(`gsize',`gssize',`(gssize)($3)')
+  _PUSH_NAMED_CONV(gsize_to_gssize, gsize, gssize, static_cast<gssize>(##ARG##), NONE, NONE)
   _WRAP_METHOD(void update(const guchar* data, gsize length), g_checksum_update)
+  _POP_NAMED_CONV(gsize_to_gssize)
 
   /** Feeds data into an existing Checksum.
    * The checksum must still be open, that is get_string() or get_digest() must not have been called on the checksum.
diff --git a/glib/src/convert.hg b/glib/src/convert.hg
index 3ceb325..71e416f 100644
--- a/glib/src/convert.hg
+++ b/glib/src/convert.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmmconfig.h>
 #include <glibmm/error.h>
 #include <glibmm/ustring.h>
@@ -45,7 +43,7 @@ namespace Glib
  * you should always catch those errors, and then try to recover, or tell the
  * user the input was invalid.
  */
-_WRAP_GERROR(ConvertError, GConvertError, G_CONVERT_ERROR, NO_GTYPE)
+_WRAP_GERROR(ConvertError, GConvertError)
 
 
 /** Thin %iconv() wrapper.
diff --git a/glib/src/date.hg b/glib/src/date.hg
index f54bf9e..5bec506 100644
--- a/glib/src/date.hg
+++ b/glib/src/date.hg
@@ -19,13 +19,11 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+_PUSH_SECTION(CC_PRE_INCLUDES)
 /* So we can use deprecated functions in our deprecated methods */
 #undef G_DISABLE_DEPRECATED
 #define GLIB_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
+_POP_SECTION
 
 #include <glibmmconfig.h>
 #include <glibmm/ustring.h>
diff --git a/glib/src/datetime.hg b/glib/src/datetime.hg
index 539a9ce..dba137c 100644
--- a/glib/src/datetime.hg
+++ b/glib/src/datetime.hg
@@ -17,8 +17,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmmconfig.h>
 #include <glibmm/refptr.h>
 #include <glibmm/ustring.h>
diff --git a/glib/src/fileutils.hg b/glib/src/fileutils.hg
index 4ac46aa..fb7a4f0 100644
--- a/glib/src/fileutils.hg
+++ b/glib/src/fileutils.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 extern "C" { typedef struct _GDir GDir; }
 #endif
@@ -32,7 +30,7 @@ extern "C" { typedef struct _GDir GDir; }
 namespace Glib
 {
 
-_WRAP_ENUM(FileTest, GFileTest, NO_GTYPE)
+_WRAP_ENUM(FileTest, GFileTest)
 
 /** @defgroup FileUtils File Utilities
  * Various file-related classes and functions.
@@ -41,7 +39,7 @@ _WRAP_ENUM(FileTest, GFileTest, NO_GTYPE)
 /** Exception class for file-related errors.
  * @ingroup FileUtils
  */
-_WRAP_GERROR(FileError, GFileError, G_FILE_ERROR,
+_WRAP_GERROR(FileError, GFileError,
     sed s#^EXIST$#EXISTS#,
     sed s#^ISDIR$#IS_DIRECTORY#,
     sed s#^ACCES$#ACCESS_DENIED#,
diff --git a/glib/src/iochannel.hg b/glib/src/iochannel.hg
index 93f338a..c006e01 100644
--- a/glib/src/iochannel.hg
+++ b/glib/src/iochannel.hg
@@ -20,8 +20,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmmconfig.h>
 #include <glib.h> //For the GIOChannel enum values.
 #include <glibmm/error.h>
@@ -40,9 +38,9 @@ namespace Glib
 class Source;
 class IOSource;
 
-_WRAP_ENUM(SeekType, GSeekType, NO_GTYPE, sed s#^SEEK_#SEEK_TYPE_#)
-_WRAP_ENUM(IOStatus, GIOStatus, NO_GTYPE)
-_WRAP_ENUM(IOFlags, GIOFlags, NO_GTYPE)
+_WRAP_ENUM(SeekType, GSeekType, sed s#^SEEK_#SEEK_TYPE_#)
+_WRAP_ENUM(IOStatus, GIOStatus)
+_WRAP_ENUM(IOFlags, GIOFlags)
 
 
 /** A bitwise combination representing an I/O condition to watch for on an
@@ -55,11 +53,11 @@ _WRAP_ENUM(IOFlags, GIOFlags, NO_GTYPE)
  *   do_some_output();
  * @endcode
  */
-_WRAP_ENUM(IOCondition, GIOCondition, NO_GTYPE)
+_WRAP_ENUM(IOCondition, GIOCondition)
 
 /** Exception class for IOChannel errors.
  */
-_WRAP_GERROR(IOChannelError, GIOChannelError, G_IO_CHANNEL_ERROR, NO_GTYPE,
+_WRAP_GERROR(IOChannelError, GIOChannelError,
     sed s#^INVAL$#INVALID_ARGUMENT#,
     sed s#^ISDIR$#IS_DIRECTORY#,
     sed s#^PIPE$#BROKEN_PIPE#,
@@ -175,7 +173,7 @@ public:
    * @throw Glib::IOChannelError
    * @throw Glib::ConvertError
    */
-  _WRAP_METHOD(IOStatus read(gunichar& thechar), g_io_channel_read_unichar, errthrow)
+  _WRAP_METHOD(IOStatus read(gunichar& thechar), g_io_channel_read_unichar)
 
   /** Read a character sequence into memory.
    * @param buf A buffer to read data into.
@@ -190,7 +188,7 @@ public:
    * @throw Glib::ConvertError
    */
   _WRAP_METHOD(IOStatus read(char* buf, gsize count, gsize& bytes_read),
-               g_io_channel_read_chars, errthrow)
+               g_io_channel_read_chars)
 
   /** Read a maximum of @a count bytes into @a str.
    * @param count The maximum number of bytes to read.
@@ -242,7 +240,7 @@ public:
    * @throw Glib::ConvertError
    */
   _WRAP_METHOD(IOStatus write(const char* buf, gssize count, gsize& bytes_written),
-               g_io_channel_write_chars, errthrow)
+               g_io_channel_write_chars)
 
   /** Write a single UCS-4 character to the I/O channel.
    * @param unichar The character to write.
@@ -250,7 +248,7 @@ public:
    * @throw Glib::IOChannelError
    * @throw Glib::ConvertError
    */
-  _WRAP_METHOD(IOStatus write(gunichar unichar), g_io_channel_write_unichar, errthrow)
+  _WRAP_METHOD(IOStatus write(gunichar unichar), g_io_channel_write_unichar)
 
   /** Seek the I/O channel to a specific position.
    * @param offset The offset in bytes from the position specified by @a type.
@@ -262,14 +260,14 @@ public:
    * @throw Glib::ConvertError
    */
   _WRAP_METHOD(IOStatus seek(gint64 offset, SeekType type = SEEK_TYPE_SET),
-               g_io_channel_seek_position, errthrow)
+               g_io_channel_seek_position)
 
   /** Flush the buffers of the I/O channel.
    * @return The status of the operation.
    * @throw Glib::IOChannelError
    * @throw Glib::ConvertError
    */
-  _WRAP_METHOD(IOStatus flush(), g_io_channel_flush, errthrow)
+  _WRAP_METHOD(IOStatus flush(), g_io_channel_flush)
 
   /** Close the I/O channel.
    * Any pending data to be written will be flushed if @a flush is <tt>true</tt>.
@@ -279,7 +277,7 @@ public:
    * @return The status of the operation.
    * @throw Glib::IOChannelError
    */
-  _WRAP_METHOD(IOStatus close(bool flush = true), g_io_channel_shutdown, errthrow)
+  _WRAP_METHOD(IOStatus close(bool flush = true), g_io_channel_shutdown)
 
   /** Get the IOChannel internal buffer size.
    * @return The buffer size.
@@ -309,7 +307,7 @@ public:
    * @return The operation result code.
    * @throw Glib::IOChannelError
    */
-  _WRAP_METHOD(IOStatus set_flags(IOFlags flags), g_io_channel_set_flags, errthrow)
+  _WRAP_METHOD(IOStatus set_flags(IOFlags flags), g_io_channel_set_flags)
 
   /** Set the buffering status of the I/O channel.
    * The buffering state can only be set if the channel's encoding is
diff --git a/glib/src/keyfile.hg b/glib/src/keyfile.hg
index f080a24..61fb03b 100644
--- a/glib/src/keyfile.hg
+++ b/glib/src/keyfile.hg
@@ -17,8 +17,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmmconfig.h>
 #include <glibmm/ustring.h>
 #include <glibmm/arrayhandle.h>
@@ -33,11 +31,11 @@ extern "C" { typedef struct _GKeyFile GKeyFile; }
 namespace Glib
 {
 
-  _WRAP_ENUM(KeyFileFlags, GKeyFileFlags, NO_GTYPE)
+  _WRAP_ENUM(KeyFileFlags, GKeyFileFlags)
 
 /** Exception class for KeyFile errors.
  */
-_WRAP_GERROR(KeyFileError, GKeyFileError, G_KEY_FILE_ERROR, NO_GTYPE)
+_WRAP_GERROR(KeyFileError, GKeyFileError)
 
 /** This class lets you parse, edit or create files containing groups of key-value pairs, which we call key files 
  * for lack of a better name. Several freedesktop.org specifications use key files now, e.g the Desktop Entry 
@@ -124,7 +122,7 @@ public:
   KeyFile(GKeyFile* castitem, bool takes_ownership = false);
 
 public:
-  _WRAP_METHOD(bool load_from_file(const std::string& filename, KeyFileFlags flags = Glib::KEY_FILE_NONE), g_key_file_load_from_file, errthrow)
+  _WRAP_METHOD(bool load_from_file(const std::string& filename, KeyFileFlags flags = Glib::KEY_FILE_NONE), g_key_file_load_from_file)
 
   /** Loads a KeyFile from memory
    * @param data The data to use as a KeyFile
@@ -135,10 +133,8 @@ public:
   bool load_from_data(const Glib::ustring& data, KeyFileFlags flags = Glib::KEY_FILE_NONE);
   _IGNORE(g_key_file_load_from_data)
 
-#m4 _CONVERSION(`const Glib::ArrayHandle<std::string>&', `const gchar**', `const_cast<const gchar**>($3.data())')
-#m4 _CONVERSION(`Glib::ArrayHandle<std::string>&', `gchar**', `const_cast<gchar**>($3.data())')
   // TODO: This is wrong - full_path should be a std::string& (an out param).
-  //_WRAP_METHOD(bool load_from_dirs(const std::string& file, const Glib::ArrayHandle<std::string>& search_dirs, Glib::ArrayHandle<std::string>& full_path, KeyFileFlags flags = Glib::KEY_FILE_NONE), g_key_file_load_from_dirs, errthrow)
+  //_WRAP_METHOD(bool load_from_dirs(const std::string& file, const Glib::ArrayHandle<std::string>& search_dirs, Glib::ArrayHandle<std::string>& full_path, KeyFileFlags flags = Glib::KEY_FILE_NONE), g_key_file_load_from_dirs)
   // This has to be wrapped by hand.
   //_WRAP_METHOD(bool load_from_dirs(const std::string& file, const Glib::ArrayHandle<std::string>& search_dirs, std::string& full_path, KeyFileFlags flags = Glib::KEY_FILE_NONE, g_key_file_load_from_dirs)
 
@@ -180,10 +176,10 @@ public:
   _IGNORE(g_key_file_get_keys)
 
   _WRAP_METHOD(bool has_group(const Glib::ustring& group_name) const, g_key_file_has_group)
-  _WRAP_METHOD(bool has_key(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_has_key, errthrow)
+  _WRAP_METHOD(bool has_key(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_has_key)
 	
-  _WRAP_METHOD(Glib::ustring get_value(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_value, errthrow)
-  _WRAP_METHOD(Glib::ustring get_string(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_string, errthrow)
+  _WRAP_METHOD(Glib::ustring get_value(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_value)
+  _WRAP_METHOD(Glib::ustring get_string(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_string)
 
   /** Gets the value associated with @a key under @a group_name translated
    * into the current locale.
@@ -193,7 +189,7 @@ public:
   Glib::ustring get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key) const;
   _IGNORE(g_key_file_get_locale_string)
 
-  _WRAP_METHOD(Glib::ustring get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const, g_key_file_get_locale_string, errthrow)
+  _WRAP_METHOD(Glib::ustring get_locale_string(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& locale) const, g_key_file_get_locale_string)
 
   /** Gets the value in the first group, under @a key, interpreting it as
    * a boolean.
@@ -204,7 +200,7 @@ public:
    */
   bool get_boolean(const Glib::ustring& key) const;
 
-  _WRAP_METHOD(bool get_boolean(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_boolean, errthrow)
+  _WRAP_METHOD(bool get_boolean(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_boolean)
 
   /** Gets the value in the first group, under @a key, interpreting it as
    * an integer.
@@ -215,7 +211,7 @@ public:
    */
   int get_integer(const Glib::ustring& key) const;
 
-  _WRAP_METHOD(int get_integer(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_integer, errthrow)
+  _WRAP_METHOD(int get_integer(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_integer)
 
   /** Gets the value in the first group, under @a key, interpreting it as
    * a signed 64-bit integer. This is similar to get_integer() but can return
@@ -228,7 +224,7 @@ public:
    */
   gint64 get_int64(const Glib::ustring& key) const;
 
-  _WRAP_METHOD(gint64 get_int64(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_int64, errthrow)
+  _WRAP_METHOD(gint64 get_int64(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_int64)
 
   /** Gets the value in the first group, under @a key, interpreting it as
    * an unsigned 64-bit integer. This is similar to get_integer() but can
@@ -241,7 +237,7 @@ public:
    */
   guint64 get_uint64(const Glib::ustring& key) const;
 
-  _WRAP_METHOD(guint64 get_uint64(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_uint64, errthrow)
+  _WRAP_METHOD(guint64 get_uint64(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_uint64)
 
   /** Gets the value in the first group, under @a key, interpreting it as
    * a double.
@@ -253,7 +249,7 @@ public:
    */
   double get_double(const Glib::ustring& key) const;
 
-  _WRAP_METHOD(double get_double(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_double, errthrow)
+  _WRAP_METHOD(double get_double(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_double)
 
   _WRAP_METHOD(void set_double(const Glib::ustring& group_name, const Glib::ustring& key, double value), g_key_file_set_double)
 
@@ -335,7 +331,7 @@ public:
    */
   Glib::ustring get_comment(const Glib::ustring& group_name) const;
 
-  _WRAP_METHOD(Glib::ustring get_comment(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_comment, errthrow)
+  _WRAP_METHOD(Glib::ustring get_comment(const Glib::ustring& group_name, const Glib::ustring& key) const, g_key_file_get_comment)
 	
   _WRAP_METHOD(void set_list_separator(gchar separator), g_key_file_set_list_separator)
   _WRAP_METHOD(void set_value(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& value), g_key_file_set_value)
@@ -410,11 +406,11 @@ public:
    */
   void set_comment(const Glib::ustring& group_name, const Glib::ustring& comment);
 
-  _WRAP_METHOD(void set_comment(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& comment), g_key_file_set_comment, errthrow)
+  _WRAP_METHOD(void set_comment(const Glib::ustring& group_name, const Glib::ustring& key, const Glib::ustring& comment), g_key_file_set_comment)
 
-  _WRAP_METHOD(void remove_comment(const Glib::ustring& group_name, const Glib::ustring& key), g_key_file_remove_comment, errthrow)
-  _WRAP_METHOD(void remove_key(const Glib::ustring& group_name, const Glib::ustring& key), g_key_file_remove_key, errthrow)
-  _WRAP_METHOD(void remove_group(const Glib::ustring& group_name), g_key_file_remove_group, errthrow)
+  _WRAP_METHOD(void remove_comment(const Glib::ustring& group_name, const Glib::ustring& key), g_key_file_remove_comment)
+  _WRAP_METHOD(void remove_key(const Glib::ustring& group_name, const Glib::ustring& key), g_key_file_remove_key)
+  _WRAP_METHOD(void remove_group(const Glib::ustring& group_name), g_key_file_remove_group)
 
   GKeyFile*       gobj()       { return gobject_; }
   const GKeyFile* gobj() const { return gobject_; }
diff --git a/glib/src/markup.hg b/glib/src/markup.hg
index f997590..16547d5 100644
--- a/glib/src/markup.hg
+++ b/glib/src/markup.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmm/error.h>
 #include <sigc++/sigc++.h>
 #include <map>
@@ -68,7 +66,7 @@ namespace Glib
 
 /** %Exception class for markup parsing errors.
  */
-_WRAP_GERROR(MarkupError, GMarkupError, G_MARKUP_ERROR, NO_GTYPE)
+_WRAP_GERROR(MarkupError, GMarkupError)
 
 /*! @var MarkupError::Code MarkupError::BAD_UTF8
  * Text being parsed was not valid UTF-8.
@@ -119,7 +117,7 @@ Glib::ustring escape_text(const Glib::ustring& text);
  * the flags argument to all functions (this should be the default argument
  * anyway).
  */
-_WRAP_ENUM(ParseFlags, GMarkupParseFlags, NO_GTYPE, sed s#^MARKUP_##)
+_WRAP_ENUM(ParseFlags, GMarkupParseFlags, sed s#^MARKUP_##)
 
 /*! @var Markup::ParseFlags DO_NOT_USE_THIS_UNSUPPORTED_FLAG
  * Flag you should not use.
diff --git a/glib/src/module.hg b/glib/src/module.hg
index 9f93fe1..99bcf1e 100644
--- a/glib/src/module.hg
+++ b/glib/src/module.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GModule-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <string>
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -30,7 +28,7 @@ extern "C" { typedef struct _GModule GModule; }
 namespace Glib
 {
 
-_WRAP_ENUM(ModuleFlags, GModuleFlags, NO_GTYPE)
+_WRAP_ENUM(ModuleFlags, GModuleFlags)
 
 //TODO: Replace get_last_error() with exceptions?
 //Provide operator()?
diff --git a/glib/src/nodetree.hg b/glib/src/nodetree.hg
index 0f13850..75fda97 100644
--- a/glib/src/nodetree.hg
+++ b/glib/src/nodetree.hg
@@ -17,8 +17,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <map>
 #include <stack>
 #include <deque>
diff --git a/glib/src/optioncontext.hg b/glib/src/optioncontext.hg
index ab0bc08..d3988c0 100644
--- a/glib/src/optioncontext.hg
+++ b/glib/src/optioncontext.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmm/optionentry.h>
 #include <glibmm/optiongroup.h>
 #include <glibmm/error.h>
@@ -36,7 +34,7 @@ namespace Glib
 
 /** Exception class for options.
  */
-_WRAP_GERROR(OptionError, GOptionError, G_OPTION_ERROR, NO_GTYPE)
+_WRAP_GERROR(OptionError, GOptionError)
 
 /** An OptionContext defines which options are accepted by the commandline option parser.
  */
@@ -61,8 +59,7 @@ public:
   _WRAP_METHOD(void set_ignore_unknown_options(bool ignore_unknown = true), g_option_context_set_ignore_unknown_options)
   _WRAP_METHOD(bool get_ignore_unknown_options() const, g_option_context_get_ignore_unknown_options)
 
-#m4 _CONVERSION(`char**&',`gchar***',`&($3)')
-  _WRAP_METHOD(bool parse(int& argc, char**& argv), g_option_context_parse, errthrow)
+  _WRAP_METHOD(bool parse(int& argc, char**& argv), g_option_context_parse)
 
   //g_option_context_add_main_entries(), just creates a group internally, adds them to it, and does a set_main_group()
   //- a group without callbacks seems to do some simple default parsing.
@@ -90,7 +87,6 @@ public:
   //const OptionGroup& get_main_group() const;
   _IGNORE(g_option_context_get_main_group)
 
-  #m4 _CONVERSION(`const OptionGroup&',`GOptionGroup*',`const_cast<GOptionGroup*>(($3).gobj())')
   _WRAP_METHOD(Glib::ustring get_help(bool main_help, const OptionGroup& group) const, g_option_context_get_help)
  
   /** Returns a formatted, translated help text for the given context. 
diff --git a/glib/src/optionentry.hg b/glib/src/optionentry.hg
index 945e752..e7137cf 100644
--- a/glib/src/optionentry.hg
+++ b/glib/src/optionentry.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmm/ustring.h>
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/glib/src/optiongroup.hg b/glib/src/optiongroup.hg
index 6a69a4c..ef9e40b 100644
--- a/glib/src/optiongroup.hg
+++ b/glib/src/optiongroup.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmm/ustring.h>
 #include <sigc++/slot.h>
 #include <map>
diff --git a/glib/src/regex.hg b/glib/src/regex.hg
index ea8f770..47bad4a 100644
--- a/glib/src/regex.hg
+++ b/glib/src/regex.hg
@@ -17,8 +17,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmmconfig.h>
 #include <glibmm/refptr.h>
 #include <glibmm/ustring.h>
@@ -33,12 +31,12 @@ typedef struct _GRegex GRegex;
 namespace Glib
 {
 
-_WRAP_ENUM(RegexCompileFlags, GRegexCompileFlags, NO_GTYPE)
-_WRAP_ENUM(RegexMatchFlags, GRegexMatchFlags, NO_GTYPE)
+_WRAP_ENUM(RegexCompileFlags, GRegexCompileFlags)
+_WRAP_ENUM(RegexMatchFlags, GRegexMatchFlags)
 
 /** Exception class for Regex
  */
-_WRAP_GERROR(RegexError, GRegexError, G_REGEX_ERROR, NO_GTYPE)
+_WRAP_GERROR(RegexError, GRegexError)
 
 
 class MatchInfo;
@@ -167,7 +165,7 @@ public:
     RegexMatchFlags match_options = static_cast<RegexMatchFlags>(0)
   );
 
-  _WRAP_METHOD_DOCS_ONLY(g_regex_match_all_full, errthrow)
+  _WRAP_METHOD_DOCS_ONLY(g_regex_match_all_full)
   /// @throw Glib::Error.
   bool match_all(
     const Glib::ustring& string,
@@ -187,23 +185,21 @@ public:
    */
   bool match_all(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options);
 
-#m4 _CONVERSION(`gchar**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)')
-
   _WRAP_METHOD(static Glib::StringArrayHandle split_simple(const Glib::ustring& pattern, const Glib::ustring& string, RegexCompileFlags compile_options = static_cast<RegexCompileFlags>(0), RegexMatchFlags match_options = static_cast<RegexMatchFlags>(0)), g_regex_split_simple)
   _WRAP_METHOD(Glib::StringArrayHandle split(const Glib::ustring& string, RegexMatchFlags match_options = static_cast<RegexMatchFlags>(0)), g_regex_split)
 
-  _WRAP_METHOD(Glib::StringArrayHandle split(const gchar* string, gssize string_len, int start_position, RegexMatchFlags match_options = static_cast<RegexMatchFlags>(0), int max_tokens = 0) const, g_regex_split_full, errthrow)
+  _WRAP_METHOD(Glib::StringArrayHandle split(const gchar* string, gssize string_len, int start_position, RegexMatchFlags match_options = static_cast<RegexMatchFlags>(0), int max_tokens = 0) const, g_regex_split_full)
 
   Glib::StringArrayHandle split(const Glib::ustring& string, int start_position, RegexMatchFlags match_options, int max_tokens) const;
 
-  _WRAP_METHOD(Glib::ustring replace(const gchar* string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options = static_cast<RegexMatchFlags>(0)), g_regex_replace, errthrow)
+  _WRAP_METHOD(Glib::ustring replace(const gchar* string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options = static_cast<RegexMatchFlags>(0)), g_regex_replace)
   Glib::ustring replace(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options);
 
-  _WRAP_METHOD(Glib::ustring replace_literal(const gchar *string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options = static_cast<RegexMatchFlags>(0)), g_regex_replace_literal, errthrow)
+  _WRAP_METHOD(Glib::ustring replace_literal(const gchar *string, gssize string_len, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options = static_cast<RegexMatchFlags>(0)), g_regex_replace_literal)
   Glib::ustring replace_literal(const Glib::ustring& string, int start_position, const Glib::ustring& replacement, RegexMatchFlags match_options);
 
-  _WRAP_METHOD(Glib::ustring replace_eval(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, GRegexEvalCallback eval,  gpointer user_data), g_regex_replace_eval, errthrow)
-  _WRAP_METHOD(static bool check_replacement(const Glib::ustring& replacement, gboolean* has_references), g_regex_check_replacement, errthrow)
+  _WRAP_METHOD(Glib::ustring replace_eval(const Glib::ustring& string, gssize string_len, int start_position, RegexMatchFlags match_options, GRegexEvalCallback eval,  gpointer user_data), g_regex_replace_eval)
+  _WRAP_METHOD(static bool check_replacement(const Glib::ustring& replacement, gboolean* has_references), g_regex_check_replacement)
 };
 
 //TODO: Add C++ iterator like functionality for this class.
@@ -252,12 +248,12 @@ public:
   _WRAP_METHOD(Glib::ustring get_string() const, g_match_info_get_string)
   _WRAP_METHOD(bool matches() const, g_match_info_matches)
 
-  _WRAP_METHOD(bool next(), g_match_info_next, errthrow)
+  _WRAP_METHOD(bool next(), g_match_info_next)
 
   _WRAP_METHOD(int get_match_count() const, g_match_info_get_match_count)
   _WRAP_METHOD(bool is_partial_match() const, g_match_info_is_partial_match)
 
-  _WRAP_METHOD(Glib::ustring expand_references(const Glib::ustring& string_to_expand), g_match_info_expand_references, errthrow)
+  _WRAP_METHOD(Glib::ustring expand_references(const Glib::ustring& string_to_expand), g_match_info_expand_references)
 
   _WRAP_METHOD(Glib::ustring fetch(int match_num), g_match_info_fetch)
 
diff --git a/glib/src/shell.hg b/glib/src/shell.hg
index 8c7d0a9..1eebd45 100644
--- a/glib/src/shell.hg
+++ b/glib/src/shell.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmm/arrayhandle.h>
 #include <glibmm/error.h>
 #include <glib.h>
@@ -36,7 +34,7 @@ namespace Glib
 
 /** Exception class for shell utility errors.
  */
-_WRAP_GERROR(ShellError, GShellError, G_SHELL_ERROR, NO_GTYPE)
+_WRAP_GERROR(ShellError, GShellError)
 
 
 /** Parses a command line into an argument vector, in much the same way the
diff --git a/glib/src/spawn.hg b/glib/src/spawn.hg
index 352bebe..107b92e 100644
--- a/glib/src/spawn.hg
+++ b/glib/src/spawn.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmmconfig.h>
 #include <glibmm/arrayhandle.h>
 #include <glibmm/error.h>
@@ -32,7 +30,7 @@ namespace Glib
 
 typedef GPid Pid;
 
-_WRAP_ENUM(SpawnFlags, GSpawnFlags, NO_GTYPE)
+_WRAP_ENUM(SpawnFlags, GSpawnFlags)
 
 /** @defgroup Spawn Spawning Processes
  * Process launching with fork()/exec().
@@ -41,7 +39,7 @@ _WRAP_ENUM(SpawnFlags, GSpawnFlags, NO_GTYPE)
 
 /** Exception class for errors occuring when spawning processes.
  */
-_WRAP_GERROR(SpawnError, GSpawnError, G_SPAWN_ERROR, sed s#^2BIG$#TOOBIG#)
+_WRAP_GERROR(SpawnError, GSpawnError, sed s#^2BIG$#TOOBIG#)
 
 /** Executes a child program asynchronously (your program will not
  * block waiting for the child to exit). The child program is
diff --git a/glib/src/threads.hg b/glib/src/threads.hg
index e692203..621f56d 100644
--- a/glib/src/threads.hg
+++ b/glib/src/threads.hg
@@ -17,7 +17,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
 _CONFIGINCLUDE(glibmmconfig.h)
 
 #include <glib.h>
@@ -32,8 +31,6 @@ namespace Glib
 
 namespace Threads
 {
-//The GMMPROC_EXTRA_NAMESPACE() macro is a hint to generate_wrap_init.pl to put it in the Threads sub-namespace
-_GMMPROC_EXTRA_NAMESPACE(Threads)
 
 /** @defgroup Threads Threads
  * Thread abstraction; including threads, different mutexes,
@@ -50,7 +47,7 @@ class RWLock;
 
 /** Exception class for thread-related errors.
  */
-_WRAP_GERROR(ThreadError, GThreadError, G_THREAD_ERROR, NO_GTYPE)
+_WRAP_GERROR(ThreadError, GThreadError)
 
 
 /** Represents a running thread.
diff --git a/glib/src/timezone.hg b/glib/src/timezone.hg
index 7cc76e5..5fdda6e 100644
--- a/glib/src/timezone.hg
+++ b/glib/src/timezone.hg
@@ -17,8 +17,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmmconfig.h>
 #include <glibmm/refptr.h>
 #include <glibmm/ustring.h>
@@ -31,7 +29,7 @@ typedef struct _GTimeZone GTimeZone;
 namespace Glib
 {
 
-_WRAP_ENUM(TimeType, GTimeType, NO_GTYPE)
+_WRAP_ENUM(TimeType, GTimeType)
 
 /** TimeZone - A structure representing a time zone.
  * TimeZone is a structure that represents a time zone, at no particular point
diff --git a/glib/src/unicode.hg b/glib/src/unicode.hg
index 6ef26fc..2b11570 100644
--- a/glib/src/unicode.hg
+++ b/glib/src/unicode.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glib.h>
 
 // Not used, but we want to get rid of possible <ctype.h> macros.
@@ -48,10 +46,10 @@ _DEFS(glibmm,glib)
 namespace Glib
 {
 
-_WRAP_ENUM(UnicodeType, GUnicodeType, NO_GTYPE)
-_WRAP_ENUM(UnicodeBreakType, GUnicodeBreakType, NO_GTYPE)
-_WRAP_ENUM(AsciiType, GAsciiType, NO_GTYPE)
-_WRAP_ENUM(NormalizeMode, GNormalizeMode, NO_GTYPE)
+_WRAP_ENUM(UnicodeType, GUnicodeType)
+_WRAP_ENUM(UnicodeBreakType, GUnicodeBreakType)
+_WRAP_ENUM(AsciiType, GAsciiType)
+_WRAP_ENUM(NormalizeMode, GNormalizeMode)
 
 /** @defgroup Unicode Unicode Manipulation
  * Functions operating on Unicode characters and UTF-8 strings.
diff --git a/glib/src/uriutils.hg b/glib/src/uriutils.hg
index 31b19e4..cd09d93 100644
--- a/glib/src/uriutils.hg
+++ b/glib/src/uriutils.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <string>
 
 namespace Glib
diff --git a/glib/src/valuearray.hg b/glib/src/valuearray.hg
index 4fdbda1..f459836 100644
--- a/glib/src/valuearray.hg
+++ b/glib/src/valuearray.hg
@@ -19,8 +19,6 @@
 
 _MODULE(GObject-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glib-object.h>
 #include <glibmm/value.h>
 #include <sigc++/functors/slot.h>
diff --git a/glib/src/variant.hg b/glib/src/variant.hg
index ee892a0..d1892cc 100644
--- a/glib/src/variant.hg
+++ b/glib/src/variant.hg
@@ -17,8 +17,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmmconfig.h>
 #include <glibmm/varianttype.h>
 #include <glibmm/variantiter.h>
@@ -112,7 +110,6 @@ public:
   _WRAP_METHOD(Glib::ustring print(bool type_annotate = false) const, g_variant_print)
   _IGNORE(g_variant_print_string)
 
-  #m4 _CONVERSION(`const VariantBase&',`gconstpointer',`const_cast<GVariant*>(($3).gobj())')
   _WRAP_METHOD(guint hash() const, g_variant_hash)
   _PUSH_NAMED_CONV(variantbase_to_gconstpointer, const VariantBase&, gconstpointer, static_cast<gconstpointer>(Glib::unwrap(##ARG##)), NONE, static_cast<gconstpointer>(Glib::unwrap_copy(##ARG##)))
   _WRAP_METHOD(bool equal(const VariantBase& other) const, g_variant_equal)
@@ -310,8 +307,6 @@ public:
   void get_child(VariantBase& child, gsize index = 0) const;
   _IGNORE(g_variant_get_child, g_variant_get_child_value)
 
-#m4 _CONVERSION(`GVariant*',`VariantBase',`Glib::wrap($3, true)')
-
   _WRAP_METHOD(VariantBase get_child(gsize index = 0), g_variant_get_child_value)
 
   /* TODO?:
diff --git a/glib/src/variantiter.hg b/glib/src/variantiter.hg
index 87ab565..cce6c29 100644
--- a/glib/src/variantiter.hg
+++ b/glib/src/variantiter.hg
@@ -18,7 +18,6 @@
 _MODULE(GLib-2.0)
 
 #include <glib.h>
-_DEFS(glibmm,glib)
 
 namespace Glib
 {
diff --git a/glib/src/varianttype.hg b/glib/src/varianttype.hg
index 999e1fb..6e37b20 100644
--- a/glib/src/varianttype.hg
+++ b/glib/src/varianttype.hg
@@ -17,8 +17,6 @@
 
 _MODULE(GLib-2.0)
 
-_DEFS(glibmm,glib)
-
 #include <glibmmconfig.h>
 #include <glib-object.h> //For gsize
 #include <string>
@@ -109,9 +107,6 @@ public:
   VariantType& operator=(const GVariantType* castitem);
 
 
-//The C parameters are actually const, but gmmproc doesn't understand that,
-//so we add a m4 conversion to satisfy it:
-#m4 _CONVERSION(`const VariantType&',`GVariantType*',`($3).gobj()')
   // FIXME: That need fixing in gir - g_variant_type_new_array is treated there as a method instead of constructor, so first parameter is not stored at all.
   _WRAP_METHOD(static VariantType create_array(const VariantType& element), g_variant_type_new_array)
   // FIXME: That need fixing in gir - g_variant_type_new_maybe is treated there as a method instead of constructor, so first parameter is not stored at all.
@@ -136,7 +131,6 @@ public:
   _WRAP_METHOD(bool is_dict_entry() const, g_variant_type_is_dict_entry)
   _WRAP_METHOD(bool is_variant() const, g_variant_type_is_variant)
 
-  #m4 _CONVERSION(`const VariantType&',`gconstpointer',`const_cast<GVariantType*>(($3).gobj())')
   _WRAP_METHOD(guint hash() const, g_variant_type_hash)
   _PUSH_NAMED_CONV(varianttype_to_gconstpointer, const VariantType&, gconstpointer, static_cast<gconstpointer>(Glib::unwrap(##ARG##)), NONE, static_cast<gconstpointer>(Glib::unwrap_copy(##ARG##)))
   _WRAP_METHOD(bool equal(const VariantType& other) const, g_variant_type_equal)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]