[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Common header(s) for C and C++ API

From: Branko Čibej <brane_at_apache.org>
Date: Mon, 31 Dec 2018 00:07:23 +0100

Summary: I propose to create one or possibly several new public header
files that will be used by both the C and C++ public APIs.

I would like to completely hide the dependency on APR from the public
parts of the C++ API. In order to do that, public C++ headers must not
include the C headers directly, because most if not all of them do
expose APR.

Up to now I've been "solving" this in an unsatisfactory and error-prone
way, redefining enumeration values in C++ to be the same as in C,
forward-declaring C structures in C++ headers, and so on. Instead, I'd
like to extract certain parts of the C public API into a new header that
is independent of APR, and use that in both APIs. This way I won't avoid
redefining enumerations, for example, but I can ensure that both the C
and C++ APIs use the same enumeration constant values.

I'm attaching a patch that shows an example of what I have in mind.

Please raise your objections by next year. :)

-- Brane

Received on 2018-12-31 00:07:33 CET

This is an archived mail posted to the Subversion Dev mailing list.