mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-28 14:30:32 +03:00
Internal imports simplified.
.c files only need to import psycopg.h: it will in turn import dependencies from Python and libpq and configure.h. psycopg.h should be the first to be imported, so the basic imports are not required in the .h's As a guideline I'm trying to import from the most specific to the most generic to detect missing imports in the .h's.
This commit is contained in:
parent
9fa1eac2b4
commit
6d7916cfe1
psycopg
adapter_asis.cadapter_asis.hadapter_binary.cadapter_binary.hadapter_datetime.cadapter_datetime.hadapter_list.cadapter_list.hadapter_mxdatetime.cadapter_mxdatetime.hadapter_pboolean.cadapter_pboolean.hadapter_pdecimal.cadapter_pdecimal.hadapter_pfloat.cadapter_pfloat.hadapter_qstring.cadapter_qstring.hconnection.hconnection_int.cconnection_type.ccursor.hcursor_int.ccursor_type.cgreen.clobject.hlobject_int.clobject_type.cmicroprotocols.cmicroprotocols.hmicroprotocols_proto.cmicroprotocols_proto.hnotify.hnotify_type.cpqpath.cpqpath.hpsycopgmodule.cpython.htypecast.ctypecast.htypecast_binary.ctypecast_binary.hutils.cxid.hxid_type.c
|
@ -22,19 +22,17 @@
|
|||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/adapter_asis.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/adapter_asis.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
/** the AsIs object **/
|
||||
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#ifndef PSYCOPG_ASIS_H
|
||||
#define PSYCOPG_ASIS_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -23,21 +23,17 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
|
||||
#include <libpq-fe.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/connection.h"
|
||||
|
||||
#include "psycopg/adapter_binary.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
#include "psycopg/connection.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/** the quoting code */
|
||||
|
||||
|
|
|
@ -26,12 +26,6 @@
|
|||
#ifndef PSYCOPG_BINARY_H
|
||||
#define PSYCOPG_BINARY_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -23,8 +23,12 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/adapter_datetime.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
#include <datetime.h>
|
||||
|
@ -32,12 +36,6 @@
|
|||
#include <time.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/adapter_datetime.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
extern HIDDEN PyObject *pyPsycopgTzModule;
|
||||
extern HIDDEN PyObject *pyPsycopgTzLOCAL;
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#ifndef PSYCOPG_DATETIME_H
|
||||
#define PSYCOPG_DATETIME_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -23,19 +23,16 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/adapter_list.h"
|
||||
#include "psycopg/microprotocols.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
|
||||
|
||||
/* list_str, list_getquoted - return result of quoting */
|
||||
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#ifndef PSYCOPG_LIST_H
|
||||
#define PSYCOPG_LIST_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -23,19 +23,18 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
/* TODO: check if still compiles ok: I have no mx on this box */
|
||||
#include "psycopg/adapter_mxdatetime.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
#include <mxDateTime.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/adapter_mxdatetime.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
int
|
||||
psyco_adapter_mxdatetime_init(void)
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#ifndef PSYCOPG_MXDATETIME_H
|
||||
#define PSYCOPG_MXDATETIME_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -23,19 +23,16 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/adapter_pboolean.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/adapter_pboolean.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
|
||||
/** the Boolean object **/
|
||||
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#ifndef PSYCOPG_PBOOLEAN_H
|
||||
#define PSYCOPG_PBOOLEAN_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -23,19 +23,16 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/adapter_pdecimal.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <floatobject.h>
|
||||
#include <math.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/adapter_pdecimal.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
|
||||
/** the Decimal object **/
|
||||
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#ifndef PSYCOPG_PDECIMAL_H
|
||||
#define PSYCOPG_PDECIMAL_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -23,19 +23,16 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/adapter_pfloat.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <floatobject.h>
|
||||
#include <math.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/adapter_pfloat.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
|
||||
/** the Float object **/
|
||||
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#ifndef PSYCOPG_PFLOAT_H
|
||||
#define PSYCOPG_PFLOAT_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -23,22 +23,17 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
|
||||
#include <libpq-fe.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/connection.h"
|
||||
#include "psycopg/adapter_qstring.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/* qstring_quote - do the quote process on plain and unicode strings */
|
||||
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#ifndef PSYCOPG_QSTRING_H
|
||||
#define PSYCOPG_QSTRING_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#ifndef PSYCOPG_CONNECTION_H
|
||||
#define PSYCOPG_CONNECTION_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/xid.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -23,19 +23,18 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/connection.h"
|
||||
#include "psycopg/cursor.h"
|
||||
#include "psycopg/pqpath.h"
|
||||
#include "psycopg/green.h"
|
||||
#include "psycopg/notify.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/* conn_notice_callback - process notices */
|
||||
|
||||
static void
|
||||
|
|
|
@ -23,18 +23,9 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/connection.h"
|
||||
#include "psycopg/cursor.h"
|
||||
#include "psycopg/pqpath.h"
|
||||
|
@ -42,6 +33,13 @@
|
|||
#include "psycopg/green.h"
|
||||
#include "psycopg/xid.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
/** DBAPI methods **/
|
||||
|
||||
/* cursor method - allocate a new cursor */
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#ifndef PSYCOPG_CURSOR_H
|
||||
#define PSYCOPG_CURSOR_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/connection.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -23,16 +23,15 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/cursor.h"
|
||||
#include "psycopg/pqpath.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/* curs_reset - reset the cursor to a clean state */
|
||||
|
||||
void
|
||||
|
|
|
@ -23,15 +23,9 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <structmember.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/cursor.h"
|
||||
#include "psycopg/connection.h"
|
||||
#include "psycopg/green.h"
|
||||
|
@ -39,9 +33,13 @@
|
|||
#include "psycopg/typecast.h"
|
||||
#include "psycopg/microprotocols.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
#include "pgversion.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
extern PyObject *pyPsycopgTzFixedOffsetTimezone;
|
||||
|
||||
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
*/
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#include "psycopg/green.h"
|
||||
#include "psycopg/connection.h"
|
||||
#include "psycopg/pqpath.h"
|
||||
|
||||
|
||||
HIDDEN PyObject *wait_callback = NULL;
|
||||
|
||||
static PyObject *have_wait_callback(void);
|
||||
|
|
|
@ -26,11 +26,8 @@
|
|||
#ifndef PSYCOPG_LOBJECT_H
|
||||
#define PSYCOPG_LOBJECT_H 1
|
||||
|
||||
#include <Python.h>
|
||||
#include <libpq-fe.h>
|
||||
#include <libpq/libpq-fs.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/connection.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -23,17 +23,15 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/connection.h"
|
||||
|
||||
#include "psycopg/lobject.h"
|
||||
#include "psycopg/connection.h"
|
||||
#include "psycopg/pqpath.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef PSYCOPG_EXTENSIONS
|
||||
|
||||
static void
|
||||
|
|
|
@ -23,20 +23,18 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#include <Python.h>
|
||||
#include <structmember.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/lobject.h"
|
||||
#include "psycopg/connection.h"
|
||||
#include "psycopg/microprotocols.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
#include "psycopg/pqpath.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#ifdef PSYCOPG_EXTENSIONS
|
||||
|
||||
|
|
|
@ -23,18 +23,15 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <structmember.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/cursor.h"
|
||||
#include "psycopg/connection.h"
|
||||
|
||||
#include "psycopg/microprotocols.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
#include "psycopg/cursor.h"
|
||||
#include "psycopg/connection.h"
|
||||
|
||||
#include <structmember.h>
|
||||
|
||||
|
||||
/** the adapters registry **/
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
#ifndef PSYCOPG_MICROPROTOCOLS_H
|
||||
#define PSYCOPG_MICROPROTOCOLS_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/connection.h"
|
||||
#include "psycopg/cursor.h"
|
||||
|
||||
|
|
|
@ -23,19 +23,16 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
#include <structmember.h>
|
||||
#include <stringobject.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/microprotocols_proto.h"
|
||||
|
||||
|
||||
/** void protocol implementation **/
|
||||
|
||||
|
|
|
@ -26,12 +26,6 @@
|
|||
#ifndef PSYCOPG_ISQLQUOTE_H
|
||||
#define PSYCOPG_ISQLQUOTE_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <libpq-fe.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -26,10 +26,6 @@
|
|||
#ifndef PSYCOPG_NOTIFY_H
|
||||
#define PSYCOPG_NOTIFY_H 1
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
extern HIDDEN PyTypeObject NotifyType;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -23,15 +23,13 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/notify.h"
|
||||
|
||||
#include <structmember.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/notify.h"
|
||||
|
||||
static const char notify_doc[] =
|
||||
"A notification received from the backend.\n\n"
|
||||
|
|
|
@ -29,14 +29,9 @@
|
|||
connection.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/pqpath.h"
|
||||
#include "psycopg/connection.h"
|
||||
#include "psycopg/cursor.h"
|
||||
|
@ -44,6 +39,8 @@
|
|||
#include "psycopg/typecast.h"
|
||||
#include "psycopg/pgtypes.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/* Strip off the severity from a Postgres error message. */
|
||||
static const char *
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#ifndef PSYCOPG_PQPATH_H
|
||||
#define PSYCOPG_PQPATH_H 1
|
||||
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/cursor.h"
|
||||
#include "psycopg/connection.h"
|
||||
|
||||
|
|
|
@ -23,13 +23,9 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/connection.h"
|
||||
#include "psycopg/cursor.h"
|
||||
#include "psycopg/green.h"
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
#ifndef PSYCOPG_PYTHON_H
|
||||
#define PSYCOPG_PYTHON_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <structmember.h>
|
||||
|
||||
#if PY_VERSION_HEX < 0x02040000
|
||||
|
|
|
@ -23,14 +23,11 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include <structmember.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/typecast.h"
|
||||
#include "psycopg/cursor.h"
|
||||
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#ifndef PSYCOPG_TYPECAST_H
|
||||
#define PSYCOPG_TYPECAST_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
#include "typecast_binary.h"
|
||||
|
||||
#include <libpq-fe.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
|
|
@ -26,11 +26,6 @@
|
|||
#ifndef PSYCOPG_TYPECAST_BINARY_H
|
||||
#define PSYCOPG_TYPECAST_BINARY_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -23,14 +23,13 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#include <Python.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/connection.h"
|
||||
#include "psycopg/pgtypes.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
char *
|
||||
|
|
|
@ -27,10 +27,6 @@
|
|||
#ifndef PSYCOPG_XID_H
|
||||
#define PSYCOPG_XID_H 1
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "psycopg/config.h"
|
||||
|
||||
extern HIDDEN PyTypeObject XidType;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -24,15 +24,13 @@
|
|||
* License for more details.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/psycopg.h"
|
||||
|
||||
#include "psycopg/xid.h"
|
||||
|
||||
#include <structmember.h>
|
||||
|
||||
#define PSYCOPG_MODULE
|
||||
#include "psycopg/config.h"
|
||||
#include "psycopg/python.h"
|
||||
#include "psycopg/psycopg.h"
|
||||
#include "psycopg/xid.h"
|
||||
|
||||
static const char xid_doc[] =
|
||||
"A transaction identifier used for two-phase commit.\n\n"
|
||||
|
|
Loading…
Reference in New Issue
Block a user