projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add type-checked versions of allocation and deallocations functions
[lttng-tools.git]
/
src
/
common
/
filter
/
filter-parser.ypp
diff --git
a/src/common/filter/filter-parser.ypp
b/src/common/filter/filter-parser.ypp
index d654ecc84ab7ac539925d4973d50027172d1ece8..0f11c234d6197f30ab3b9cea48ea749bf6697fbe 100644
(file)
--- a/
src/common/filter/filter-parser.ypp
+++ b/
src/common/filter/filter-parser.ypp
@@
-16,13
+16,13
@@
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
-#include "common/bytecode/bytecode.h"
-#include "filter-ast.h"
+#include "common/bytecode/bytecode.h
pp
"
+#include "filter-ast.h
pp
"
#include "filter-parser.hpp"
#include "filter-parser.hpp"
-#include "memstream.h"
+#include "memstream.h
pp
"
-#include <common/compat/errno.h>
-#include <common/macros.h>
+#include <common/compat/errno.h
pp
>
+#include <common/macros.h
pp
>
#define WIDTH_u64_SCANF_IS_A_BROKEN_API "20"
#define WIDTH_o64_SCANF_IS_A_BROKEN_API "22"
#define WIDTH_u64_SCANF_IS_A_BROKEN_API "20"
#define WIDTH_o64_SCANF_IS_A_BROKEN_API "22"
@@
-97,7
+97,7
@@
static struct gc_string *gc_string_alloc(struct filter_parser_ctx *parser_ctx,
for (alloclen = 8; alloclen < sizeof(long) + sizeof(*gstr) + len;
alloclen *= 2);
for (alloclen = 8; alloclen < sizeof(long) + sizeof(*gstr) + len;
alloclen *= 2);
- gstr =
(gc_string *) zmalloc
(alloclen);
+ gstr =
zmalloc<gc_string>
(alloclen);
if (!gstr) {
goto end;
}
if (!gstr) {
goto end;
}
@@
-154,7
+154,7
@@
static struct filter_node *make_node(struct filter_parser_ctx *scanner,
struct filter_ast *ast = filter_parser_get_ast(scanner);
struct filter_node *node;
struct filter_ast *ast = filter_parser_get_ast(scanner);
struct filter_node *node;
- node =
(filter_node *) zmalloc(sizeof(*node)
);
+ node =
zmalloc<filter_node>(
);
if (!node)
return NULL;
memset(node, 0, sizeof(*node));
if (!node)
return NULL;
memset(node, 0, sizeof(*node));
@@
-191,7
+191,7
@@
static struct filter_node *make_op_node(struct filter_parser_ctx *scanner,
struct filter_ast *ast = filter_parser_get_ast(scanner);
struct filter_node *node;
struct filter_ast *ast = filter_parser_get_ast(scanner);
struct filter_node *node;
- node =
(filter_node *) zmalloc(sizeof(*node)
);
+ node =
zmalloc<filter_node>(
);
if (!node)
return NULL;
memset(node, 0, sizeof(*node));
if (!node)
return NULL;
memset(node, 0, sizeof(*node));
@@
-227,7
+227,7
@@
static struct filter_ast *filter_ast_alloc(void)
{
struct filter_ast *ast;
{
struct filter_ast *ast;
- ast =
(filter_ast *) zmalloc(sizeof(*ast)
);
+ ast =
zmalloc<filter_ast>(
);
if (!ast)
return NULL;
memset(ast, 0, sizeof(*ast));
if (!ast)
return NULL;
memset(ast, 0, sizeof(*ast));
@@
-257,7
+257,7
@@
struct filter_parser_ctx *filter_parser_ctx_alloc(FILE *input)
yydebug = filter_parser_debug;
yydebug = filter_parser_debug;
- parser_ctx =
(filter_parser_ctx *) zmalloc(sizeof(*parser_ctx)
);
+ parser_ctx =
zmalloc<filter_parser_ctx>(
);
if (!parser_ctx)
return NULL;
memset(parser_ctx, 0, sizeof(*parser_ctx));
if (!parser_ctx)
return NULL;
memset(parser_ctx, 0, sizeof(*parser_ctx));
@@
-428,7
+428,7
@@
error:
%code provides
{
%code provides
{
-#include "common/macros.h"
+#include "common/macros.h
pp
"
void setstring(struct filter_parser_ctx *parser_ctx, YYSTYPE *lvalp, const char *src);
}
void setstring(struct filter_parser_ctx *parser_ctx, YYSTYPE *lvalp, const char *src);
}
This page took
0.024515 seconds
and
4
git commands to generate.