Re: g-ir-scanner not recognising non-virtual functions
- From: Tony Houghton <h realh co uk>
- To: Florian Müllner <fmuellner gnome org>
- Cc: gtk-devel-list gnome org
- Subject: Re: g-ir-scanner not recognising non-virtual functions
- Date: Mon, 26 Sep 2011 15:03:05 +0100
On Mon, 26 Sep 2011 15:33:07 +0200
Florian Müllner <fmuellner gnome org> wrote:
> On lun, 2011-09-26 at 13:59 +0100, Tony Houghton wrote:
> > For example, I would like to export this function:
> >
> > class Gsqlite:Database
> > from G:Object
> > {
> > // ...
>
> From man g-ir-scanner:
> "The suffix determines whether a file be treated as a source file (.c)
> or a header file (.h). Currently only C based libraries are supported
> by the scanner."
gob2 turns that into C (with appropriate .h and .c headers) which is
what I'm feeding to g-ir-scanner. It even includes the annotation
comments. So g-ir-scanner should find this:
/**
* gsqlite_database_new:
*
* @filename: filename of the database or ":memory:".
* @error: (out) (allow-none) (default NULL):
*
* Returns: a new database object or %NULL
*
* Use g_object_unref() to close. All statements must be finalized
* separately.
**/
#line 55 "/media/htpc.home/gsqlite/gsqlite-database.gob"
GsqliteDatabase *
gsqlite_database_new (const gchar * filename, GError ** error)
{
#line 178 "gsqlite-database.c"
#define __GOB_FUNCTION__ "Gsqlite:Database::new"
{
#line 57 "/media/htpc.home/gsqlite/gsqlite-database.gob"
GsqliteDatabase *self = GET_NEW;
return self_check_open_for_new(self, self_open(self, filename, error));
}}
#line 187 "gsqlite-database.c"
#undef __GOB_FUNCTION__
All the extras like #line, __GOB_FUNCTION__ [1] and the double braces
are there for at least some of the virtual methods which gir is picking
up, so I don't think they're the cause of the problem.
[1] If I add --warn-all I get this:
gsqlite-database.h:949: Warning: Gsqlite: symbol='__GOB_FUNCTION__': Unknown namespace for symbol '_GOB_FUNCTION__'
which doesn't make sense because __GOB_FUNCTION__ isn't mentioned in the
header and it doesn't have 949 lines; but it seems harmless.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]