[pygobject/invoke-rewrite: 219/219] Merge branch 'master' into invoke-rewrite



commit 17cb714cfdaf45b6d7dd627b0189bd24e6578f74
Merge: 7332a1b 01596a9
Author: John (J5) Palmieri <johnp redhat com>
Date:   Tue Mar 22 13:34:36 2011 -0400

    Merge branch 'master' into invoke-rewrite
    
    Conflicts:
    	gi/Makefile.am
    	gi/pygi-argument.c
    	gi/pygi-foreign-cairo.c
    	gi/pygi-foreign-gvariant.c
    	gi/pygi-foreign-gvariant.h
    	gi/pygi-foreign.c
    	gi/pygi-foreign.h
    	gi/pygi-private.h
    	gi/pygi.h

 .gitignore                                       |   46 -
 Makefile.am                                      |   31 +-
 NEWS                                             |  339 +
 PKG-INFO.in                                      |    2 +-
 README                                           |    3 +-
 autogen.sh                                       |    3 +
 codegen/.gitignore                               |    2 -
 codegen/Makefile.am                              |    2 +
 codegen/argtypes.py                              |    8 +-
 codegen/definitions.py                           |   14 +-
 configure.ac                                     |   51 +-
 demos/gtk-demo/demos/Entry/search_entry.py       |  252 +
 demos/gtk-demo/demos/Icon View/iconviewbasics.py |  218 +
 demos/gtk-demo/demos/Icon View/iconviewedit.py   |  101 +
 demos/gtk-demo/demos/Tree View/liststore.py      |  205 +
 demos/gtk-demo/demos/appwindow.py                |   46 +-
 demos/gtk-demo/demos/clipboard.py                |   32 +-
 demos/gtk-demo/demos/colorselector.py            |   44 +-
 demos/gtk-demo/demos/combobox.py                 |   79 +-
 demos/gtk-demo/demos/dialogs.py                  |  153 +
 demos/gtk-demo/demos/drawingarea.py              |  144 +-
 demos/gtk-demo/demos/expander.py                 |   60 +
 demos/gtk-demo/demos/images.py                   |  312 +
 demos/gtk-demo/demos/infobars.py                 |   99 +
 demos/gtk-demo/demos/links.py                    |   74 +
 demos/gtk-demo/demos/menus.py                    |  122 +
 demos/gtk-demo/demos/pickers.py                  |   74 +
 demos/gtk-demo/demos/pixbuf.py                   |  183 +
 demos/gtk-demo/demos/printing.py                 |  173 +
 demos/gtk-demo/demos/rotatedtext.py              |  196 +
 demos/gtk-demo/gtk-demo.py                       |    9 +-
 docs/.gitignore                                  |    7 -
 docs/Makefile.am                                 |   84 +-
 docs/reference/pygio-appinfo.xml                 |  894 ---
 docs/reference/pygio-applaunchcontext.xml        |  194 -
 docs/reference/pygio-asyncresult.xml             |  117 -
 docs/reference/pygio-bufferedinputstream.xml     |  461 --
 docs/reference/pygio-bufferedoutputstream.xml    |  275 -
 docs/reference/pygio-cancellable.xml             |  290 -
 docs/reference/pygio-classes.xml                 |   47 -
 docs/reference/pygio-constants.xml               | 1540 -----
 docs/reference/pygio-datainputstream.xml         |  799 ---
 docs/reference/pygio-dataoutputstream.xml        |  504 --
 docs/reference/pygio-drive.xml                   |  546 --
 docs/reference/pygio-emblem.xml                  |  232 -
 docs/reference/pygio-emblemedicon.xml            |  160 -
 docs/reference/pygio-file.xml                    | 4534 -------------
 docs/reference/pygio-fileattributeinfo.xml       |   73 -
 docs/reference/pygio-fileenumerator.xml          |  488 --
 docs/reference/pygio-fileicon.xml                |  109 -
 docs/reference/pygio-fileinfo.xml                |  346 -
 docs/reference/pygio-fileinputstream.xml         |  214 -
 docs/reference/pygio-filemonitor.xml             |  128 -
 docs/reference/pygio-fileoutputstream.xml        |  257 -
 docs/reference/pygio-filterinputstream.xml       |  152 -
 docs/reference/pygio-filteroutputstream.xml      |  152 -
 docs/reference/pygio-functions.xml               |  395 --
 docs/reference/pygio-icon.xml                    |  217 -
 docs/reference/pygio-inputstream.xml             |  730 ---
 docs/reference/pygio-loadableicon.xml            |  198 -
 docs/reference/pygio-memoryinputstream.xml       |  151 -
 docs/reference/pygio-memoryoutputstream.xml      |  175 -
 docs/reference/pygio-mount.xml                   |  962 ---
 docs/reference/pygio-mountoperation.xml          |  726 ---
 docs/reference/pygio-outputstream.xml            |  140 -
 docs/reference/pygio-seekable.xml                |  231 -
 docs/reference/pygio-simpleasyncresult.xml       |  317 -
 docs/reference/pygio-themedicon.xml              |  204 -
 docs/reference/pygio-unixinputstream.xml         |  202 -
 docs/reference/pygio-unixoutputstream.xml        |  202 -
 docs/reference/pygio-volume.xml                  |  718 ---
 docs/reference/pygio-volumemonitor.xml           |  844 ---
 docs/reference/pygiounix-classes.xml             |   13 -
 docs/reference/pygobject-ref.xml                 |    2 -
 dsextras.py                                      |   25 +-
 examples/Makefile.am                             |    2 +
 examples/gio/directory-async.py                  |   33 -
 examples/gio/downloader.py                       |   77 -
 gi/.gitignore                                    |   40 -
 gi/Makefile.am                                   |    7 +-
 gi/__init__.py                                   |   30 +-
 gi/gimodule.c                                    |  148 +-
 gi/importer.py                                   |    1 +
 gi/module.py                                     |   86 +-
 gi/overrides/GIMarshallingTests.py               |    2 +-
 gi/overrides/GLib.py                             |  322 +-
 gi/overrides/Gdk.py                              |  159 +-
 gi/overrides/Gio.py                              |  215 +
 gi/overrides/Gtk.py                              |  184 +-
 gi/overrides/Makefile.am                         |    3 +
 gi/overrides/Pango.py                            |    4 +-
 gi/overrides/__init__.py                         |    2 +-
 gi/pygi-argument.c                               |    4 +-
 gi/pygi-argument.h                               |    2 +
 gi/pygi-closure.c                                |   11 +
 gi/pygi-foreign-cairo.c                          |  104 +-
 gi/pygi-foreign-gvariant.c                       |    5 +-
 gi/pygi-foreign-gvariant.h                       |    4 +-
 gi/pygi-foreign.c                                |   24 +-
 gi/pygi-foreign.h                                |   12 +-
 gi/pygi-info.c                                   |   56 +-
 gi/pygi-invoke.c                                 |    6 +-
 gi/pygi-invoke.h                                 |    3 +-
 gi/pygi-private.h                                |    1 +
 gi/pygi-property.c                               |    8 +-
 gi/pygi-repository.c                             |   23 +
 gi/pygi-signal-closure.c                         |  245 +
 gi/pygi-signal-closure.h                         |   46 +
 gi/pygi.h                                        |   40 +-
 gi/repository/Makefile.am                        |    2 +
 gi/tests/Makefile.am                             |    2 +
 gi/types.py                                      |  196 +-
 gio/.gitignore                                   |    3 -
 gio/Makefile.am                                  |  117 -
 gio/__init__.py                                  |   40 -
 gio/gappinfo.override                            |  213 -
 gio/gapplaunchcontext.override                   |   99 -
 gio/gbufferedinputstream.override                |   70 -
 gio/gcancellable.override                        |   38 -
 gio/gdatainputstream.override                    |  250 -
 gio/gdrive.override                              |  347 -
 gio/gfile.override                               | 2215 -------
 gio/gfileattribute.override                      |  153 -
 gio/gfileenumerator.override                     |  184 -
 gio/gfileinfo.override                           |  121 -
 gio/gfileinputstream.override                    |   68 -
 gio/gfileiostream.override                       |   68 -
 gio/gfileoutputstream.override                   |   68 -
 gio/gicon.override                               |  310 -
 gio/ginputstream.override                        |  344 -
 gio/gio-types.defs                               |  807 ---
 gio/gio.defs                                     | 7465 ----------------------
 gio/gio.override                                 |  409 --
 gio/giomodule.c                                  |  208 -
 gio/giostream.override                           |   68 -
 gio/gmemoryinputstream.override                  |   91 -
 gio/gmemoryoutputstream.override                 |   45 -
 gio/gmount.override                              |  454 --
 gio/goutputstream.override                       |  292 -
 gio/gresolver.override                           |  312 -
 gio/gsocket.override                             |  575 --
 gio/gvolume.override                             |  237 -
 gio/gvolumemonitor.override                      |   94 -
 gio/pygio-utils.c                                |  236 -
 gio/pygio-utils.h                                |   49 -
 gio/unix-types.defs                              |   55 -
 gio/unix.defs                                    |  475 --
 gio/unix.override                                |   62 -
 gio/unixmodule.c                                 |   52 -
 git.mk                                           |  200 +
 glib/Makefile.am                                 |    4 +-
 glib/glibmodule.c                                |    5 +-
 glib/pyglib-private.h                            |    3 +
 glib/pyglib.c                                    |   60 +-
 glib/pygmaincontext.c                            |   22 +
 glib/pygmaincontext.h                            |    2 +-
 glib/pygmainloop.c                               |    2 +-
 glib/pygoptioncontext.c                          |   21 +
 glib/pygoptioncontext.h                          |    2 +
 glib/pygoptiongroup.c                            |   26 +
 glib/pygoptiongroup.h                            |    2 +
 glib/pygsource.c                                 |    2 +-
 gobject/.gitignore                               |    3 -
 gobject/Makefile.am                              |    3 +
 gobject/__init__.py                              |    6 +-
 gobject/gobjectmodule.c                          |   53 +-
 gobject/propertyhelper.py                        |   31 +-
 gobject/pygflags.c                               |   15 +-
 gobject/pygobject-private.h                      |   11 +
 gobject/pygobject.c                              |  113 +-
 gobject/pygtype.c                                |    2 +-
 m4/python.m4                                     |   36 +-
 pygi-convert.sh                                  |   89 +-
 pygobject-2.0.pc.in                              |    1 +
 pygobject.doap                                   |    2 +-
 setup.py                                         |   13 +-
 tests/.gitignore                                 |    2 -
 tests/Makefile.am                                |   39 +-
 tests/compathelper.py                            |   19 +
 tests/org.gnome.test.gschema.xml                 |   25 +
 tests/runtests-windows.py                        |    3 -
 tests/runtests.py                                |   16 +-
 tests/test-floating.c                            |   66 +
 tests/test-floating.h                            |   41 +
 tests/test_everything.py                         |   27 +-
 tests/test_gcancellable.py                       |   15 -
 tests/test_gdbus.py                              |  205 +
 tests/test_gi.py                                 |  220 +-
 tests/test_gicon.py                              |  112 -
 tests/test_gio.py                                | 1138 ----
 tests/test_gobject.py                            |  158 +-
 tests/test_gresolver.py                          |   68 -
 tests/test_gsocket.py                            |  126 -
 tests/test_overrides.py                          |  681 ++-
 tests/test_properties.py                         |   32 +
 tests/testhelpermodule.c                         |  107 +-
 196 files changed, 6437 insertions(+), 38327 deletions(-)
---
diff --cc gi/Makefile.am
index 563aac5,31f6c79..dad5203
--- a/gi/Makefile.am
+++ b/gi/Makefile.am
@@@ -53,8 -53,8 +54,10 @@@ _gi_la_SOURCES = 
  	pygi-private.h \
  	pygi-property.c \
  	pygi-property.h \
 +	pygi-cache.h \
 +	pygi-cache.c \
+ 	pygi-signal-closure.c \
+ 	pygi-signal-closure.h \
  	pygobject-external.h \
  	gimodule.c
  
diff --cc gi/pygi-foreign-gvariant.h
index a9fa351,b0c9781..43ea9c7
--- a/gi/pygi-foreign-gvariant.h
+++ b/gi/pygi-foreign-gvariant.h
@@@ -26,13 -26,13 +26,13 @@@
  
  #include "pygi-foreign.h"
  
 -PyObject *g_variant_to_arg(PyObject       *value,
 -                           GITypeInfo     *type_info,
 -                           GITransfer      transfer,
 +PyObject *g_variant_to_arg(PyObject        *value,
 +                           GIInterfaceInfo *interface_info,
 +                           GITransfer       transfer,
                             GIArgument      *arg);
  
- PyObject *g_variant_from_arg(GIInterfaceInfo *interface_info,
-                              GIArgument      *arg);
+ PyObject *g_variant_from_arg(GITypeInfo *type_info,
+                              gpointer    data);
  
  PyObject *g_variant_release_foreign (GIBaseInfo *base_info,
                                       gpointer    struct_);
diff --cc gi/pygi-foreign.c
index b7a9b99,127f8ea..0398450
--- a/gi/pygi-foreign.c
+++ b/gi/pygi-foreign.c
@@@ -110,24 -110,18 +110,21 @@@ PyObject 
  pygi_struct_foreign_convert_to_g_argument (PyObject        *value,
                                             GIInterfaceInfo *interface_info,
                                             GITransfer       transfer,
-                                            GIArgument       *arg)
+                                            GIArgument      *arg)
  {
      PyObject *result;
-     PyGIBaseInfo *base_info = (PyGIBaseInfo *)interface_info;
+ 
+     GIBaseInfo *base_info = (GIBaseInfo *) interface_info;
      PyGIForeignStruct *foreign_struct = pygi_struct_foreign_lookup (base_info);
  
 -    if (foreign_struct == NULL)
 -        return NULL;
 +    if (foreign_struct == NULL) {
 +        PyErr_Format(PyExc_KeyError, "could not find foreign type %s",
 +                     g_base_info_get_name (base_info));
 +        return FALSE;
 +    }
  
      result = foreign_struct->to_func (value, interface_info, transfer, arg);
-     if (result == NULL)
-         return FALSE;
- 
-     Py_DECREF(result);
-     return TRUE;
+     return result;
  }
  
  PyObject *
diff --cc gi/pygi-invoke.h
index 10ca544,dc1ce18..0aa7580
--- a/gi/pygi-invoke.h
+++ b/gi/pygi-invoke.h
@@@ -27,10 -27,11 +27,11 @@@
  #include <girepository.h>
  
  #include "pygi-private.h"
 -
 +#include "pygi-invoke-state-struct.h"
  G_BEGIN_DECLS
  
- PyObject *_wrap_g_function_info_invoke (PyGIBaseInfo *self, PyObject *py_args);
+ PyObject *_wrap_g_callable_info_invoke (PyGIBaseInfo *self, PyObject *py_args,
+                                         PyObject *kwargs);
  
  G_END_DECLS
  
diff --cc gi/pygi-private.h
index 06bd21c,efe62c8..1ef5645
--- a/gi/pygi-private.h
+++ b/gi/pygi-private.h
@@@ -29,7 -29,7 +29,8 @@@
  #include "pygi-callbacks.h"
  #include "pygi-invoke.h"
  #include "pygi-property.h"
 +#include "pygi-cache.h"
+ #include "pygi-signal-closure.h"
  
  G_BEGIN_DECLS
  #if PY_VERSION_HEX >= 0x03000000
diff --cc gi/types.py
index 08cbc22,9b250b1..fdcd8ea
--- a/gi/types.py
+++ b/gi/types.py
@@@ -179,17 -282,11 +274,10 @@@ class StructMeta(type, MetaClassHelper)
  
          cls._setup_fields()
          cls._setup_methods()
 -        cls._setup_constructors()
  
- class Enum(int):
-     __info__ = None
-     def __init__(self, value):
-         int.__init__(value)
- 
-     def __repr__(self):
-         value_name = str(self)
-         for value_info in self.__info__.get_values():
-             if self == value_info.get_value():
-                 value_name = value_info.get_name().upper()
-         return "<enum %s of type %s.%s>" % (value_name,
-                                             self.__info__.get_namespace(),
-                                             self.__info__.get_name())
+         for method_info in cls.__info__.get_methods():
+             if method_info.is_constructor() and \
+                     method_info.get_name() == 'new' and \
+                     not method_info.get_arguments():
+                 cls.__new__ = staticmethod(Constructor(method_info))
+                 break



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