After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 549161 - h2defs.py creating corrupted .def files
h2defs.py creating corrupted .def files
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: codegen
Git master
Other All
: Low normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-23 23:43 UTC by luke kenneth casson leighton
Modified: 2012-04-20 09:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description luke kenneth casson leighton 2008-08-23 23:43:27 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__ */
Comment 1 luke kenneth casson leighton 2008-08-24 11:17:09 UTC
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....
Comment 2 Paul Pogonyshev 2008-08-28 20:28:59 UTC
I doubt we can fix this, because any fix will likely break something else.
Comment 3 Dieter Verfaillie 2012-04-20 09:10:10 UTC
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.