Re: Midnight Commander mod with Colorer-take5 syntax engine
- From: Pavel Tsekov <ptsekov gmx net>
- To: Leonard den Ottolander <leonard den ottolander nl>
- Cc: MC development <mc-devel gnome org>
- Subject: Re: Midnight Commander mod with Colorer-take5 syntax engine
- Date: Thu, 22 Jun 2006 15:34:54 +0300 (EEST)
On Thu, 22 Jun 2006, Leonard den Ottolander wrote:
Is it technically possible to reimplement that c++ code in c? (This is
just theoretical question, I don't ask you to do it.)
It is possible to move this code to libcolorer side and implement
plain C API from library side - however this'll take more time and I
see no reason in doing this.
My question was if it is technically possible to rewrite the cpp code
for *mc* in c and (through trickery) still keep interface compatibility.
Not unless colorer exports C interfaces and it doesn't. The way it is
implemented colorer exports a set of interfaces that one has to implement
in terms of C++ classes. Theoretically it could be possible to create
an C++ implementation of those interfaces, one that delegates the work
to pure C functions. Again that means that colorer has to export a C. I
don't see why this is such a big deal to you ?
A bit like linking Delphi (Pascal) to C code. This is possible through
compiler switches changing the stack cleanup behaviour (and probably
some alignment tricks).
What about name mangling issues ? As I said above - you cannot avoid the
C++ code.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]