Functions exported to drop warnings.

This commit is contained in:
Daniele Varrazzo 2010-11-18 23:45:16 +00:00
parent 67793ed989
commit 576b01f6a3
3 changed files with 10 additions and 3 deletions

View File

@ -5,6 +5,8 @@
* psycopg/utils.c: compiler warning dropped. * psycopg/utils.c: compiler warning dropped.
* typecast.h: functions exported to drop warnings.
2010-11-17 Daniele Varrazzo <daniele.varrazzo@gmail.com> 2010-11-17 Daniele Varrazzo <daniele.varrazzo@gmail.com>
* psycopg/connection_type.c: don't clobber exception if * psycopg/connection_type.c: don't clobber exception if

View File

@ -34,16 +34,16 @@
#include "psycopg/typecast.h" #include "psycopg/typecast.h"
#include "psycopg/cursor.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) skip_until_space(const char *s)
{ {
while (*s && *s != ' ') s++; while (*s && *s != ' ') s++;
return s; return s;
} }
static const char * 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,4 +90,9 @@ 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) */