On Sep 3, 2013, at 3:44 PM, Jeffrey Johnson wrote:

> Tim et al -- FYI
> 
> There's several larger compilation changes
> that have been quietly underway for quite some
> time that you may want to consider:
> 
> 1) switching from C -> C++
> 
> I'm mostly interested in attaching the current rpm object
> ctor/dtor so that proper sub-classing can be done.
> 
> I'm also interested in using C++ exceptions to impedance
> match the various embedded interpreter signal handling.
> 
> About 60-70% of RPM code compiles with
>       CC=g++ make
> when I last looked about 1.5y ago. The starting
> point will be converting rpmqv.c (i.e. main() in RPM)
> to C++ so that one time initialization happens naturally.
> After that the conversion will proceed transitionally on an
> as needed basis, with ctor/dtor subclassing and using
> the C++ exception framework to, say, throw an exception
> from %{python:...} to %{perl:...} somehow.
> 

The first step here (compiling rpmqv.cc instead of rpmqv.c)
has now been checked in to assess the cost/reliability of C -> C++
in RPM.

The change is deliberately minimal necessary to accomplish the task:
so far the change is utterly painless, but I'm sure there will be a deep
and profound ripple effect throughout rpm if I proceed.

Compiling rpmio/rpmbf.cc will be next to see whether rpm objects
can be subclassed in C++ inheiriting ctors/dtors.

Wish me luck!

73 de Jeff

______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to