Re: framework bindings for OSX 10.11

Ian McCullough <[email protected]> Thu, 23 Jul 2015 13:10:40 -0400
Newsgroups gmane.comp.python.pyobjc.devel
Message-ID <CADa4atUYGFpQdMw3CQBsO70N60pXsK8dEx8iaaHsk=+0qAEBSg@mail.gmail.com>
Just curious, have you considered making a deep copy of the headers and
simply find/replacing all the nonnull stuff out of it, and then using the
resulting headers?

Ian


On Thu, Jul 23, 2015 at 9:14 AM, Ronald Oussoren <[email protected]>
wrote:

>
> > On 21 Jul 2015, at 18:31, Ronald Oussoren <[email protected]>
> wrote:
> >
> >
> >> On 21 Jul 2015, at 17:01, Ronald Oussoren <[email protected]>
> wrote:
> >>
> >> Hi,
> >>
> >> I was stupid enough to start working on the framework bindings for OSX
> 10.11, and guess what: the tool for generating the metadata doesn’t work
> with the 10.11 headers due to unexpected breakage in libclang (for some
> reason the type attribute of some nodes no longer revers to the actual type
> but some “UNEXPOSED” node instead).   The headers for 10.10 work fine with
> the same compiler… Sigh….
> >>
> >> I’ll see if I can work around this problem, but this does mean that
> generating the 10.11 bindings will take longer than I had hoped. And that’s
> already way longer than it should be, but I have plans to reduce the amount
> of work needed.
> >>
> >> Back to fighting with tools,
> >
> > I have found why I run into problems, but haven’t found a solution yet.
> The problem is that there are implicit __nonnull attributes on values (or
> types) and that attribute type is not exposed through libclang (or maybe
> there’s just a problem with the python bindings to libclang, but the former
> seems more likely).
> >
> > Now just to find a way around this…
>
> I haven’t found a way around this and have decided not to spent more time
> fighting libclang for now.  For now I’ll just maintain the bindings
> completely by hand. I’ve done some restructuring on my machine that should
> make this easier, at least once I’ve done a pass through the beta3 headers
> for all frameworks that already have bindings.
>
> This sucks, but I don’t think I’ll find a better solution without hacking
> on libclang and that’s not something I’m willing to do at the moment (and
> even then it wouldn’t help, I could only use the result when the resulting
> patch would be used in the libclang that shipped with Xcode).
>
> Maybe I should “just” write my own Objective-C parser in Python later on
> ;-)
>
> Ronald
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Pyobjc-dev mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
>

------------------------------------------------------------------------------

_______________________________________________
Pyobjc-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyobjc-dev