[fpc-pascal]Mapping Object Pascal Classes to C++ Classes

Olivier Coursiere olivier.coursiere at laposte.net
Thu Nov 14 21:52:09 CET 2002


Hi all,

>I had a look at it. I wanted to use is myself for mapping Muscle 
classes to 
>Pascal - for the uninformed, Muscle was originally written for BeOS, 
but now 
>compiles on Win32, Linux and IIRC Solaris, amoungst others, and has a 
Java 
>layer also. I found it wouldn't compile - probably type sizes etc. I 
did wonder 
>why you used the K&R parameter syntax with in some of the C parts 
though ;-) 
> 

I don't use K&R parameter syntax. The original tool use it. Look at the 
readme file of stubgen.
My changes are only in the print_function. But i am not really a fluent 
C programmer. That's why
i start codegen. string manipulations are easier in pascal than in C 
(from my point of view).

>> It should also work on other systems if your API respect the above 
>> requirements (with some minor change i think).
>
>One day, when I get 5 minutes to let the dust settle, I am goint to 
write a 
>class flattener in C/C++. It will supply flattened API, just as 
Florian 
>suggested.
>
>However, I think for BeOS I have another solution. I'm not saying too 
much, but 
>I think I can hack out a generic wrapping method. Watch this space :-) 
(hint: 
>BeOS, on all platforms, mangles the method names in a completely 
regular way. 
>The ABI is never going to change as BeOS is effectively a closed 
>source, 'final' platform.) 
>
Good luck to find docs !

>> This is in my TODO's list too but i have no time yet because of the 
>> above project...
>
>Olivier, I think I will handle this (as above) because I have some 
ideas I want 
>to try out.

Ok !





More information about the fpc-pascal mailing list