GNOME Bugzilla – Bug 549161
h2defs.py creating corrupted .def files
Last modified: 2012-04-20 09:10:10 UTC
something not quite right, here. gotta love those regular expressions. ;; -*- scheme -*- ; object definitions ... (define-object r (in-module "GDOMAtt") (parent "GObject") (c-name "GDOMAttr") (gtype-id "G_TYPE_DOM_ATTR") ) ;; Enumerations and flags ... ;; From gdomAttr.h (define-function gdom_attr_get_type (c-name "gdom_attr_get_type") (return-type "GType") ) (define-function gdom_attr_new (c-name "gdom_attr_new") (is-constructor-of "GdomAttr") (return-type "GDOMAttr*") ) /* * Copyright (C) 2008 Luke Kenneth Casson Leighton <lkcl@lkcl.net> * Copyright (C) 2008 Alp Toker <alp@atoker.com> * Copyright (C) 2008 Apple Inc. */ #ifndef __GDOMAttr_H__ #define __GDOMAttr_H__ #include "glib-object.h" G_BEGIN_DECLS typedef struct _GDOMAttr GDOMAttr; typedef struct _GDOMAttrClass GDOMAttrClass; #define GDOM_TYPE_ATTR (gdom_attr_get_type()) #define GDOM_ATTR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GDOM_TYPE_ATTR, GDOMAttr)) #define GDOM_ATTR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GDOM_TYPE_ATTR, GDOMAttr)) #define GDOM_IS_ATTR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GDOM_TYPE_ATTR)) #define GDOM_IS_ATTR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GDOM_TYPE_ATTR)) #define GDOM_ATTR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GDOM_TYPE_ATTR, GDOMAttrClass)) typedef struct _GDOMAttrPrivate GDOMAttrPrivate; struct _GDOMAttr { GObject parent_instance; GDOMAttrPrivate *priv; }; struct _GDOMAttrClass { GObjectClass parent_class; }; GType gdom_attr_get_type (void); GDOMAttr * gdom_attr_new (void); G_END_DECLS #endif /* __GDOMAttr_H__ */
ah _ha_ - this works: /* * Copyright (C) 2008 Luke Kenneth Casson Leighton <lkcl@lkcl.net> * Copyright (C) 2008 Alp Toker <alp@atoker.com> * Copyright (C) 2008 Apple Inc. */ #ifndef __GDomAttr_H__ #define __GDomAttr_H__ #include "glib-object.h" G_BEGIN_DECLS typedef struct _GDomAttr GDomAttr; typedef struct _GDomAttrClass GDomAttrClass; #define GDOM_TYPE_ATTR (gdom_attr_get_type()) #define GDOM_ATTR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GDOM_TYPE_ATTR, GDomAttr)) #define GDOM_ATTR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GDOM_TYPE_ATTR, GDomAttr)) #define GDOM_IS_ATTR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GDOM_TYPE_ATTR)) #define GDOM_IS_ATTR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GDOM_TYPE_ATTR)) #define GDOM_ATTR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GDOM_TYPE_ATTR, GDomAttrClass)) typedef struct _GDomAttrPrivate GDomAttrPrivate; struct _GDomAttr { GObject parent_instance; GDomAttrPrivate *priv; }; struct _GDomAttrClass { GObjectClass parent_class; }; GType gdom_attr_get_type (void); GDomAttr * gdom_attr_new (void); G_END_DECLS #endif /* __GDomAttr_H__ */ ;; -*- scheme -*- ; object definitions ... (define-object Attr (in-module "GDom") (parent "GObject") (c-name "GDomAttr") (gtype-id "G_TYPE_DOM_ATTR") ) ;; Enumerations and flags ... ;; From gdomAttr.h (define-function gdom_attr_get_type (c-name "gdom_attr_get_type") (return-type "GType") ) (define-function gdom_attr_new (c-name "gdom_attr_new") (is-constructor-of "GdomAttr") (return-type "GDomAttr*") ) the difference is the GDOMAttr vs GDomAttr. hmmm....
I doubt we can fix this, because any fix will likely break something else.
Thanks for taking the time to report this bug. However, this bug report applies to a PyGObject version that is too old and not supported anymore. PyGObject developers are no longer working on static bindings, so unfortunately there will not be any bug fixes for the version this report applies to. By upgrading to a newer version of PyGObject you could receive bug fixes and new functionality. Please feel free to reopen this bug if the problem still occurs with a newer version of PyGObject.