| 1 | /* |
| 2 | Copyright(C) 2009-2016 Brazil |
| 3 | Copyright(C) 2019 Kouhei Sutou <[email protected]> |
| 4 | |
| 5 | This library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either |
| 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | |
| 10 | This library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | Lesser General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with this library; if not, write to the Free Software |
| 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #pragma once |
| 21 | |
| 22 | #include "grn.h"cxx . . $ `<file>/lib/grn.h`/ |
| 23 | |
| 24 | #ifdef __cplusplus |
| 25 | extern "C" { |
| 26 | #endif |
| 27 | |
| 28 | uint32_tcxx . . $ uint32_t# grn_alloc_countcxx . . $ grn_alloc_count(db52760e79bf9054).(void); |
| 29 | |
| 30 | void grn_alloc_init_from_envcxx . . $ grn_alloc_init_from_env(49f6e7a06ebc5aa8).(void); |
| 31 | |
| 32 | void grn_alloc_init_ctx_implcxx . . $ grn_alloc_init_ctx_impl(b578cd6e53d5fe91).(grn_ctxcxx . . $ grn_ctx# *ctx); |
| 33 | void grn_alloc_fin_ctx_implcxx . . $ grn_alloc_fin_ctx_impl(b578cd6e53d5fe91).(grn_ctxcxx . . $ grn_ctx# *ctx); |
| 34 | |
| 35 | void grn_alloc_info_initcxx . . $ grn_alloc_info_init(49f6e7a06ebc5aa8).(void); |
| 36 | void grn_alloc_info_fincxx . . $ grn_alloc_info_fin(49f6e7a06ebc5aa8).(void); |
| 37 | |
| 38 | void grn_alloc_info_dumpcxx . . $ grn_alloc_info_dump(b578cd6e53d5fe91).(grn_ctxcxx . . $ grn_ctx# *ctx); |
| 39 | void grn_alloc_info_freecxx . . $ grn_alloc_info_free(b578cd6e53d5fe91).(grn_ctxcxx . . $ grn_ctx# *ctx); |
| 40 | |
| 41 | #define GRN_MALLOCcxx . . $ `lib/grn_alloc.h:41:9`!(s) grn_malloc(ctx,s,__FILE__,__LINE__,__FUNCTION__) |
| 42 | #define GRN_CALLOCcxx . . $ `lib/grn_alloc.h:42:9`!(s) grn_calloc(ctx,s,__FILE__,__LINE__,__FUNCTION__) |
| 43 | #define GRN_REALLOCcxx . . $ `lib/grn_alloc.h:43:9`!(p,s) grn_realloc(ctx,p,s,__FILE__,__LINE__,__FUNCTION__) |
| 44 | #define GRN_STRDUPcxx . . $ `lib/grn_alloc.h:44:9`!(s) grn_strdup(ctx,s,__FILE__,__LINE__,__FUNCTION__) |
| 45 | #define GRN_GMALLOCcxx . . $ `lib/grn_alloc.h:45:9`!(s) grn_malloc(&grn_gctx,s,__FILE__,__LINE__,__FUNCTION__) |
| 46 | #define GRN_GCALLOCcxx . . $ `lib/grn_alloc.h:46:9`!(s) grn_calloc(&grn_gctx,s,__FILE__,__LINE__,__FUNCTION__) |
| 47 | #define GRN_GREALLOCcxx . . $ `lib/grn_alloc.h:47:9`!(p,s) grn_realloc(&grn_gctx,p,s,__FILE__,__LINE__,__FUNCTION__) |
| 48 | #define GRN_GSTRDUPcxx . . $ `lib/grn_alloc.h:48:9`!(s) grn_strdup(&grn_gctx,s,__FILE__,__LINE__,__FUNCTION__) |
| 49 | #define GRN_FREEcxx . . $ `lib/grn_alloc.h:49:9`!(p) grn_free(ctx,p,__FILE__,__LINE__,__FUNCTION__) |
| 50 | #define GRN_MALLOCNcxx . . $ `lib/grn_alloc.h:50:9`!(t,n) ((t *)(GRN_MALLOC(sizeof(t) * (n)))) |
| 51 | #define GRN_GFREEcxx . . $ `lib/grn_alloc.h:51:9`!(p) grn_free(&grn_gctx,p,__FILE__,__LINE__,__FUNCTION__) |
| 52 | #define GRN_GMALLOCNcxx . . $ `lib/grn_alloc.h:52:9`!(t,n) ((t *)(GRN_GMALLOC(sizeof(t) * (n)))) |
| 53 | |
| 54 | #define GRN_CTX_ALLOCcxx . . $ `lib/grn_alloc.h:54:9`!(ctx,s) grn_ctx_calloc(ctx,s,__FILE__,__LINE__,__FUNCTION__) |
| 55 | #define GRN_CTX_FREEcxx . . $ `lib/grn_alloc.h:55:9`!(ctx,p) grn_ctx_free(ctx,p,__FILE__,__LINE__,__FUNCTION__) |
| 56 | #define GRN_CTX_ALLOC_Lcxx . . $ `lib/grn_alloc.h:56:9`!(ctx,s) grn_ctx_alloc_lifo(ctx,s,f,__FILE__,__LINE__,__FUNCTION__) |
| 57 | #define GRN_CTX_FREE_Lcxx . . $ `lib/grn_alloc.h:57:9`!(ctx,p) grn_ctx_free_lifo(ctx,p,__FILE__,__LINE__,__FUNCTION__) |
| 58 | |
| 59 | void *grn_ctx_malloccxx . . $ grn_ctx_malloc(464175534efa3de7).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 60 | size_t size, |
| 61 | const char *file, |
| 62 | int line, |
| 63 | const char *func) GRN_ATTRIBUTE_ALLOC_SIZEcxx . . $ `include/groonga/groonga.h:2439:11`!(2); |
| 64 | void *grn_ctx_calloccxx . . $ grn_ctx_calloc(464175534efa3de7).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 65 | size_t size, |
| 66 | const char *file, |
| 67 | int line, |
| 68 | const char *func) GRN_ATTRIBUTE_ALLOC_SIZEcxx . . $ `include/groonga/groonga.h:2439:11`!(2); |
| 69 | void *grn_ctx_realloccxx . . $ grn_ctx_realloc(81c005e7023c2b15).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 70 | void *ptr, |
| 71 | size_t size, |
| 72 | const char *file, |
| 73 | int line, |
| 74 | const char *func) GRN_ATTRIBUTE_ALLOC_SIZEcxx . . $ `include/groonga/groonga.h:2439:11`!(3); |
| 75 | char *grn_ctx_strdupcxx . . $ grn_ctx_strdup(2ef96f5eb2f74054).(grn_ctxcxx . . $ grn_ctx# *ctx, const char *s, |
| 76 | const char* file, int line, const char *func); |
| 77 | void grn_ctx_freecxx . . $ grn_ctx_free(7cadacd43fda8113).(grn_ctxcxx . . $ grn_ctx# *ctx, void *ptr, |
| 78 | const char* file, int line, const char *func); |
| 79 | void *grn_ctx_alloc_lifocxx . . $ grn_ctx_alloc_lifo(464175534efa3de7).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 80 | size_t size, |
| 81 | const char *file, |
| 82 | int line, |
| 83 | const char *func) GRN_ATTRIBUTE_ALLOC_SIZEcxx . . $ `include/groonga/groonga.h:2439:11`!(2); |
| 84 | void grn_ctx_free_lifocxx . . $ grn_ctx_free_lifo(7cadacd43fda8113).(grn_ctxcxx . . $ grn_ctx# *ctx, void *ptr, |
| 85 | const char* file, int line, const char *func); |
| 86 | |
| 87 | GRN_APIcxx . . $ `lib/grn.h:84:13`! void *grn_malloccxx . . $ grn_malloc(464175534efa3de7).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 88 | size_t size, |
| 89 | const char *file, |
| 90 | int line, |
| 91 | const char *func) GRN_ATTRIBUTE_ALLOC_SIZEcxx . . $ `include/groonga/groonga.h:2439:11`!(2); |
| 92 | GRN_APIcxx . . $ `lib/grn.h:84:13`! void *grn_calloccxx . . $ grn_calloc(464175534efa3de7).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 93 | size_t size, |
| 94 | const char *file, |
| 95 | int line, |
| 96 | const char *func) GRN_ATTRIBUTE_ALLOC_SIZEcxx . . $ `include/groonga/groonga.h:2439:11`!(2); |
| 97 | GRN_APIcxx . . $ `lib/grn.h:84:13`! void *grn_realloccxx . . $ grn_realloc(81c005e7023c2b15).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 98 | void *ptr, |
| 99 | size_t size, |
| 100 | const char *file, |
| 101 | int line, |
| 102 | const char *func) GRN_ATTRIBUTE_ALLOC_SIZEcxx . . $ `include/groonga/groonga.h:2439:11`!(3); |
| 103 | GRN_APIcxx . . $ `lib/grn.h:84:13`! char *grn_strdupcxx . . $ grn_strdup(2ef96f5eb2f74054).(grn_ctxcxx . . $ grn_ctx# *ctx, const char *s, const char* file, int line, const char *func); |
| 104 | GRN_APIcxx . . $ `lib/grn.h:84:13`! void grn_freecxx . . $ grn_free(7cadacd43fda8113).(grn_ctxcxx . . $ grn_ctx# *ctx, void *ptr, const char *file, int line, const char *func); |
| 105 | |
| 106 | GRN_APIcxx . . $ `lib/grn.h:84:13`! void *grn_malloc_defaultcxx . . $ grn_malloc_default(464175534efa3de7).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 107 | size_t size, |
| 108 | const char *file, |
| 109 | int line, |
| 110 | const char *func) GRN_ATTRIBUTE_ALLOC_SIZEcxx . . $ `include/groonga/groonga.h:2439:11`!(2); |
| 111 | void *grn_calloc_defaultcxx . . $ grn_calloc_default(464175534efa3de7).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 112 | size_t size, |
| 113 | const char *file, |
| 114 | int line, |
| 115 | const char *func) GRN_ATTRIBUTE_ALLOC_SIZEcxx . . $ `include/groonga/groonga.h:2439:11`!(2); |
| 116 | void *grn_realloc_defaultcxx . . $ grn_realloc_default(81c005e7023c2b15).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 117 | void *ptr, |
| 118 | size_t size, |
| 119 | const char *file, |
| 120 | int line, |
| 121 | const char *func) GRN_ATTRIBUTE_ALLOC_SIZEcxx . . $ `include/groonga/groonga.h:2439:11`!(3); |
| 122 | GRN_APIcxx . . $ `lib/grn.h:84:13`! char *grn_strdup_defaultcxx . . $ grn_strdup_default(2ef96f5eb2f74054).(grn_ctxcxx . . $ grn_ctx# *ctx, const char *s, const char* file, int line, const char *func); |
| 123 | GRN_APIcxx . . $ `lib/grn.h:84:13`! void grn_free_defaultcxx . . $ grn_free_default(7cadacd43fda8113).(grn_ctxcxx . . $ grn_ctx# *ctx, void *ptr, const char* file, int line, const char *func); |
| 124 | |
| 125 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! grn_fail_malloc_should_failcxx . . $ grn_fail_malloc_should_fail(8ab3715db869f8d3).(size_t size, |
| 126 | const char *file, |
| 127 | int line, |
| 128 | const char *func); |
| 129 | void *grn_malloc_failcxx . . $ grn_malloc_fail(464175534efa3de7).(grn_ctxcxx . . $ grn_ctx# *ctx, size_t size, const char* file, int line, const char *func); |
| 130 | void *grn_calloc_failcxx . . $ grn_calloc_fail(464175534efa3de7).(grn_ctxcxx . . $ grn_ctx# *ctx, size_t size, const char* file, int line, const char *func); |
| 131 | void *grn_realloc_failcxx . . $ grn_realloc_fail(81c005e7023c2b15).(grn_ctxcxx . . $ grn_ctx# *ctx, void *ptr, size_t size, const char* file, int line, const char *func); |
| 132 | char *grn_strdup_failcxx . . $ grn_strdup_fail(2ef96f5eb2f74054).(grn_ctxcxx . . $ grn_ctx# *ctx, const char *s, const char* file, int line, const char *func); |
| 133 | |
| 134 | #ifdef __cplusplus |
| 135 | } |
| 136 | #endif |