Classes | Defines | Typedefs | Functions
objToJSON.c File Reference
#include "py_defines.h"
#include <stdio.h>
#include <datetime.h>
#include <ultrajson.h>
Include dependency graph for objToJSON.c:

Go to the source code of this file.

Classes

struct  __TypeContext
struct  PyDictIterState

Defines

#define EPOCH_ORD   719163
#define GET_TC(__ptrtc)   ((TypeContext *)((__ptrtc)->prv))
#define PRINTMARK()

Typedefs

typedef void *(* PFN_PyTypeToJSON )(JSOBJ obj, JSONTypeContext *ti, void *outValue, size_t *_outLen)
typedef ssize_t Py_ssize_t
typedef struct __TypeContext TypeContext

Functions

void Dict_iterBegin (JSOBJ obj, JSONTypeContext *tc)
void Dict_iterEnd (JSOBJ obj, JSONTypeContext *tc)
char * Dict_iterGetName (JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
JSOBJ Dict_iterGetValue (JSOBJ obj, JSONTypeContext *tc)
int Dict_iterNext (JSOBJ obj, JSONTypeContext *tc)
void Dir_iterBegin (JSOBJ obj, JSONTypeContext *tc)
void Dir_iterEnd (JSOBJ obj, JSONTypeContext *tc)
char * Dir_iterGetName (JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
JSOBJ Dir_iterGetValue (JSOBJ obj, JSONTypeContext *tc)
int Dir_iterNext (JSOBJ _obj, JSONTypeContext *tc)
void initObjToJSON (void)
void List_iterBegin (JSOBJ obj, JSONTypeContext *tc)
void List_iterEnd (JSOBJ obj, JSONTypeContext *tc)
char * List_iterGetName (JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
JSOBJ List_iterGetValue (JSOBJ obj, JSONTypeContext *tc)
int List_iterNext (JSOBJ obj, JSONTypeContext *tc)
void Object_beginTypeContext (JSOBJ _obj, JSONTypeContext *tc)
void Object_endTypeContext (JSOBJ obj, JSONTypeContext *tc)
double Object_getDoubleValue (JSOBJ obj, JSONTypeContext *tc)
JSINT32 Object_getIntValue (JSOBJ obj, JSONTypeContext *tc)
JSINT64 Object_getLongValue (JSOBJ obj, JSONTypeContext *tc)
const char * Object_getStringValue (JSOBJ obj, JSONTypeContext *tc, size_t *_outLen)
void Object_iterBegin (JSOBJ obj, JSONTypeContext *tc)
void Object_iterEnd (JSOBJ obj, JSONTypeContext *tc)
char * Object_iterGetName (JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
JSOBJ Object_iterGetValue (JSOBJ obj, JSONTypeContext *tc)
int Object_iterNext (JSOBJ obj, JSONTypeContext *tc)
static void Object_releaseObject (JSOBJ _obj)
PyObject * objToJSON (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * objToJSONFile (PyObject *self, PyObject *args, PyObject *kwargs)
static void * PyDateTimeToINT64 (JSOBJ _obj, JSONTypeContext *tc, void *outValue, size_t *_outLen)
static void * PyDateToINT64 (JSOBJ _obj, JSONTypeContext *tc, void *outValue, size_t *_outLen)
static void * PyFloatToDOUBLE (JSOBJ _obj, JSONTypeContext *tc, void *outValue, size_t *_outLen)
static void * PyIntToINT32 (JSOBJ _obj, JSONTypeContext *tc, void *outValue, size_t *_outLen)
static void * PyIntToINT64 (JSOBJ _obj, JSONTypeContext *tc, void *outValue, size_t *_outLen)
static void * PyLongToINT64 (JSOBJ _obj, JSONTypeContext *tc, void *outValue, size_t *_outLen)
static void * PyStringToUTF8 (JSOBJ _obj, JSONTypeContext *tc, void *outValue, size_t *_outLen)
static void * PyUnicodeToUTF8 (JSOBJ _obj, JSONTypeContext *tc, void *outValue, size_t *_outLen)
void Tuple_iterBegin (JSOBJ obj, JSONTypeContext *tc)
void Tuple_iterEnd (JSOBJ obj, JSONTypeContext *tc)
char * Tuple_iterGetName (JSOBJ obj, JSONTypeContext *tc, size_t *outLen)
JSOBJ Tuple_iterGetValue (JSOBJ obj, JSONTypeContext *tc)
int Tuple_iterNext (JSOBJ obj, JSONTypeContext *tc)

Define Documentation

#define EPOCH_ORD   719163

Definition at line 39 of file objToJSON.c.

#define GET_TC (   __ptrtc)    ((TypeContext *)((__ptrtc)->prv))

Definition at line 69 of file objToJSON.c.

Definition at line 80 of file objToJSON.c.


Typedef Documentation

typedef void*(* PFN_PyTypeToJSON)(JSOBJ obj, JSONTypeContext *ti, void *outValue, size_t *_outLen)

Definition at line 41 of file objToJSON.c.

typedef ssize_t Py_ssize_t

Definition at line 45 of file objToJSON.c.

typedef struct __TypeContext TypeContext

Function Documentation

void Dict_iterBegin ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 383 of file objToJSON.c.

void Dict_iterEnd ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 430 of file objToJSON.c.

char* Dict_iterGetName ( JSOBJ  obj,
JSONTypeContext tc,
size_t *  outLen 
)

Definition at line 446 of file objToJSON.c.

Definition at line 441 of file objToJSON.c.

int Dict_iterNext ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 389 of file objToJSON.c.

void Dir_iterBegin ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 220 of file objToJSON.c.

void Dir_iterEnd ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 228 of file objToJSON.c.

char* Dir_iterGetName ( JSOBJ  obj,
JSONTypeContext tc,
size_t *  outLen 
)

Definition at line 331 of file objToJSON.c.

Definition at line 325 of file objToJSON.c.

int Dir_iterNext ( JSOBJ  _obj,
JSONTypeContext tc 
)

Definition at line 246 of file objToJSON.c.

void initObjToJSON ( void  )

Definition at line 82 of file objToJSON.c.

void List_iterBegin ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 345 of file objToJSON.c.

void List_iterEnd ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 364 of file objToJSON.c.

char* List_iterGetName ( JSOBJ  obj,
JSONTypeContext tc,
size_t *  outLen 
)

Definition at line 373 of file objToJSON.c.

Definition at line 368 of file objToJSON.c.

int List_iterNext ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 351 of file objToJSON.c.

void Object_beginTypeContext ( JSOBJ  _obj,
JSONTypeContext tc 
)

Definition at line 453 of file objToJSON.c.

void Object_endTypeContext ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 661 of file objToJSON.c.

double Object_getDoubleValue ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 690 of file objToJSON.c.

Definition at line 682 of file objToJSON.c.

Definition at line 674 of file objToJSON.c.

const char* Object_getStringValue ( JSOBJ  obj,
JSONTypeContext tc,
size_t *  _outLen 
)

Definition at line 669 of file objToJSON.c.

void Object_iterBegin ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 704 of file objToJSON.c.

void Object_iterEnd ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 714 of file objToJSON.c.

char* Object_iterGetName ( JSOBJ  obj,
JSONTypeContext tc,
size_t *  outLen 
)

Definition at line 724 of file objToJSON.c.

Definition at line 719 of file objToJSON.c.

int Object_iterNext ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 709 of file objToJSON.c.

static void Object_releaseObject ( JSOBJ  _obj) [static]

Definition at line 697 of file objToJSON.c.

PyObject* objToJSON ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)

Definition at line 730 of file objToJSON.c.

PyObject* objToJSONFile ( PyObject *  self,
PyObject *  args,
PyObject *  kwargs 
)

Definition at line 811 of file objToJSON.c.

static void* PyDateTimeToINT64 ( JSOBJ  _obj,
JSONTypeContext tc,
void *  outValue,
size_t *  _outLen 
) [static]

Definition at line 132 of file objToJSON.c.

static void* PyDateToINT64 ( JSOBJ  _obj,
JSONTypeContext tc,
void *  outValue,
size_t *  _outLen 
) [static]

Definition at line 154 of file objToJSON.c.

static void* PyFloatToDOUBLE ( JSOBJ  _obj,
JSONTypeContext tc,
void *  outValue,
size_t *  _outLen 
) [static]

Definition at line 107 of file objToJSON.c.

static void* PyIntToINT32 ( JSOBJ  _obj,
JSONTypeContext tc,
void *  outValue,
size_t *  _outLen 
) [static]

Definition at line 87 of file objToJSON.c.

static void* PyIntToINT64 ( JSOBJ  _obj,
JSONTypeContext tc,
void *  outValue,
size_t *  _outLen 
) [static]

Definition at line 94 of file objToJSON.c.

static void* PyLongToINT64 ( JSOBJ  _obj,
JSONTypeContext tc,
void *  outValue,
size_t *  _outLen 
) [static]

Definition at line 101 of file objToJSON.c.

static void* PyStringToUTF8 ( JSOBJ  _obj,
JSONTypeContext tc,
void *  outValue,
size_t *  _outLen 
) [static]

Definition at line 114 of file objToJSON.c.

static void* PyUnicodeToUTF8 ( JSOBJ  _obj,
JSONTypeContext tc,
void *  outValue,
size_t *  _outLen 
) [static]

Definition at line 121 of file objToJSON.c.

void Tuple_iterBegin ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 178 of file objToJSON.c.

void Tuple_iterEnd ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 201 of file objToJSON.c.

char* Tuple_iterGetName ( JSOBJ  obj,
JSONTypeContext tc,
size_t *  outLen 
)

Definition at line 210 of file objToJSON.c.

Definition at line 205 of file objToJSON.c.

int Tuple_iterNext ( JSOBJ  obj,
JSONTypeContext tc 
)

Definition at line 185 of file objToJSON.c.



rosbridge_library
Author(s): Jonathan Mace
autogenerated on Thu Jan 2 2014 11:53:35