PythonMonkey   v1.0.0 (dev)
Loading...
Searching...
No Matches
IntType.hh
Go to the documentation of this file.
1
11#ifndef PythonMonkey_IntType_
12#define PythonMonkey_IntType_
13
14#include <jsapi.h>
15
16#include <Python.h>
17
21struct IntType {
22public:
31 static PyObject *getPyObject(JSContext *cx, JS::BigInt *bigint);
32
39 static JS::BigInt *toJsBigInt(JSContext *cx, PyObject *pyObject);
40};
41
42#endif
This struct represents the 'int' type (arbitrary-precision) in Python.
Definition IntType.hh:21
static JS::BigInt * toJsBigInt(JSContext *cx, PyObject *pyObject)
Convert an int object to a JS::BigInt.
Definition IntType.cc:120
static PyObject * getPyObject(JSContext *cx, JS::BigInt *bigint)
Construct a new PyObject from a JS::BigInt.
Definition IntType.cc:72