Hi all,
First, I'm asking for some advice and/or thoughts. Even so, I may
decide to do something completely different after reading all the
replies. You have been warned.
For reference, I've been working on a libClang wrapper. I already
have a little more than a hello-world already, and have wrapped three
types, and implemented a few functions that return and use these
types.
What's currently bothering me, is how to handle a type like CXCursor,
http://clang.llvm.org/doxygen/structCXCursor.html
which is not completely opaque. (Opaque types are rather easy).
First of all, I believe it'll be beneficial to be able to (get cursor
'kind) and possibly (get cursor 'xdata) which is an integer. However,
there is also a documented void * in it.
This void pointer is kind of "bothering" me. I can quite easily
return nil from (get cursor 'data) and I can also signal an error.
Are there any other sane options?
For the record, for now, (put cursor ...) and (remprop cursor ...) are
not supported; and never may be. As in, trying to use them results in
an error.
On the other hand (object-plist cursor) isn't even implemented, and I
have no idea what to do with it. Any ideas?
Also, the (get cursor 'kind) returns another type, which I've not yet
wrapped. This is an enumerator documented at
http://clang.llvm.org/doxygen/group__CINDEX.html#gaaccc432245b4cd9f2d4709...
and I wonder what some options are to represent this in elisp? My
first thought is to represent it as symbols (possibly even keywords).
Another would be to create yet another type and create constants.
This can potentially also be done with integers.
Any comments on the pros and cons of the various options? So far, I
don't have enough experience with the libClang interface to actually
form an opinion. I may even decide to try a few options and see which
feels best.
That's it for now,
Johann
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta