[C++-sig] [Py++] Missing struct

Nikolaus Rath Nikolaus at rath.org
Mon Dec 14 18:22:03 CET 2009


Roman Yakovenko <roman.yakovenko at gmail.com> writes:
> On Mon, Dec 14, 2009 at 3:14 PM, Nikolaus Rath <Nikolaus at rath.org> wrote:
>> Roman Yakovenko <roman.yakovenko at gmail.com> writes:
>>>> Why is the fuse_file_info struct not translated into ctypes code?
>>>
>>> This is because Py++ tries to make some intelligent guess what to
>>> export. By default it exports all declarations found in the files in
>>> the same directory.
>>
>> Hmm. Is there any actual use case for that? Just exporting the
>> declarations in one file without taking into account their dependencies
>> doesn't make much sense to me.
>
> //pseudo code
> #include "stdio.h"
>
> void do_smth( int i ){
>     printf( i );
> }
>
> Do you still think Py++ needs to export every declaration that comes
> from "stdio.h" header?

No, but that's not what I'm saying. The only dependency here is printf,
so Py++ should export do_smth, because it is from the main file, and
printf from stdio.h, because do_smth depends on it.

> Py++ assumes, that files, that belongs to the same directory as the
> file you pass, contain "interface", why all others contain
> implementation.

In my opinion that is not a particularly good assumption. Why not work
without it and instead export all the dependencies of the file I'm
passing?


Best,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C



More information about the Cplusplus-sig mailing list