dcparser: The dcparser now compiles outside of panda

Closes #945
This commit is contained in:
Kyle Smith 2020-06-01 20:35:44 +10:00 committed by rdb
parent 0d9cb5c392
commit 7f9680bd69
5 changed files with 13 additions and 3 deletions

View File

@ -77,7 +77,9 @@ DCClass(DCFile *dc_file, const string &name, bool is_struct, bool bogus_class) :
_number = -1;
_constructor = nullptr;
#ifdef WITHIN_PANDA
_python_class_defs = nullptr;
#endif
}
/**

View File

@ -172,6 +172,9 @@ private:
typedef pmap<int, DCField *> FieldsByIndex;
FieldsByIndex _fields_by_index;
friend class DCField;
#ifdef WITHIN_PANDA
// See pandaNode.h for an explanation of this trick
class PythonClassDefs : public ReferenceCount {
public:
@ -179,8 +182,6 @@ private:
};
PT(PythonClassDefs) _python_class_defs;
friend class DCField;
#ifdef WITHIN_PANDA
friend class Extension<DCClass>;
#endif
};

View File

@ -599,7 +599,10 @@ char *dcyytext;
#include "dcParser.h"
#include "dcFile.h"
#include "dcindent.h"
#ifdef WITHIN_PANDA
#include "pstrtod.h"
#endif
static int yyinput(void); // declared by flex.

View File

@ -11,8 +11,10 @@
#include "dcParser.h"
#include "dcFile.h"
#include "dcindent.h"
#include "pstrtod.h"
#ifdef WITHIN_PANDA
#include "pstrtod.h"
#endif
static int yyinput(void); // declared by flex.
extern "C" int dcyywrap();

View File

@ -70,6 +70,7 @@
#define BEGIN_PUBLISH
#define END_PUBLISH
#define BLOCKING
#define EXTENSION(x)
// These control the declspec(dllexport/dllimport) on Windows. When compiling
// outside of Panda, we assume we aren't part of a DLL.
@ -100,6 +101,7 @@ typedef std::string Filename;
#define pmap std::map
#define pset std::set
#define vector_uchar std::vector<unsigned char>
#define patof(x) atof(x)
#include <stdint.h>
#include <string.h>