[chuck-dev] [patch] Some c++-isms and dont segfault on FreeBSD

Ge Wang gewang at CS.Princeton.EDU
Sun Nov 20 23:08:56 EST 2005


Hi Rasmus and all!

Sorry for the delay - We just rolled in your changes and some additional 
fixes:

1. added missing virtual destructors in base classes
2. used string::size_type and vector<XXX>::size_type when appropriate
    in chuck_shell.cpp
3. changed initialisers in Chuck_DLL
4. took care of additional -Wall warnings, mostly unused variables
5. minor updates to makefiles

Committed to CVS.  Please give it a try on FreeBSD system and let us
know if it still works.  We haven't changed to 'g++' yet in the OSS 
makefile, so you may have to manually change that along with -Wall and 
removing -ldl etc.  Should we add a FreeBSD makefile at least for now?
Thank you for the patch!

> If this is useful, I could do more initialisation in constructors and
> a few other c++-ism fixes that might save a few clock cycles here and
> there and submit more patches ...  Ok?

That would be excellent!  Please!  Thanks!

Best,
Ge!


On Tue, 25 Oct 2005, Rasmus Kaj wrote:

> Hi ChucKers!
>
> I'm back at trying to use ChucK on FreeBSD.  I use the current cvs
> head version (in chuck_dev/v2) and, after marginal Linux -> FreeBSD
> changes to makefile.oss, it works!  When doing "chuck_autotest
> [0-9]*.ck" in the tests catalogue, some of the tests fail, but that
> seems to be mainly because some stuff that run infinite loops isn't
> marked as fail-correct.
>
> However, I'd like to use g++ for compiling the c++ stuff, and don't
> link with -lstdc++ explicitly.  So I change that in makefile.oss, and
> get a segmentation fault when trying to run.
>
> Taking care of some of the -Wall warnings, mainly having a virtual
> destructor for classes that have virtual methods (so the correct
> destructor will be called when deleting a base-class pointer) and
> constructor using initialisers for Chuck_DLL, and using
> string::size_type for string index variables (in two places), it seems
> fine again (the same tests as before fails).
>
>
> So, the patch is in http://people.kth.se/~kaj/tmp/chuck/ (along with a
> test log).
>
> If this is useful, I could do more initialisation in constructors and
> a few other c++-ism fixes that might save a few clock cycles here and
> there and submit more patches ...  Ok?
>
>
> -- 
> Rasmus Kaj --+-- rasmus at kaj.se --+-- http://www.stacken.kth.se/~kaj/
> Deja Moo: The feeling that you've heard this bullshit before
> _______________________________________________
> chuck-dev mailing list
> chuck-dev at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-dev
>


More information about the chuck-dev mailing list