From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QS6Of-0004dq-Ki for garchives@archives.gentoo.org; Thu, 02 Jun 2011 11:49:05 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3EAE31C0D5; Thu, 2 Jun 2011 11:48:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 03E6B1C0D5 for ; Thu, 2 Jun 2011 11:48:56 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8F00B1B4018 for ; Thu, 2 Jun 2011 11:48:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id E4E4E80506 for ; Thu, 2 Jun 2011 11:48:55 +0000 (UTC) From: "Petteri Räty" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Petteri Räty" Message-ID: Subject: [gentoo-commits] proj/libbash:master commit in: src/, src/core/ X-VCS-Repository: proj/libbash X-VCS-Files: src/core/bash_ast.h src/core/interpreter.h src/cppbash_builtin.h X-VCS-Directories: src/ src/core/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: ae8b855bd14a965db5d9d49ca64e8c0c334874f0 Date: Thu, 2 Jun 2011 11:48:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: acae21075d80ec009b7d01e882b3471e commit: ae8b855bd14a965db5d9d49ca64e8c0c334874f0 Author: Mu Qiao gentoo org> AuthorDate: Thu Jun 2 11:41:27 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Thu Jun 2 11:41:27 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3Dae8b855b Core: prevent copying classes Now classes that are not designed to be copyable inherit from boost::noncopyable. --- src/core/bash_ast.h | 3 ++- src/core/interpreter.h | 3 ++- src/cppbash_builtin.h | 6 ++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/bash_ast.h b/src/core/bash_ast.h index 9e388cb..5469d95 100644 --- a/src/core/bash_ast.h +++ b/src/core/bash_ast.h @@ -33,6 +33,7 @@ #include =20 #include +#include =20 #include "libbashWalker.h" =20 @@ -42,7 +43,7 @@ class interpreter; =20 /// \class bash_ast /// \brief a wrapper class that helps interpret from istream and string -class bash_ast +class bash_ast: public boost::noncopyable { pANTLR3_INPUT_STREAM input; std::string script; diff --git a/src/core/interpreter.h b/src/core/interpreter.h index 3420ee4..46c3d6a 100644 --- a/src/core/interpreter.h +++ b/src/core/interpreter.h @@ -32,6 +32,7 @@ #include =20 #include +#include #include =20 #include "core/symbols.hpp" @@ -46,7 +47,7 @@ typedef struct libbashWalker_Ctx_struct * plibbashWalke= r; /// \class interpreter /// \brief implementation for bash interpreter /// -class interpreter +class interpreter: public boost::noncopyable { =20 /// \var private::members diff --git a/src/cppbash_builtin.h b/src/cppbash_builtin.h index e7b68ea..11c1edb 100644 --- a/src/cppbash_builtin.h +++ b/src/cppbash_builtin.h @@ -33,6 +33,7 @@ #include #include #include +#include =20 #define BUILTIN_ARGS std::ostream &out, std::ostream &err, std::istream = &in, interpreter &walker =20 @@ -41,7 +42,7 @@ class interpreter; /// \class cppbash_builtin /// \brief a virtual class to inherit builtin functions from /// -class cppbash_builtin +class cppbash_builtin: public boost::noncopyable { public: /// @@ -51,9 +52,6 @@ class cppbash_builtin /// \param instream where to get standard input from. Default: stdi= n /// explicit cppbash_builtin(BUILTIN_ARGS); - /// prevent copying - cppbash_builtin(const cppbash_builtin& ) =3D delete; - const cppbash_builtin& operator=3D( const cppbash_builtin& ) =3D del= ete; =20 virtual ~cppbash_builtin() {}; ///