#include <aerospike/as_util.h>
#include <aerospike/as_val.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
Go to the source code of this file.
static void as_geojson_destroy |
( |
as_geojson * |
string) | |
|
|
inlinestatic |
static char * as_geojson_get |
( |
const as_geojson * |
string) | |
|
|
inlinestatic |
static char * as_geojson_getorelse |
( |
const as_geojson * |
string, |
|
|
char * |
fallback |
|
) |
| |
|
inlinestatic |
Get the string value. If string is NULL, then return the fallback value.
Definition at line 237 of file as_geojson.h.
Initialize a stack allocated as_geojson
.
If free is true, then the string value will be freed when the as_geojson is destroyed.
- Parameters
-
string | The stack allocated as_geojson to initialize |
value | The NULL terminated string of character. |
free | If true, then the value will be freed when as_geojson is destroyed. |
- Returns
- On success, the initialized string. Otherwise NULL.
Initialize a stack allocated as_geojson
and its length.
If free is true, then the string value will be freed when the as_geojson is destroyed.
- Parameters
-
string | The stack allocated as_geojson to initialize |
value | The NULL terminated string of character. |
len | The length of the string. |
free | If true, then the value will be freed when as_geojson is destroyed. |
- Returns
- On success, the initialized string. Otherwise NULL.
The length of the string
- Parameters
-
string | The string to get the length of. |
- Returns
- the length of the string in bytes.
as_geojson * as_geojson_new |
( |
char * |
value, |
|
|
bool |
free |
|
) |
| |
Create and initialize a new heap allocated as_geojson
.
If free is true, then the string value will be freed when the as_geojson is destroyed.
- Parameters
-
value | The NULL terminated string of character. |
free | If true, then the value will be freed when as_geojson is destroyed. |
- Returns
- On success, the new string. Otherwise NULL.
as_geojson* as_geojson_new_strdup |
( |
const char * |
value) | |
|
Create and initialize a new heap allocated as_geojson
.
Value is cf_strdup()'d and will be freed when the as_geojson is destroyed.
- Parameters
-
value | The NULL terminated string of character. |
- Returns
- On success, the new string. Otherwise NULL.
as_geojson * as_geojson_new_wlen |
( |
char * |
value, |
|
|
size_t |
len, |
|
|
bool |
free |
|
) |
| |
Create and initialize a new heap allocated as_geojson
and its length.
If free is true, then the string value will be freed when the as_geojson is destroyed.
- Parameters
-
value | The NULL terminated string of character. |
len | The length of the string. |
free | If true, then the value will be freed when as_geojson is destroyed. |
- Returns
- On success, the new string. Otherwise NULL.
void as_geojson_val_destroy |
( |
as_val * |
v) | |
|
|
private |
Internal helper function for destroying an as_val.
uint32_t as_geojson_val_hashcode |
( |
const as_val * |
v) | |
|
|
private |
Internal helper function for getting the hashcode of an as_val.
char* as_geojson_val_tostring |
( |
const as_val * |
v) | |
|
|
private |
Internal helper function for getting the string representation of an as_val.