PythonMonkey   v1.1.2 (dev)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
StrType.hh
Go to the documentation of this file.
1
11#ifndef PythonMonkey_StrType_
12#define PythonMonkey_StrType_
13
14#include <jsapi.h>
15
16#include <Python.h>
17
21struct StrType {
22public:
37 static PyObject *getPyObject(JSContext *cx, JS::HandleValue str);
38
39 static PyObject *proxifyString(JSContext *cx, JS::HandleValue str);
40};
41
42#endif
This struct represents the 'string' type in Python, which is represented as a 'char*' in C++.
Definition StrType.hh:21
static PyObject * proxifyString(JSContext *cx, JS::HandleValue str)
Definition StrType.cc:108
static PyObject * getPyObject(JSContext *cx, JS::HandleValue str)
Construct a new unicode PyObject from a JSString. Automatically handles encoding conversion for latin...
Definition StrType.cc:197