summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2006-04-12 08:12:12 +0000
committerMurray Cumming <murrayc@src.gnome.org>2006-04-12 08:12:12 +0000
commitc73ae57ef977a3827c1de99e1d59f9a90eef5672 (patch)
tree0157be76275930bc72d44ac8a6511573e83d5251
parent01f2a0d33758ada62ec5a29fa382880963837e11 (diff)
downloadglibmm-c73ae57ef977a3827c1de99e1d59f9a90eef5672.tar.gz
Mark private functions as static, to stop them being exported in the API,
2006-04-12 Murray Cumming <murrayc@murrayc.com> * glib/glibmm/main.cc: * glib/glibmm/objectbase.cc: * glib/glibmm/property.cc: * glib/glibmm/ustring.cc: * glib/glibmm/value_custom.cc: * glib/src/spawn.ccg: Mark private functions as static, to stop them being exported in the API, to reduce the library code size slightly. * tools/m4/signal.m4: Make generated callback functions static, for the same reasons.
-rw-r--r--ChangeLog13
-rw-r--r--examples/thread/dispatcher.cc2
-rw-r--r--glib/glibmm/main.cc2
-rw-r--r--glib/glibmm/objectbase.cc2
-rw-r--r--glib/glibmm/property.cc2
-rw-r--r--glib/glibmm/ustring.cc4
-rw-r--r--glib/glibmm/value_custom.cc2
-rw-r--r--glib/src/spawn.ccg4
-rw-r--r--tools/m4/signal.m48
9 files changed, 26 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 663ab0aa..3278127d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2006-04-12 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/glibmm/main.cc:
+ * glib/glibmm/objectbase.cc:
+ * glib/glibmm/property.cc:
+ * glib/glibmm/ustring.cc:
+ * glib/glibmm/value_custom.cc:
+ * glib/src/spawn.ccg: Mark private functions as
+ static, to stop them being exported in the API, to reduce the
+ library code size slightly.
+ * tools/m4/signal.m4: Make generated callback functions static, for
+ the same reasons.
+
2006-04-07 Cedric Gustin <cedric.gustin@gmail.com>
* README.win32: Updated for Mingw-4.1.
diff --git a/examples/thread/dispatcher.cc b/examples/thread/dispatcher.cc
index 44778b4b..ca74d05d 100644
--- a/examples/thread/dispatcher.cc
+++ b/examples/thread/dispatcher.cc
@@ -170,7 +170,7 @@ void Application::on_progress_finished(ThreadProgress* thread_progress)
thread_progress->join();
std::cout << "Thread " << thread_progress->id()
- << ": finished." << std::endl;
+ << ": finished." << std::endl;
}
if(progress_list_.empty())
diff --git a/glib/glibmm/main.cc b/glib/glibmm/main.cc
index 9f64e362..f040f053 100644
--- a/glib/glibmm/main.cc
+++ b/glib/glibmm/main.cc
@@ -226,7 +226,7 @@ static gboolean glibmm_iosource_callback(GIOChannel*, GIOCondition condition, vo
static gboolean glibmm_child_watch_callback(GPid pid, gint child_status, void* data)
{
SourceConnectionNode *const conn_data = static_cast<SourceConnectionNode*>(data);
-
+
try {
//Recreate the specific slot from the generic slot node.
(*static_cast<sigc::slot<void, GPid, int>*>(conn_data->get_slot()))(pid, child_status);
diff --git a/glib/glibmm/objectbase.cc b/glib/glibmm/objectbase.cc
index 1bb14e79..f1ba46f4 100644
--- a/glib/glibmm/objectbase.cc
+++ b/glib/glibmm/objectbase.cc
@@ -31,7 +31,7 @@ namespace
// char array rather than a string literal allows for fast pointer comparison,
// which is otherwise not guaranteed to work.
-const char anonymous_custom_type_name[] = "gtkmm__anonymous_custom_type";
+static const char anonymous_custom_type_name[] = "gtkmm__anonymous_custom_type";
} // anonymous namespace
diff --git a/glib/glibmm/property.cc b/glib/glibmm/property.cc
index e801e0c1..73d22ffd 100644
--- a/glib/glibmm/property.cc
+++ b/glib/glibmm/property.cc
@@ -75,7 +75,7 @@ namespace
//
// We can reimplement this later if necessary.
-unsigned int property_to_id(Glib::ObjectBase& object, Glib::PropertyBase& property)
+static unsigned int property_to_id(Glib::ObjectBase& object, Glib::PropertyBase& property)
{
void *const base_ptr = dynamic_cast<void*>(&object);
void *const prop_ptr = &property;
diff --git a/glib/glibmm/ustring.cc b/glib/glibmm/ustring.cc
index 76e8d014..788658ae 100644
--- a/glib/glibmm/ustring.cc
+++ b/glib/glibmm/ustring.cc
@@ -140,7 +140,7 @@ ustring::size_type utf8_char_offset(const std::string& str, ustring::size_type o
// Helper to implement ustring::find_first_of() and find_first_not_of().
// Returns the UTF-8 character offset, or ustring::npos if not found.
//
-ustring::size_type utf8_find_first_of(const std::string& str, ustring::size_type offset,
+static ustring::size_type utf8_find_first_of(const std::string& str, ustring::size_type offset,
const char* utf8_match, long utf8_match_size,
bool find_not_of)
{
@@ -176,7 +176,7 @@ ustring::size_type utf8_find_first_of(const std::string& str, ustring::size_type
// Helper to implement ustring::find_last_of() and find_last_not_of().
// Returns the UTF-8 character offset, or ustring::npos if not found.
//
-ustring::size_type utf8_find_last_of(const std::string& str, ustring::size_type offset,
+static ustring::size_type utf8_find_last_of(const std::string& str, ustring::size_type offset,
const char* utf8_match, long utf8_match_size,
bool find_not_of)
{
diff --git a/glib/glibmm/value_custom.cc b/glib/glibmm/value_custom.cc
index f2774777..04a7c0df 100644
--- a/glib/glibmm/value_custom.cc
+++ b/glib/glibmm/value_custom.cc
@@ -26,7 +26,7 @@
namespace
{
-void warn_already_registered(const char* location, const std::string& full_name)
+static void warn_already_registered(const char* location, const std::string& full_name)
{
g_warning("file %s: (%s): The type name `%s' has been registered already.\n"
"This is not supposed to happen -- please send a mail with detailed "
diff --git a/glib/src/spawn.ccg b/glib/src/spawn.ccg
index 98035930..5007ad9c 100644
--- a/glib/src/spawn.ccg
+++ b/glib/src/spawn.ccg
@@ -33,7 +33,7 @@ extern "C"
* We don't need to worry about (un)referencing, since the
* child process gets its own copy of the parent's memory anyway.
*/
-void child_setup_callback(void* user_data)
+static void child_setup_callback(void* user_data)
{
try
{
@@ -45,7 +45,7 @@ void child_setup_callback(void* user_data)
}
}
-void copy_output_buf(std::string* dest, const char* buf)
+static void copy_output_buf(std::string* dest, const char* buf)
{
if(dest)
{
diff --git a/tools/m4/signal.m4 b/tools/m4/signal.m4
index 353cc20c..4e55e168 100644
--- a/tools/m4/signal.m4
+++ b/tools/m4/signal.m4
@@ -23,7 +23,7 @@ ifelse($2`'_NUM($3)`'$5`'_NUM($6),`void0void0',`dnl
dnl
dnl Use predefined callback for SignalProxy0<void>, to reduce code size.
-const Glib::SignalProxyInfo __CPPNAME__`'_signal_$4_info =
+static const Glib::SignalProxyInfo __CPPNAME__`'_signal_$4_info =
{
"$1",
(GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
@@ -32,7 +32,7 @@ const Glib::SignalProxyInfo __CPPNAME__`'_signal_$4_info =
',`dnl else
ifelse($8,`1',,`dnl Do not generate the implementation if it should be custom:
-$2 __CPPNAME__`'_signal_$4_callback`'(__CNAME__`'* self, _COMMA_SUFFIX($3)`'void* data)
+static $2 __CPPNAME__`'_signal_$4_callback`'(__CNAME__`'* self, _COMMA_SUFFIX($3)`'void* data)
{
using namespace __NAMESPACE__;
typedef sigc::slot< $5`'_COMMA_PREFIX($6) > SlotType;
@@ -62,7 +62,7 @@ ifelse($2,void,,`dnl else
}
ifelse($2,void,,`dnl else
-$2 __CPPNAME__`'_signal_$4_notify_callback`'(__CNAME__`'* self, _COMMA_SUFFIX($3)`' void* data)
+static $2 __CPPNAME__`'_signal_$4_notify_callback`'(__CNAME__`'* self, _COMMA_SUFFIX($3)`' void* data)
{
using namespace __NAMESPACE__;
typedef sigc::slot< void`'_COMMA_PREFIX($6) > SlotType;
@@ -87,7 +87,7 @@ $2 __CPPNAME__`'_signal_$4_notify_callback`'(__CNAME__`'* self, _COMMA_SUFFIX($3
')dnl endif
')dnl endif
-const Glib::SignalProxyInfo __CPPNAME__`'_signal_$4_info =
+static const Glib::SignalProxyInfo __CPPNAME__`'_signal_$4_info =
{
"$1",
(GCallback) &__CPPNAME__`'_signal_$4_callback,