diff --git a/ChangeLog b/ChangeLog index 38ba756e..94113025 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ * psycopg/utils.c: compiler warning dropped. + * typecast.h: functions exported to drop warnings. + 2010-11-17 Daniele Varrazzo <daniele.varrazzo@gmail.com> * psycopg/connection_type.c: don't clobber exception if diff --git a/psycopg/typecast.c b/psycopg/typecast.c index 3866dbfb..8eab1eb7 100644 --- a/psycopg/typecast.c +++ b/psycopg/typecast.c @@ -34,16 +34,16 @@ #include "psycopg/typecast.h" #include "psycopg/cursor.h" -/* usefull function used by some typecasters */ +/* useful function used by some typecasters */ -static const char * +const char * skip_until_space(const char *s) { while (*s && *s != ' ') s++; return s; } -static const char * +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 06232207..e33969e9 100644 --- a/psycopg/typecast.h +++ b/psycopg/typecast.h @@ -90,4 +90,9 @@ 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) */