Macros |
#define | GRN_API_ENTER |
#define | GRN_API_RETURN(r) |
#define | GRN_OP_T0LVL 0 |
#define | GRN_OP_ERR0 1 |
#define | GRN_EMERG GRN_LOG_EMERG |
#define | GRN_ALERT GRN_LOG_ALERT |
#define | GRN_CRIT GRN_LOG_CRIT |
#define | GRN_ERROR GRN_LOG_ERROR |
#define | GRN_WARN GRN_LOG_WARNING |
#define | GRN_OK GRN_LOG_NOTICE |
#define | ERRCLR(ctx) |
#define | BACKTRACE(ctx) |
#define | LOGTRACE(ctx, msg) |
#define | ERRSET(ctx, lvl, r,...) |
#define | ERRP(ctx, lvl) (((ctx) && ((grn_ctx *)(ctx))->errlvl <= (lvl)) || (grn_gctx.errlvl <= (lvl))) |
#define | QLERR(...) |
#define | QLASSERT(expr) |
#define | ERR(rc,...) ERRSET(ctx, GRN_ERROR, (rc), __VA_ARGS__) |
#define | WARN(rc,...) ERRSET(ctx, GRN_WARN, (rc), __VA_ARGS__) |
#define | MERR(...) ERRSET(ctx, GRN_ALERT, GRN_NO_MEMORY_AVAILABLE, __VA_ARGS__) |
#define | ALERT(...) ERRSET(ctx, GRN_ALERT, GRN_SUCCESS, __VA_ARGS__) |
#define | SERR(str) |
#define | GERR(rc,...) ERRSET(&grn_gctx, GRN_ERROR, (rc), __VA_ARGS__) |
#define | GMERR(...) ERRSET(&grn_gctx, GRN_ALERT, GRN_NO_MEMORY_AVAILABLE, __VA_ARGS__) |
#define | GRN_MALLOC(s) grn_malloc(ctx,s,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_CALLOC(s) grn_calloc(ctx,s,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_REALLOC(p, s) grn_realloc(ctx,p,s,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_STRDUP(s) grn_strdup(ctx,s,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_GMALLOC(s) grn_malloc(&grn_gctx,s,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_GCALLOC(s) grn_calloc(&grn_gctx,s,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_GREALLOC(p, s) grn_realloc(&grn_gctx,p,s,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_GSTRDUP(s) grn_strdup(&grn_gctx,s,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_FREE(p) grn_free(ctx,p,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_MALLOCN(t, n) ((t *)(GRN_MALLOC(sizeof(t) * (n)))) |
#define | GRN_GFREE(p) grn_free(&grn_gctx,p,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_GMALLOCN(t, n) ((t *)(GRN_GMALLOC(sizeof(t) * (n)))) |
#define | GRN_ASSERT(s) |
#define | GRN_CTX_ALLOC(ctx, s) grn_ctx_calloc(ctx,s,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_CTX_FREE(ctx, p) grn_ctx_free(ctx,p,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_CTX_ALLOC_L(ctx, s) grn_ctx_alloc_lifo(ctx,s,f,__FILE__,__LINE__,__FUNCTION__) |
#define | GRN_CTX_FREE_L(ctx, p) grn_ctx_free_lifo(ctx,p,__FILE__,__LINE__,__FUNCTION__) |
#define | grn_malloc grn_malloc_default |
#define | grn_calloc grn_calloc_default |
#define | grn_realloc grn_realloc_default |
#define | grn_strdup grn_strdup_default |
#define | grn_free grn_free_default |
#define | GRN_CTX_ALLOCATED (0x80) |
#define | GRN_CTX_TEMPORARY_DISABLE_II_RESOLVE_SEL_AND (0x40) |
#define | GRN_TIMEVAL_STR_SIZE 0x100 |
#define | GRN_TIMEVAL_STR_FORMAT "%04d-%02d-%02d %02d:%02d:%02d.%06d" |
#define | GRN_TIME_NSEC_PER_SEC 1000000000 |
#define | GRN_TIME_NSEC_PER_SEC_F 1000000000.0 |
#define | GRN_TIME_NSEC_PER_USEC (GRN_TIME_NSEC_PER_SEC / GRN_TIME_USEC_PER_SEC) |
#define | GRN_TIME_NSEC_TO_USEC(nsec) ((nsec) / GRN_TIME_NSEC_PER_USEC) |
#define | GRN_TIME_USEC_TO_NSEC(usec) ((usec) * GRN_TIME_NSEC_PER_USEC) |
#define | GRN_OBJ_ALLOCATED (0x01<<2) /* allocated by ctx */ |
#define | GRN_OBJ_EXPRVALUE (0x01<<3) /* value allocated by grn_expr */ |
#define | GRN_OBJ_EXPRCONST (0x01<<4) /* constant allocated by grn_expr */ |
#define | GRN_DB_OBJ_SET_TYPE(db_obj, obj_type) |
Functions |
GRN_API void | grn_ctx_impl_err (grn_ctx *ctx) |
GRN_API grn_bool | grn_ctx_impl_should_log (grn_ctx *ctx) |
GRN_API void | grn_ctx_impl_set_current_error_message (grn_ctx *ctx) |
void * | grn_ctx_alloc (grn_ctx *ctx, size_t size, int flags, const char *file, int line, const char *func) |
void * | grn_ctx_malloc (grn_ctx *ctx, size_t size, const char *file, int line, const char *func) |
void * | grn_ctx_calloc (grn_ctx *ctx, size_t size, const char *file, int line, const char *func) |
void * | grn_ctx_realloc (grn_ctx *ctx, void *ptr, size_t size, const char *file, int line, const char *func) |
char * | grn_ctx_strdup (grn_ctx *ctx, const char *s, const char *file, int line, const char *func) |
void | grn_ctx_free (grn_ctx *ctx, void *ptr, const char *file, int line, const char *func) |
void * | grn_ctx_alloc_lifo (grn_ctx *ctx, size_t size, const char *file, int line, const char *func) |
void | grn_ctx_free_lifo (grn_ctx *ctx, void *ptr, const char *file, int line, const char *func) |
GRN_API void * | grn_malloc_default (grn_ctx *ctx, size_t size, const char *file, int line, const char *func) |
void * | grn_calloc_default (grn_ctx *ctx, size_t size, const char *file, int line, const char *func) |
void * | grn_realloc_default (grn_ctx *ctx, void *ptr, size_t size, const char *file, int line, const char *func) |
GRN_API char * | grn_strdup_default (grn_ctx *ctx, const char *s, const char *file, int line, const char *func) |
GRN_API void | grn_free_default (grn_ctx *ctx, void *ptr, const char *file, int line, const char *func) |
void | grn_assert (grn_ctx *ctx, int cond, const char *file, int line, const char *func) |
GRN_API grn_rc | grn_timeval_now (grn_ctx *ctx, grn_timeval *tv) |
GRN_API grn_rc | grn_timeval2str (grn_ctx *ctx, grn_timeval *tv, char *buf) |
grn_rc | grn_str2timeval (const char *str, uint32_t str_len, grn_timeval *tv) |
GRN_API void | grn_ctx_log (grn_ctx *ctx, const char *fmt,...) GRN_ATTRIBUTE_PRINTF(2) |
void | grn_ctx_qe_fin (grn_ctx *ctx) |
void | grn_ctx_loader_clear (grn_ctx *ctx) |
void | grn_log_reopen (grn_ctx *ctx) |
GRN_API grn_rc | grn_ctx_sendv (grn_ctx *ctx, int argc, char **argv, int flags) |
GRN_API void | grn_ctx_set_next_expr (grn_ctx *ctx, grn_obj *expr) |
int | grn_alloc_count (void) |
grn_content_type | grn_get_ctype (grn_obj *var) |
void | grn_cache_init (void) |
grn_obj * | grn_cache_fetch (grn_ctx *ctx, grn_cache *cache, const char *str, uint32_t str_size) |
void | grn_cache_unref (grn_ctx *ctx, grn_cache *cache, const char *str, uint32_t str_size) |
void | grn_cache_update (grn_ctx *ctx, grn_cache *cache, const char *str, uint32_t str_size, grn_obj *value) |
void | grn_cache_expire (grn_cache *cache, int32_t size) |
void | grn_cache_fin (void) |
void | grn_cache_get_statistics (grn_ctx *ctx, grn_cache *cache, grn_cache_statistics *statistics) |
void | grn_ctx_concat_func (grn_ctx *ctx, int flags, void *dummy) |
GRN_API void | grn_ctx_stream_out_func (grn_ctx *c, int flags, void *stream) |
grn_rc | grn_db_init_builtin_procs (grn_ctx *ctx) |