Combining C and Objective-C headers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Combining C and Objective-C headers

Chris Cunnington
MicroSqueak produces several source files for a VM. At bottom, you'd
need three:

sq.h
interp.c
msqMain.c

(msqFilePrims.c and msqMiscPrims.c can be stubbed out)

msqMain.c is ~1000 lines long. It would be shorter in Objective-C. But
then it would no longer be able to use sq.h as a header file, because
you cannot mix languages in a header. So, msqMain.m would require an
msqMain.h?

You'd have:

sq.h
msqMain.h
interp.c
msqMain.m


And then the two header files could import each other.
Is that how Cocoa VMs combine the two languages?

Chris
_______________________________________________
VM-beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners