diff --git a/psycopg/connection.h b/psycopg/connection.h index c52abc9f..d15c9c64 100644 --- a/psycopg/connection.h +++ b/psycopg/connection.h @@ -71,7 +71,7 @@ extern HIDDEN PyTypeObject connectionType; struct connectionObject_notice { struct connectionObject_notice *next; - const char *message; + char *message; }; /* the typedef is forward-declared in psycopg.h */ diff --git a/psycopg/connection_int.c b/psycopg/connection_int.c index aea2841c..8fce908d 100644 --- a/psycopg/connection_int.c +++ b/psycopg/connection_int.c @@ -154,7 +154,7 @@ conn_notice_clean(connectionObject *self) while (notice != NULL) { tmp = notice; notice = notice->next; - free((void*)tmp->message); + free(tmp->message); free(tmp); }