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.
This commit is contained in:
Daniele Varrazzo 2010-12-04 10:28:47 +00:00
parent 288f9ee809
commit 557e28d744
3 changed files with 6 additions and 7 deletions

View File

@ -5,6 +5,8 @@
* datetime modules reorganized to work around CentOS 5.5 x86_64 buld * datetime modules reorganized to work around CentOS 5.5 x86_64 buld
problem. Closes ticket #23 problem. Closes ticket #23
* psycopg/typecast.h: dropped private functions interfaces.
2010-12-01 Daniele Varrazzo <daniele.varrazzo@gmail.com> 2010-12-01 Daniele Varrazzo <daniele.varrazzo@gmail.com>
* lib/extras.py: DictRow items can be updated. Patch by Alex Aster. * lib/extras.py: DictRow items can be updated. Patch by Alex Aster.

View File

@ -36,14 +36,16 @@
/* useful function used by some typecasters */ /* useful function used by some typecasters */
const char * #ifdef HAVE_MXDATETIME
static const char *
skip_until_space(const char *s) skip_until_space(const char *s)
{ {
while (*s && *s != ' ') s++; while (*s && *s != ' ') s++;
return s; return s;
} }
#endif
const char * static const char *
skip_until_space2(const char *s, Py_ssize_t *len) skip_until_space2(const char *s, Py_ssize_t *len)
{ {
while (*len > 0 && *s && *s != ' ') { while (*len > 0 && *s && *s != ' ') {

View File

@ -90,9 +90,4 @@ HIDDEN PyObject *typecast_from_python(
HIDDEN PyObject *typecast_cast( HIDDEN PyObject *typecast_cast(
PyObject *self, const char *str, Py_ssize_t len, PyObject *curs); 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) */ #endif /* !defined(PSYCOPG_TYPECAST_H) */