svn commit: samba r18030 - in branches/SAMBA_3_0/source/tdb/common: .

Jeremy Allison jra at samba.org
Mon Sep 4 17:49:44 GMT 2006


On Mon, Sep 04, 2006 at 10:53:43PM +1000, tridge at samba.org wrote:
> Metze,
> 
>  > yes, the goal should be to let c++ applications make use of our libraries.
> 
> oh, that's a diifferent goal to what I've heard discussed
> previously. I thought Volker was just focussed on the useful warnings?
> 
> Is it really practical to make our libraries usable in real C++
> programs, without adding a lot of C++ specific code?
> 
> Is a fairly complex C library like tdb really usable in real C++
> programs?  I am certainly no C++ expert, but I thought there was a bit
> more to it than just getting it to compile.

Yes, it's very easy to make something like a separate libtdb usable
in C++. You'd probably end up wrapping it with objects for a more
natural fit, but it's easily doable with tdb as-is.

> I'm especially wondering whether this would limit us in the future. If
> one of our goals becomes the use of our libs in C++ then that means
> we'd have to make each code change with that in mind. For example, we
> have planned for a while to convert tdb to use talloc internally, and
> to do things like use destructures to release locks. Are there any
> gotchas with that and C++ ?

None at all. C++ is a superset of C.

Jeremy.


More information about the samba-technical mailing list