projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't optimistically split these strange msut_be_different copies
[libfirm]
/
ir
/
libcore
/
lc_opts.c
diff --git
a/ir/libcore/lc_opts.c
b/ir/libcore/lc_opts.c
index
4d6b205
..
85b7dcc
100644
(file)
--- a/
ir/libcore/lc_opts.c
+++ b/
ir/libcore/lc_opts.c
@@
-52,6
+52,7
@@
#include "lc_parser_t.h"
#include "hashptr.h"
#include "lc_printf.h"
#include "lc_parser_t.h"
#include "hashptr.h"
#include "lc_printf.h"
+#include "xmalloc.h"
#define ERR_STRING "In argument \"%s\": "
#define ERR_STRING "In argument \"%s\": "
@@
-221,7
+222,7
@@
lc_opt_entry_t *lc_opt_get_grp(lc_opt_entry_t *parent, const char *name)
lc_opt_entry_t *ent = lc_opt_find_grp(parent, name, NULL);
if(!ent) {
lc_opt_entry_t *ent = lc_opt_find_grp(parent, name, NULL);
if(!ent) {
- ent =
obstack_alloc(&obst, sizeof(*ent)
);
+ ent =
OALLOC(&obst, lc_opt_entry_t
);
init_entry(ent, parent, name, "");
init_grp(ent, NULL);
}
init_entry(ent, parent, name, "");
init_grp(ent, NULL);
}
@@
-242,7
+243,7
@@
lc_opt_entry_t *lc_opt_add_opt(lc_opt_entry_t *parent,
lc_opt_entry_t *ent = lc_opt_find_opt(parent, name, NULL);
if(!ent) {
lc_opt_entry_t *ent = lc_opt_find_opt(parent, name, NULL);
if(!ent) {
- res =
obstack_alloc(&obst, sizeof(*ent)
);
+ res =
OALLOC(&obst, lc_opt_entry_t
);
init_entry(res, parent, name, desc);
init_opt(res, type, value, length, cb, dump, dump_vals, err);
} else
init_entry(res, parent, name, desc);
init_opt(res, type, value, length, cb, dump, dump_vals, err);
} else