forked from zrax/pycdc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyc_string.h
More file actions
31 lines (22 loc) · 708 Bytes
/
pyc_string.h
File metadata and controls
31 lines (22 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef _PYC_STRING_H
#define _PYC_STRING_H
#include "pyc_object.h"
#include "data.h"
#include <cstdio>
class PycString : public PycObject {
public:
PycString(int type = TYPE_STRING)
: PycObject(type), m_value(0), m_length(0) { }
~PycString() { delete[] m_value; }
bool isEqual(PycRef<PycObject> obj) const;
bool isEqual(const char* str) const;
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,
bool triple = false, FILE* F = pyc_output);
#endif