diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a66d475f8402da328d01ea875842053c25654c4..31c5bfe7166bf42669cf4f0dd706ff3c2107afe1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -project(dap_server_core_python_module C) +project(DapServerCore C) cmake_minimum_required(VERSION 2.8) set(CMAKE_VERBOSE_MAKEFILE ON) diff --git a/include/libdap-server-core-python.h b/include/libdap-server-core-python.h index cc71a4db787181a1b603b7e21abb07fa3273dfcf..313bdf77e0de7018f1a3ea6ade1484ed06d6a81c 100644 --- a/include/libdap-server-core-python.h +++ b/include/libdap-server-core-python.h @@ -9,8 +9,6 @@ extern "C" { #endif -dap_server_t *t_server; - typedef struct PyDapServer { PyObject_HEAD dap_server_t *t_server; @@ -58,14 +56,14 @@ static PyMethodDef DapServerCorePythonMethods[] = { static struct PyModuleDef dapservercorepythonmodule = { PyModuleDef_HEAD_INIT, - "libdap_server_core_python_module", /* name of module */ + "libDapServerCore", /* name of module */ NULL, /* module documentation, may be NULL */ -1, /* size of per-interpreter state of the module, or -1 if the module keeps state in global variables. */ DapServerCorePythonMethods }; -PyMODINIT_FUNC PyInit_libdap_server_core_python_module(void); +PyMODINIT_FUNC PyInit_libDapServerCore(void); diff --git a/src/libdap-server-core-python.c b/src/libdap-server-core-python.c index fed7b8467cf748274ff8419374b17e06d4c82d0d..a067ef37b73fa4af256373333fb8050589ea3dd1 100644 --- a/src/libdap-server-core-python.c +++ b/src/libdap-server-core-python.c @@ -47,7 +47,7 @@ static PyObject *dap_server_core_listen(PyObject *self, PyObject *args){ return Py_BuildValue("O", obj); } -PyMODINIT_FUNC PyInit_libdap_server_core_python_module(void){ +PyMODINIT_FUNC PyInit_libDapServerCore(void){ dapServer_dapServerType.tp_new = PyType_GenericNew; if (PyType_Ready(&dapServer_dapServerType) < 0) return NULL; @@ -62,7 +62,7 @@ int main(int argc, char **argv) { } /* Add a built-in module, before Py_Initialize */ - PyImport_AppendInittab("libdap_server_core_python_module", PyInit_libdap_server_core_python_module); + PyImport_AppendInittab("libDapServerCore", PyInit_libDapServerCore); /* Pass argv[0] to the Python interpreter */ Py_SetProgramName(program); @@ -73,7 +73,7 @@ int main(int argc, char **argv) { /* Optionally import the module; alternatively, import can be deferred until the embedded script imports it. */ - PyImport_ImportModule("libdap_server_core_python_module"); + PyImport_ImportModule("libDapServerCore"); PyMem_RawFree(program); return 0; diff --git a/test/test.py b/test/test.py index 90bd524e70977855f6fc872e192da3c6b168868f..2780abb163e6d8cdd65d2ec4dc757b4af707f65c 100644 --- a/test/test.py +++ b/test/test.py @@ -1,4 +1,4 @@ -import libdap_server_core_python_module as server +import libDapServerCore as server print ("Start wrapping libdap server core python module") res_i = server.init(1, 0)