7 #if defined(HAVE_LIBTASN1_H)
15 #define _RPMASN_INTERNAL
30 #if defined(WITH_LIBTASN1)
31 asn1_delete_structure(&asn->tree);
32 asn->tree = ASN1_TYPE_EMPTY;
35 asn->fn =
_free(asn->fn);
48 if (_rpmasnPool == NULL) {
63 #if defined(WITH_LIBTASN1)
64 asn->tree = ASN1_TYPE_EMPTY;
65 int xx = asn1_parser2tree(fn, &asn->tree, asn->error);
74 const char * rpmasnFile(
rpmasn asn,
const char *fn)
76 const char * t = NULL;
79 fprintf(stderr,
"--> rpmasnFile(%p, %s)\n", asn, (fn ? fn :
"(nil)"));
81 #if defined(WITH_LIBTASN1)
84 if (t == NULL) t =
"";
88 fprintf(stderr,
"<-- rpmasnFile(%p, %s) %s\n", asn, (fn ? fn :
"(nil)"), t);
92 const char * rpmasnBuffer(
rpmasn asn,
const char *
b,
size_t nb)
94 const char * t = NULL;
97 fprintf(stderr,
"--> rpmasnBuffer(%p, %p[%d])\n", asn, b, (
int)nb);
98 if (nb == 0) nb = strlen(b);
100 #if defined(WITH_LIBTASN1)
103 if (t == NULL) t =
"";
107 fprintf(stderr,
"<-- rpmasnBuffer(%p, %p[%d]) %s\n", asn, b, (
int)nb, t);
char * xstrdup(const char *str)
Yet Another syslog(3) API clone.
static void rpmasnFini(void *_asn)
rpmioItem rpmioGetPool(rpmioPool pool, size_t size)
Get unused item from pool, or alloc a new item.
const char const bson int mongo_write_concern int flags
rpmioPool rpmioNewPool(const char *name, size_t size, int limit, int flags, char *(*dbg)(void *item), void(*init)(void *item), void(*fini)(void *item))
Create a memory pool.
static void * _free(const void *p)
Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
rpmasn rpmasnNew(const char *fn, int flags)
Create and load a ASN.1 wrapper.
static rpmasn rpmasnGetPool(rpmioPool pool)
rpmasn rpmasnLink(rpmasn asn)
Reference a ASN.1 wrapper instance.