Re: MERGE: bse2cxx-part3



On 27.07.2011 20:03, Stefan Westerfeld wrote:
    Hi!

On Tue, Jul 26, 2011 at 04:17:37AM +0200, Tim Janik wrote:
On Fri, 22 Jul 2011, Stefan Westerfeld wrote:

  Hi!

I've ported a few bse more sources to C++. Sorry about minor mistakes in the
commit order. Anyway, you can fetch the branch into your bse repo by using:

git fetch http://space.twc.de/public/git/stwbeast.git bse2cxx-part3:bse2cxx-part3

Thanks, great. I see you put a lot of work in there,
here're my bits:
- please use "uint" in the future, see my other mail.
- remove cxxdummy.cc from compilation rules if another C++ source is present.
- "void * boxed" should be "void *boxed" (unfixed in master)
- pointer casts should be written as: (void*) ptr
   (no extra space between "void" and "*")

Ok. Here is my cxxport.pl script, let me know if you need changes to that.

#!/usr/bin/perl -w -pi.bak
s,\bclass\b,klass,g;
s,\bgint\b,int,g;
s,\bguint\b,uint,g;
s,\bgdouble\b,double,g;
s,\bgfloat\b,float,g;
s,\bgchar\b,char,g;
s,\bguchar\b,unsigned char,g;
s,\bglong\b,long,g;
s,\bgulong\b,unsigned long,g;
s,\bgpointer\b,void *,g;
s,\bgconstpointer\b,const void *,g;
s,parent klass,parent class,g;

Another thing you can do is s/gboolean/bool/. This could have been done in plain C even, as C99 provides bool. Keep an eye on pointers though, because gboolean really is an int, while sizeof(bool) == 1.


    Cu... Stefan


--

Yours sincerely,
Tim Janik

---
http://lanedo.com/~timj/ - Founder and CEO of Lanedo GmbH.
Free software author and contributor on various projects.


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