[maemo-developers] [pymaemo] How to add PyModule_AddObject to the override file?

From: Andrea Grandi a.grandi at gmail.com
Date: Wed Jul 29 17:09:05 EEST 2009
Hi,

2009/7/29 Anderson Lizardo <anderson.lizardo at openbossa.org>:
> One thing I noticed is that (again) MAFW is taking a different path
> from most gobject based libraries: _MafwPluginDescriptor and
> _MafwPluginDescriptorPublic are not GObjects :(. In that case, I think
> you will have to pretend they are so, making something like:
>
> (define-object PluginDescriptorPublic
>  (in-module "Mafw")
>  (parent "GObject")
>  (c-name "MafwPluginDescriptorPublic")
>  (gtype-id "MAFW_TYPE_PLUGIN_DESCRIPTOR_PUBLIC")
> )
>
> (I didn't test any of it; probably some compilation errors will occur,
> try to play with it a little and see if you can figure out why the
> errors occur, this way you will have a better understanding of things)

I get this error trying to compile:

mafw.c: In function 'pymafw_register_classes':
mafw.c:1966: error: 'MAFW_TYPE_PLUGIN_DESCRIPTOR_PUBLIC' undeclared
(first use in this function)
mafw.c:1966: error: (Each undeclared identifier is reported only once
mafw.c:1966: error: for each function it appears in.)
error: command 'gcc' failed with exit status 1

I also did a grep like this: grep -R MAFW_TYPE_ * | grep PLUG
but I couldn't find anything :(

I could try to tell to MAFW guys if they can change their API, but...
I don't think they will do it at this point...

isn't there any other project that uses define-struct? I tried to
google for it too, but I couldn't find anything... maybe it has
another name?

Thanks.

-- 
Andrea Grandi
email: a.grandi [AT] gmail [DOT] com
website: http://www.andreagrandi.it
PGP Key: http://www.andreagrandi.it/pgp_key.asc
More information about the maemo-developers mailing list