From: Arno P. <ar...@pu...> - 2011-06-14 12:47:41
|
On 6/14/11 5:00 AM, Panayotis Katsaloulis wrote: > I would like to ask a couple of things with C functions and XMLVM > > > 1) I want to create an XMLVM for some Foundation functions, like for example the following: > NSSearchPathForDirectoriesInDomains > NSTemporaryDirectory > In general, I am asking about some functions that do not really belong to a group but have distinct names. > What do you think is the best naming convention? > > For example, one would be something like > Foundation.functionName(...) This seems to be a good compromise. > 2) Are there any plans to properly support the "native" keyword with XMLVM? What do you mean with 'properly'? For the C backend you can call "ant gen-c-native-skeletons" which will generate default implementations of native methods in xmlvm/src/xmlvm2c/lib/native. The ObjC backend does not have this feature. > 3) Let's say that I have a library written in ObjC. What is the preferred way to "connect" this library with the C backend? > What if this library is written in C? No problems at all. ObjC is a superset of C. Just use the .m suffix for the filename and you can freely mix ObjC and C. Note that we already do this extensively for the Cocoa Touch wrappers (xmlvm/src/xmlvm2c/compat-lib/iphone). Arno |