Files
Pyarmor-Static-Unpack-1shot/pyc_string.h

32 lines
708 B
C
Raw Normal View History

2009-07-24 08:35:21 +00:00
#ifndef _PYC_STRING_H
#define _PYC_STRING_H
2011-10-23 17:48:10 -07:00
#include "pyc_object.h"
2011-10-23 19:33:24 -07:00
#include "data.h"
2009-07-24 19:52:47 +00:00
#include <cstdio>
2009-07-24 08:35:21 +00:00
class PycString : public PycObject {
public:
PycString(int type = TYPE_STRING)
: PycObject(type), m_value(0), m_length(0) { }
2014-01-20 22:21:56 -08:00
~PycString() { delete[] m_value; }
2009-07-24 08:35:21 +00:00
2009-07-24 21:15:51 +00:00
bool isEqual(PycRef<PycObject> obj) const;
bool isEqual(const char* str) const;
2009-07-24 21:15:51 +00:00
2009-07-24 08:35:21 +00:00
void load(class PycData* stream, class PycModule* mod);
int length() const { return m_length; }
const char* value() const { return m_value; }
private:
char* m_value;
int m_length;
};
void OutputString(PycRef<PycString> str, char prefix = 0,
2011-10-23 19:33:24 -07:00
bool triple = false, FILE* F = pyc_output);
2009-07-24 19:52:47 +00:00
2009-07-24 08:35:21 +00:00
#endif