Re: [pygccxml-development] argument policies
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <ba...@ir...> - 2006-05-03 08:56:56
|
Roman Yakovenko wrote: >> > Hi. Matthias I am ready to start working on argument policies. >> > I think we should start with "array" argument policies. >> > >> > What do you think? >> >> Can you outline how you are going to implement all this. What features >> are available? How will they be used? etc.. (sort of a design document) > > I still don't know. I am going to write a lot of C++ code - test cases. > To see how it should be wrapped. What user need/have to customize, define. > After this I hope it will be clear to me what should be done and how ok, of course a design document can be postponed until the actual problem is better understood... :) One thing that might be useful for me at the moment would be the possibility for an arg policy to actually spawn another wrapper so that there'll be two wrappers with different signatures. For example, I have C++ methods that look like this: void get(double*) They just return an array of a predefined size. With my current arg policies I can turn that into a Python method that takes no arguments and returns a list of floats. But meanwhile I'm also toying with the idea to provide an additional version of the method that takes a list as argument and that will fill that list with the return values. This will be less "Pythonic" but it's closer to the original C++ API. I don't know if it should really be the arg policy that creates the additional wrapper or if it should be done by the user. For example, I could also imagine a way where the user can "clone" a declaration and then just apply a different arg policy to the clone. > Yes. If you don't mind I'd like next structure of the directory: > contrib > |----your name Do you really insist on this? What name would that be? The experimental stuff is not by myself alone, it's also by Allen. Personally, I would much prefer a directory name that's chosen after the *functionality* of its contents and not after its initial author(s). The latter would rather look as if the directory contains my private stuff, but of course, the directory is open to anyone and people should rather be encouraged to contribute to it (would we then have to rename the directory? ;) The authors can be mentioned in a file inside the directory, then it will also be clear that you are not responsible for that code and the list of authors can be extended if necessary. - Matthias - |