summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-12-04 10:28:47 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-12-04 13:51:21 +0000
commit557e28d744bc12e11025e12aa80d39e49192b94c (patch)
treea45b0b35468ae2b1c5a35f262709c4b39cc6bca2
parent288f9ee80922ef4ae63b463f8c75c9a689dfcc46 (diff)
downloadpsycopg2-557e28d744bc12e11025e12aa80d39e49192b94c.tar.gz
Dropped interface for two private functions.
Note: the functions are private because typecast.c imports the .c's of typecast_[mx]datetime, not the .h's. Work around the warning for 'skip_until_space' not used with an #ifdef. Furthermore, those functions are now static.
-rw-r--r--ChangeLog2
-rw-r--r--psycopg/typecast.c6
-rw-r--r--psycopg/typecast.h5
3 files changed, 6 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c16958..41a90c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
* datetime modules reorganized to work around CentOS 5.5 x86_64 buld
problem. Closes ticket #23
+ * psycopg/typecast.h: dropped private functions interfaces.
+
2010-12-01 Daniele Varrazzo <daniele.varrazzo@gmail.com>
* lib/extras.py: DictRow items can be updated. Patch by Alex Aster.
diff --git a/psycopg/typecast.c b/psycopg/typecast.c
index 2e016cf..6da1eff 100644
--- a/psycopg/typecast.c
+++ b/psycopg/typecast.c
@@ -36,14 +36,16 @@
/* useful function used by some typecasters */
-const char *
+#ifdef HAVE_MXDATETIME
+static const char *
skip_until_space(const char *s)
{
while (*s && *s != ' ') s++;
return s;
}
+#endif
-const char *
+static const char *
skip_until_space2(const char *s, Py_ssize_t *len)
{
while (*len > 0 && *s && *s != ' ') {
diff --git a/psycopg/typecast.h b/psycopg/typecast.h
index e33969e..0623220 100644
--- a/psycopg/typecast.h
+++ b/psycopg/typecast.h
@@ -90,9 +90,4 @@ HIDDEN PyObject *typecast_from_python(
HIDDEN PyObject *typecast_cast(
PyObject *self, const char *str, Py_ssize_t len, PyObject *curs);
-/** utility functions **/
-
-HIDDEN const char *skip_until_space(const char *s);
-HIDDEN const char *skip_until_space2(const char *s, Py_ssize_t *len);
-
#endif /* !defined(PSYCOPG_TYPECAST_H) */