summaryrefslogtreecommitdiff
path: root/otk
diff options
context:
space:
mode:
Diffstat (limited to 'otk')
-rw-r--r--otk/otk_wrap.cc2
-rw-r--r--otk/util.cc6
-rw-r--r--otk/util.hh5
3 files changed, 5 insertions, 8 deletions
diff --git a/otk/otk_wrap.cc b/otk/otk_wrap.cc
index f5562ad8..7373d9f8 100644
--- a/otk/otk_wrap.cc
+++ b/otk/otk_wrap.cc
@@ -12800,7 +12800,7 @@ static PyObject *_wrap_basename(PyObject *self, PyObject *args) {
SWIG_exception(SWIG_TypeError, "string expected");
}
}
- result = basename((std::string const &)*arg1);
+ result = otk::basename((std::string const &)*arg1);
{
resultobj = PyString_FromString((&result)->c_str());
diff --git a/otk/util.cc b/otk/util.cc
index 91d6f13a..ebca51d5 100644
--- a/otk/util.cc
+++ b/otk/util.cc
@@ -101,14 +101,12 @@ string itostring(long i) {
return tmp;
}
-}
-
-#ifndef HAVE_BASENAME
string basename (const string& path) {
string::size_type slash = path.rfind('/');
if (slash == string::npos)
return path;
return path.substr(slash+1);
}
-#endif // HAVE_BASENAME
+
+}
diff --git a/otk/util.hh b/otk/util.hh
index aac92560..2664c1fa 100644
--- a/otk/util.hh
+++ b/otk/util.hh
@@ -40,10 +40,9 @@ inline std::string itostring(unsigned int i)
inline std::string itostring(int i)
{ return itostring((long) i); }
-}
-#ifndef HAVE_BASENAME
std::string basename(const std::string& path);
-#endif
+
+}
#endif