[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Abysmal state of GTK build

From: Po Lu
Subject: Re: Abysmal state of GTK build
Date: Tue, 23 Aug 2022 12:02:23 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux)

Richard Stallman <rms@gnu.org> writes:

> That might affect the issue.  Can you explain this more?
> You recommended we look at haiku_support.cc to see this technique.
> But that file is 4000 lines long.  I can't look through so much
> hoping to recognize the part you refer to.
> Could you please describe concretely the technique you refer to, or
> show precisely what code in that file illustrates it?

Basically, the file provides a C wrapper around C++ functions.  All of
those C wrapper functions are declared in haiku_support.c, and have C
linkage, meaning that they can be called from C code.

Instances of C++ objects are passed to C as pointers to void, and C code
interacts with the C++ objects through only the wrapper functions.  It
doesn't include lisp.h, dispextern.h, keyboard.h, or any other header
that is part of the Emacs C code, and only calls functions declared
there through function pointers explictly provided by the C code in
haikuterm.c (and other pieces of code in C.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]