Defines | Functions | Variables
ultrajsonenc.c File Reference
#include "ultrajson.h"
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
Include dependency graph for ultrajsonenc.c:

Go to the source code of this file.

Defines

#define Buffer_AppendCharUnchecked(__enc, __chr)   *((__enc)->offset++) = __chr; \
#define Buffer_Reserve(__enc, __len)
#define FALSE   0
#define TRUE   1

Functions

int Buffer_AppendDoubleUnchecked (JSOBJ obj, JSONObjectEncoder *enc, double value)
void Buffer_AppendIntUnchecked (JSONObjectEncoder *enc, JSINT32 value)
void Buffer_AppendLongUnchecked (JSONObjectEncoder *enc, JSINT64 value)
FASTCALL_ATTR INLINE_PREFIX
void FASTCALL_MSVC 
Buffer_AppendShortHexUnchecked (char *outputOffset, unsigned short value)
int Buffer_EscapeStringUnvalidated (JSOBJ obj, JSONObjectEncoder *enc, const char *io, const char *end)
int Buffer_EscapeStringValidated (JSOBJ obj, JSONObjectEncoder *enc, const char *io, const char *end)
void Buffer_Realloc (JSONObjectEncoder *enc, size_t cbNeeded)
void encode (JSOBJ obj, JSONObjectEncoder *enc, const char *name, size_t cbName)
char * JSON_EncodeObject (JSOBJ obj, JSONObjectEncoder *enc, char *_buffer, size_t _cbBuffer)
static void SetError (JSOBJ obj, JSONObjectEncoder *enc, const char *message)
FASTCALL_ATTR INLINE_PREFIX
void FASTCALL_MSVC 
strreverse (char *begin, char *end)

Variables

static const JSUINT8 g_asciiOutputTable [256]
static const char g_escapeChars [] = "0123456789\\b\\t\\n\\f\\r\\\"\\\\\\/"
static const char g_hexChars [] = "0123456789abcdef"
static const double g_pow10 [] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 1000000000000000}

Define Documentation

#define Buffer_AppendCharUnchecked (   __enc,
  __chr 
)    *((__enc)->offset++) = __chr; \

Definition at line 422 of file ultrajsonenc.c.

#define Buffer_Reserve (   __enc,
  __len 
)
Value:
if ((__enc)->end - (__enc)->offset < (__len))  \
    {   \
        Buffer_Realloc((__enc), (__len));\
    }   \

Definition at line 415 of file ultrajsonenc.c.

#define FALSE   0

Definition at line 47 of file ultrajsonenc.c.

#define TRUE   1

Definition at line 44 of file ultrajsonenc.c.


Function Documentation

int Buffer_AppendDoubleUnchecked ( JSOBJ  obj,
JSONObjectEncoder enc,
double  value 
)

Definition at line 464 of file ultrajsonenc.c.

Definition at line 432 of file ultrajsonenc.c.

Definition at line 448 of file ultrajsonenc.c.

FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC Buffer_AppendShortHexUnchecked ( char *  outputOffset,
unsigned short  value 
)

Definition at line 127 of file ultrajsonenc.c.

int Buffer_EscapeStringUnvalidated ( JSOBJ  obj,
JSONObjectEncoder enc,
const char *  io,
const char *  end 
)

Definition at line 135 of file ultrajsonenc.c.

int Buffer_EscapeStringValidated ( JSOBJ  obj,
JSONObjectEncoder enc,
const char *  io,
const char *  end 
)

Definition at line 221 of file ultrajsonenc.c.

void Buffer_Realloc ( JSONObjectEncoder enc,
size_t  cbNeeded 
)

Definition at line 91 of file ultrajsonenc.c.

void encode ( JSOBJ  obj,
JSONObjectEncoder enc,
const char *  name,
size_t  cbName 
)

Definition at line 617 of file ultrajsonenc.c.

char* JSON_EncodeObject ( JSOBJ  obj,
JSONObjectEncoder enc,
char *  _buffer,
size_t  _cbBuffer 
)

Definition at line 836 of file ultrajsonenc.c.

static void SetError ( JSOBJ  obj,
JSONObjectEncoder enc,
const char *  message 
) [static]

Definition at line 82 of file ultrajsonenc.c.

FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC strreverse ( char *  begin,
char *  end 
)

Definition at line 425 of file ultrajsonenc.c.


Variable Documentation

const JSUINT8 g_asciiOutputTable[256] [static]
Initial value:
 
{
 0, 30, 30, 30, 30, 30, 30, 30, 10, 12, 14, 30, 16, 18, 30, 30, 
 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
 1, 1, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 24, 
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 22, 1, 1, 1,
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 
 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 1, 1
}

Definition at line 61 of file ultrajsonenc.c.

const char g_escapeChars[] = "0123456789\\b\\t\\n\\f\\r\\\"\\\\\\/" [static]

Definition at line 52 of file ultrajsonenc.c.

const char g_hexChars[] = "0123456789abcdef" [static]

Definition at line 51 of file ultrajsonenc.c.

const double g_pow10[] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 1000000000000000} [static]

Definition at line 50 of file ultrajsonenc.c.



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