Commit 55f675f3 authored by Jeff Niu's avatar Jeff Niu

Fixing Python.h namespace collisions

parent 5be7de04
#ifndef MINOTAUR_CPP_EMBEDDEDCONTROLLER_H
#define MINOTAUR_CPP_EMBEDDEDCONTROLLER_H
#undef slots
#define _hypot hypot // hack to fix a bug with CPython
#include <Python.h>
#include "python.h"
#include <memory>
......
#ifndef MINOTAUR_CPP_PYTHON_H
#define MINOTAUR_CPP_PYTHON_H
#ifdef slots
#undef slots
#endif
#ifndef _hypot
#define _hypot hypot
#endif
#include <Python.h>
#ifdef isspace
#undef isspace
#endif
#ifdef isupper
#undef isupper
#endif
#ifdef islower
#undef islower
#endif
#ifdef toupper
#undef toupper
#endif
#ifdef tolower
#undef tolower
#endif
#ifdef isalpha
#undef isalpha
#endif
#ifdef isalnum
#undef isalnum
#endif
#endif //MINOTAUR_CPP_PYTHON_H
#ifndef MINOTAUR_CPP_PYTHONENGINE_H
#define MINOTAUR_CPP_PYTHONENGINE_H
#undef slots // prevent Qt macro from interfering
#define _hypot hypot // workaround for a bug in Python.h
#include "python.h"
#define PyObject_GetAttrString(object, strName) PyObject_GetAttrString(object, strName)
#define PyObject_SetAttrString(object, strName, value) PyObject_SetAttrString(object, strName, value)
#include <Python.h>
#include <string>
#include <memory>
......
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