[maemo-developers] [pymaemo] Python-mafw overrides

From: Andrea Grandi a.grandi at gmail.com
Date: Tue Jul 21 16:56:49 EEST 2009
Hi,

> Could not write method <Class.method>: No ArgType for <some type>
> Could not write function <function>: No ArgType for <some type>

yes, I got this list too, this is the complete build output:
http://pastebin.ca/1502034

> It means that codegen does not know about type <some type> and thus
> requires some override to implement that method or function.

I'll try to override one of them

> I also suggest you building the current module and taking a look at
> the generated mafw.c. It is very readable, and can even serve as
> skeleton if one wants to create a Python extension by hand.

I did two things: I built your module (getting an almost complete
mafw.c) and I built mine (that almost use the same code except for the
examples and other stuff....).

The strange thing is that my generated mafw.c is very short:
http://pastebin.ca/1502036
compared to your!

> Other (simpler) cases are those like mafw_registry_get_instance():
> functions that always return the same object (instead of a new object)
> and thus need to become a static Python method. For these functions,
> you add a line like this to the mafw_gen_defs.sh:
>
> to_method defs/mafw-registry.defs mafw_registry_get_instance
> get_instance MafwRegistry

first I override them, then I add a similar line to the script

> and the corresponding snippet on mafw.override (you can use the
> get_instance() as base.

ok

p.s: I attach you my base code too, so you can understand better and
quicker what the problem could be. You can find the file here:
http://files.getdropbox.com/u/835341/pymafw.tar.gz

-- 
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