renaming files

parent 333e61ab
...@@ -18,7 +18,7 @@ endif( ) ...@@ -18,7 +18,7 @@ endif( )
add_definitions( -DPy_NO_ENABLE_SHARED ) add_definitions( -DPy_NO_ENABLE_SHARED )
add_library( VAPython SHARED "va.cpp" ) add_library( VAPython SHARED "vasingleton.cpp" )
target_link_libraries( VAPython ${VISTA_USE_PACKAGE_LIBRARIES} ) target_link_libraries( VAPython ${VISTA_USE_PACKAGE_LIBRARIES} )
......
#include <Python.h> #include <Python.h>
#include <VANetClient.h> #include <VANetClient.h>
#include <string.h>
static int g_iVal = 1; static int g_iVal = 1;
static IVANetClient* g_pVANetClient = nullptr; static IVANetClient* g_pVANetClient = nullptr;
...@@ -19,7 +21,7 @@ PyDoc_STRVAR(va_connect__doc__, ...@@ -19,7 +21,7 @@ PyDoc_STRVAR(va_connect__doc__,
" port\n" " port\n"
" TCP/IP listening port, usually 12340."); " TCP/IP listening port, usually 12340.");
static PyObject* va_disconnect_impl(PyObject *module) static PyObject* va_disconnect_impl(PyObject*)
{ {
g_iVal++; g_iVal++;
PyObject* pRetVal = PyTuple_New(3); PyObject* pRetVal = PyTuple_New(3);
...@@ -46,12 +48,12 @@ static PyObject* va_connect(PyObject *module, PyObject **args, Py_ssize_t nargs, ...@@ -46,12 +48,12 @@ static PyObject* va_connect(PyObject *module, PyObject **args, Py_ssize_t nargs,
return PyBool_FromLong(0); return PyBool_FromLong(0);
} }
char* pcServer = PyUnicode_AsEncodedString std::string sServer = "localhost";
g_pVANetClient->Initialize( ) int iPort = 12340;
if(IVANetClient::VA_NO_ERROR == g_pVANetClient->Initialize(sServer, iPort) )
return PyBool_FromLong(1);
exit: else
return return_value; return PyBool_FromLong(1);
} }
static PyObject* va_disconnect(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) static PyObject* va_disconnect(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment