From 2b26cdd058d1f0ad77bc59c60c5d3c6d4b535d04 Mon Sep 17 00:00:00 2001 From: Bimal Jha Date: Mon, 30 Dec 2024 11:18:33 +0530 Subject: [PATCH] fix init issues --- ibm_db.c | 6 +++--- ibm_db.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ibm_db.c b/ibm_db.c index 05287716..5f06bc69 100644 --- a/ibm_db.c +++ b/ibm_db.c @@ -15622,7 +15622,7 @@ static PyMethodDef ibm_db_Methods[] = { #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, - "ibm_db", + "ibm_db2", "IBM DataServer Driver for Python.", -1, ibm_db_Methods, @@ -15631,7 +15631,7 @@ static struct PyModuleDef moduledef = { /* Module initialization function */ PyMODINIT_FUNC -INIT_ibm_db(void) { +INIT_ibm_db2(void) { PyObject* m; PyDateTime_IMPORT; @@ -15659,7 +15659,7 @@ INIT_ibm_db(void) { return MOD_RETURN_ERROR; #if PY_MAJOR_VERSION < 3 - m = Py_InitModule3("ibm_db", ibm_db_Methods, "IBM DataServer Driver for Python."); + m = Py_InitModule3("ibm_db2", ibm_db_Methods, "IBM DataServer Driver for Python."); #else m = PyModule_Create(&moduledef); #endif diff --git a/ibm_db.h b/ibm_db.h index 33295364..b78d81bf 100644 --- a/ibm_db.h +++ b/ibm_db.h @@ -36,7 +36,7 @@ #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #define MOD_RETURN_ERROR #define MOD_RETURN_VAL(mod) -#define INIT_ibm_db initibm_db +#define INIT_ibm_db2 initibm_db2 #else #define PyInt_Check PyLong_Check #define PyInt_FromLong PyLong_FromLong @@ -50,7 +50,7 @@ #define StringObj_Size PyUnicode_GET_LENGTH #define MOD_RETURN_ERROR NULL #define MOD_RETURN_VAL(mod) mod -#define INIT_ibm_db PyInit_ibm_db +#define INIT_ibm_db2 PyInit_ibm_db2 #endif #define NUM2LONG(data) PyInt_AsLong(data)