public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/libbash:master commit in: src/
@ 2011-04-02 15:50 Petteri Räty
  0 siblings, 0 replies; 3+ messages in thread
From: Petteri Räty @ 2011-04-02 15:50 UTC (permalink / raw
  To: gentoo-commits

commit:     921104b14a75583b48ee3926b8e8ee23d908b5b3
Author:     Mu Qiao <qiaomuf <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  2 02:55:50 2011 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Sat Apr  2 07:16:38 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=921104b1

Add a common header for visibility macros

---
 src/common.h |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/src/common.h b/src/common.h
new file mode 100644
index 0000000..121d5bb
--- /dev/null
+++ b/src/common.h
@@ -0,0 +1,31 @@
+/*
+   Please use git log for copyright holder and year information
+
+   This file is part of libbash.
+
+   libbash is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 2 of the License, or
+   (at your option) any later version.
+
+   libbash is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with libbash.  If not, see <http://www.gnu.org/licenses/>.
+*/
+///
+/// \file common.h
+/// \author Mu Qiao
+/// \brief common macros and includes
+///
+
+#ifndef COMMON_H
+#define COMMON_H
+
+#define LIBBASH_API __attribute__((visibility("default")))
+#define LIBBASH_LOCAL __attribute__((visibility("hidden")))
+
+#endif



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/libbash:master commit in: src/
@ 2011-04-03 10:16 Petteri Räty
  0 siblings, 0 replies; 3+ messages in thread
From: Petteri Räty @ 2011-04-03 10:16 UTC (permalink / raw
  To: gentoo-commits

commit:     d30fc4046d0a8875f5e7d9c95560739d65b7a2c8
Author:     Petteri Räty <petsku <AT> petteriraty <DOT> eu>
AuthorDate: Sat Apr  2 16:45:18 2011 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Sat Apr  2 16:45:18 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=d30fc404

Stop variable_printer from leaking memory

We are not releasing antlr datastructures so variable_printer leaked
memory. Now valgrind is happy.

---
 src/libbash.cpp |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/libbash.cpp b/src/libbash.cpp
index 60076b5..e821d81 100644
--- a/src/libbash.cpp
+++ b/src/libbash.cpp
@@ -63,6 +63,13 @@ namespace libbash
     plibbashWalker treePsr = libbashWalkerNew(nodes);
     treePsr->start(treePsr);
 
+    treePsr->free(treePsr);
+    nodes->free(nodes);
+    psr->free(psr);
+    tstream->free(tstream);
+    lxr->free(lxr);
+    input->close(input);
+
     for(auto iter = walker->begin(); iter != walker->end(); ++iter)
     {
       variables[iter->first]=std::static_pointer_cast<variable>(iter->second)->get_value<std::string>();



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/libbash:master commit in: src/
@ 2012-07-08  9:44 Petteri Räty
  0 siblings, 0 replies; 3+ messages in thread
From: Petteri Räty @ 2012-07-08  9:44 UTC (permalink / raw
  To: gentoo-commits

commit:     29b377c53e8b0785400167d6dc62f29667f046ab
Author:     Petteri Räty <petsku <AT> petteriraty <DOT> eu>
AuthorDate: Sun Jun 10 21:39:18 2012 +0000
Commit:     Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
CommitDate: Sun Jul  8 09:41:25 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=29b377c5

Replace boost::scoped_ptr with std::unique_ptr

const std::unique_ptr provides everything that boost::scoped_ptr does so
no need to rely on it.

---
 src/cppbash_builtin.cpp |    2 +-
 src/cppbash_builtin.h   |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/cppbash_builtin.cpp b/src/cppbash_builtin.cpp
index 51cd15c..7c9cb84 100644
--- a/src/cppbash_builtin.cpp
+++ b/src/cppbash_builtin.cpp
@@ -57,7 +57,7 @@ cppbash_builtin::cppbash_builtin(BUILTIN_ARGS): _out_stream(&out), _err_stream(&
 }
 
 cppbash_builtin::builtins_type& cppbash_builtin::builtins() {
-  static boost::scoped_ptr<builtins_type> p(new builtins_type {
+  static const std::unique_ptr<builtins_type> p(new builtins_type {
       {"break", boost::factory<break_builtin*>()},
       {"continue", boost::factory<continue_builtin*>()},
       {"echo", boost::factory<echo_builtin*>()},

diff --git a/src/cppbash_builtin.h b/src/cppbash_builtin.h
index 5b27fad..c6feb65 100644
--- a/src/cppbash_builtin.h
+++ b/src/cppbash_builtin.h
@@ -31,7 +31,6 @@
 
 #include <boost/functional/factory.hpp>
 #include <boost/function.hpp>
-#include <boost/scoped_ptr.hpp>
 #include <boost/utility.hpp>
 
 /// shortcut for the arguments of the constructor
@@ -89,7 +88,7 @@ class cppbash_builtin: public boost::noncopyable
                     const std::vector<std::string>& args,
                     BUILTIN_ARGS)
     {
-      boost::scoped_ptr<cppbash_builtin> p(builtins()[builtin](out,err,in,walker));
+      const std::unique_ptr<cppbash_builtin> p(builtins()[builtin](out,err,in,walker));
       return p->exec(args);
     }
 



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-08  9:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-03 10:16 [gentoo-commits] proj/libbash:master commit in: src/ Petteri Räty
  -- strict thread matches above, loose matches on Subject: below --
2012-07-08  9:44 Petteri Räty
2011-04-02 15:50 Petteri Räty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox