Wizards Magic  3.2.20
MTG based computer game
 All Classes Namespaces Files Functions Variables Typedefs Macros
Classes | Macros | Typedefs | Functions
_speedups.c File Reference
#include "Python.h"
#include "structmember.h"

Classes

struct  _PyScannerObject
 
struct  _PyEncoderObject
 

Macros

#define PyOS_string_to_double   json_PyOS_string_to_double
 
#define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
 
#define PY_SSIZE_T_MAX   INT_MAX
 
#define PY_SSIZE_T_MIN   INT_MIN
 
#define PyInt_FromSsize_t   PyInt_FromLong
 
#define PyInt_AsSsize_t   PyInt_AsLong
 
#define Py_IS_FINITE(X)   (!Py_IS_INFINITY(X) && !Py_IS_NAN(X))
 
#define UNUSED
 
#define DEFAULT_ENCODING   "utf-8"
 
#define PyScanner_Check(op)   PyObject_TypeCheck(op, &PyScannerType)
 
#define PyScanner_CheckExact(op)   (Py_TYPE(op) == &PyScannerType)
 
#define PyEncoder_Check(op)   PyObject_TypeCheck(op, &PyEncoderType)
 
#define PyEncoder_CheckExact(op)   (Py_TYPE(op) == &PyEncoderType)
 
#define Decimal_Check(op)   (PyObject_TypeCheck(op, DecimalTypePtr))
 
#define S_CHAR(c)   (c >= ' ' && c <= '~' && c != '\\' && c != '"')
 
#define IS_WHITESPACE(c)   (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\r'))
 
#define MIN_EXPANSION   6
 
#define MAX_EXPANSION   MIN_EXPANSION
 
#define APPEND_OLD_CHUNK
 

Typedefs

typedef int Py_ssize_t
 
typedef struct _PyScannerObject PyScannerObject
 
typedef struct _PyEncoderObject PyEncoderObject
 

Functions

void init_speedups (void)
 
 PyDoc_STRVAR (pydoc_scanstring,"scanstring(basestring, end, encoding, strict=True) -> (str, end)\n""\n""Scan the string s for a JSON string. End is the index of the\n""character in s after the quote that started the JSON string.\n""Unescapes all valid JSON string escape sequences and raises ValueError\n""on attempt to decode an invalid string. If strict is False then literal\n""control characters are allowed in the string.\n""\n""Returns a tuple of the decoded string and the index of the character in s\n""after the end quote.")
 
 PyDoc_STRVAR (pydoc_encode_basestring_ascii,"encode_basestring_ascii(basestring) -> str\n""\n""Return an ASCII-only JSON representation of a Python string")
 
 PyDoc_STRVAR (scanner_doc,"JSON scanner object")
 
 PyDoc_STRVAR (encoder_doc,"_iterencode(obj, _current_indent_level) -> iterable")
 
 PyDoc_STRVAR (module_doc,"simplejson speedups\n")
 

Macro Definition Documentation

#define APPEND_OLD_CHUNK
Value:
if (chunk != NULL) { \
if (chunks == NULL) { \
chunks = PyList_New(0); \
if (chunks == NULL) { \
goto bail; \
} \
} \
if (PyList_Append(chunks, chunk)) { \
goto bail; \
} \
Py_CLEAR(chunk); \
}
#define Decimal_Check (   op)    (PyObject_TypeCheck(op, DecimalTypePtr))
#define DEFAULT_ENCODING   "utf-8"
#define IS_WHITESPACE (   c)    (((c) == ' ') || ((c) == '\t') || ((c) == '\n') || ((c) == '\r'))
#define MAX_EXPANSION   MIN_EXPANSION
#define MIN_EXPANSION   6
#define Py_IS_FINITE (   X)    (!Py_IS_INFINITY(X) && !Py_IS_NAN(X))
#define PY_SSIZE_T_MAX   INT_MAX
#define PY_SSIZE_T_MIN   INT_MIN
#define Py_TYPE (   ob)    (((PyObject*)(ob))->ob_type)
#define PyEncoder_Check (   op)    PyObject_TypeCheck(op, &PyEncoderType)
#define PyEncoder_CheckExact (   op)    (Py_TYPE(op) == &PyEncoderType)
#define PyInt_AsSsize_t   PyInt_AsLong
#define PyInt_FromSsize_t   PyInt_FromLong
#define PyOS_string_to_double   json_PyOS_string_to_double
#define PyScanner_Check (   op)    PyObject_TypeCheck(op, &PyScannerType)
#define PyScanner_CheckExact (   op)    (Py_TYPE(op) == &PyScannerType)
#define S_CHAR (   c)    (c >= ' ' && c <= '~' && c != '\\' && c != '"')
#define UNUSED

Typedef Documentation

typedef int Py_ssize_t

Function Documentation

void init_speedups ( void  )
PyDoc_STRVAR ( pydoc_scanstring  ,
"scanstring(basestring, end, encoding, strict=True) -> (str, end)\n""\n""Scan the string s for a JSON string. End is the index of the\n""character in s after the quote that started the JSON string.\n""Unescapes all valid JSON string escape sequences and raises ValueError\n""on attempt to decode an invalid string. If strict is False then literal\n""control characters are allowed in the string.\n""\n""Returns a tuple of the decoded string and the index of the character in s\n""after the end quote."   
)
PyDoc_STRVAR ( pydoc_encode_basestring_ascii  ,
"encode_basestring_ascii(basestring) -> str\n""\n""Return an ASCII-only JSON representation of a Python string"   
)
PyDoc_STRVAR ( scanner_doc  ,
"JSON scanner object"   
)
PyDoc_STRVAR ( encoder_doc  ,
"_iterencode(obj, _current_indent_level) -> iterable"   
)
PyDoc_STRVAR ( module_doc  ,
"simplejson speedups\n"   
)