16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 02:09:19 +02:00

linux support

This commit is contained in:
milek7
2017-07-31 00:25:19 +02:00
parent e7623fa18f
commit f7459f3434
64 changed files with 967 additions and 602 deletions

25
PyInt.h
View File

@@ -1,9 +1,13 @@
#ifndef PyIntH
#define PyIntH
#include <vector>
#include <set>
#include <string>
#ifdef _POSIX_C_SOURCE
#undef _POSIX_C_SOURCE
#endif
#ifdef _XOPEN_SOURCE
#undef _XOPEN_SOURCE
#endif
#ifdef _DEBUG
#undef _DEBUG // bez tego macra Py_DECREF powoduja problemy przy linkowaniu
@@ -12,6 +16,12 @@
#else
#include "Python.h"
#endif
#include <vector>
#include <set>
#include <string>
#include <thread>
#include "parser.h"
#include "Model3d.h"
@@ -36,7 +46,6 @@ class TPythonInterpreter
TPythonInterpreter();
~TPythonInterpreter() {}
static TPythonInterpreter *_instance;
int _screenRendererPriority = 0;
// std::set<const char *, ltstr> _classes;
std::set<std::string> _classes;
PyObject *_main;
@@ -53,11 +62,6 @@ class TPythonInterpreter
*/ bool loadClassFile( std::string const &lookupPath, std::string const &className );
PyObject *newClass( std::string const &className );
PyObject *newClass( std::string const &className, PyObject *argsTuple );
int getScreenRendererPriotity()
{
return _screenRendererPriority;
};
void setScreenRendererPriority(const char *priority);
void handleError();
};
@@ -84,8 +88,7 @@ class TPythonScreens
bool _cleanupReadyFlag;
bool _renderReadyFlag;
bool _terminationFlag;
void *_thread;
unsigned int _threadId;
std::thread *_thread;
std::vector<TPythonScreenRenderer *> _screens;
std::string _lookupPath;
void *_train;