diff options
author | Marcin Dalecki <martin@dalecki.de> | 2006-01-31 20:56:55 +0100 |
---|---|---|
committer | Marcin Dalecki <dalecki@gcc.gnu.org> | 2006-01-31 20:56:55 +0100 |
commit | 5ed6ace578e0657c0481bacd16c97ceb3deda9a4 (patch) | |
tree | 1d4ee70ba0860ea79946b28d772ea552777594d6 /gcc/java/gjavah.c | |
parent | 8f13c4d68fa3f5328f93cde8274152f8da5bd341 (diff) | |
download | gcc-5ed6ace578e0657c0481bacd16c97ceb3deda9a4.zip gcc-5ed6ace578e0657c0481bacd16c97ceb3deda9a4.tar.gz gcc-5ed6ace578e0657c0481bacd16c97ceb3deda9a4.tar.bz2 |
tree-vrp.c: Use XNEW/XCNEW allocation wrappers.
2006-01-31 Marcin Dalecki <martin@dalecki.de>
* tree-vrp.c: Use XNEW/XCNEW allocation wrappers.
* regrename.c: Ditto.
* tree-ssa-loop-im.c: Ditto.
* tree-dump.c: Ditto.
* tree-complex.c: Ditto.
* genrecog.c: Ditto.
* tree-ssa-threadupdate.c: Ditto.
* tracer.c: Ditto.
* java/class.c: Ditto.
* java/jcf-parse.c: Ditto.
* java/resource.c: Ditto.
* java/except.c: Ditto.
* java/jvspec.c: Ditto.
* java/jcf-write.c: Ditto.
* java/jcf-path.c: Ditto.
* java/gjavah.c: Ditto.
* java/zextract.c: Ditto.
* java/jcf-io.c: Ditto.
* java/jcf.h: Ditto.
* java/buffer.c: Ditto.
* java/lang.c: Ditto.
* java/parse-scan.y: Ditto.
* java/lex.c: Ditto.
* java/lex.h: Ditto.
* cfgloopmanip.c: Ditto.
* postreload-gcse.c: Ditto.
* tree-ssa-loop-manip.c: Ditto.
* postreload.c: Ditto.
* tree-ssa-loop-ch.c: Ditto.
* loop.c: Ditto.
* ipa-cp.c: Ditto.
* cppspec.c: Ditto.
* diagnostic.c: Ditto.
* final.c: Ditto.
* genoutput.c: Ditto.
* gcc.c: Ditto.
* cfghooks.c: Ditto.
* cfgloopanal.c: Ditto.
* objc/objc-act.c: Ditto.
* gcov.c: Ditto.
* genextract.c: Ditto.
* genautomata.c: Ditto.
* pretty-print.c: Ditto.
* genemit.c: Ditto.
* cgraphunit.c: Ditto.
* flow.c: Ditto.
* df-scan.c: Ditto.
* haifa-sched.c: Ditto.
* dominance.c: Ditto.
* dbxout.c: Ditto.
* tree-ssa-loop-ivopts.c: Ditto.
* df-core.c: Ditto.
* mode-switching.c: Ditto.
* modulo-sched.c: Ditto.
* graph.c: Ditto.
* ipa-pure-const.c: Ditto.
* cse.c: Ditto.
* fix-header.c: Ditto.
* web.c: Ditto.
* tree-stdarg.c: Ditto.
* ipa-utils.c: Ditto.
* loop-init.c: Ditto.
* ipa-inline.c: Ditto.
* cfganal.c: Ditto.
* global.c: Ditto.
* alloc-pool.c: Ditto.
* dwarf2out.c: Ditto.
* opts.c: Ditto.
* genattrtab.c: Ditto.
* tree-ssa-loop-ivcanon.c: Ditto.
* predict.c: Ditto.
* timevar.c: Ditto.
* lcm.c: Ditto.
* fortran/gfortranspec.c: Ditto.
* regmove.c: Ditto.
* local-alloc.c: Ditto.
* langhooks.c: Ditto.
* function.c: Ditto.
* tree-vectorizer.c: Ditto.
* gcse.c: Ditto.
* ipa-type-escape.c: Ditto.
* alias.c: Ditto.
* tree-if-conv.c: Ditto.
* profile.c: Ditto.
* ipa.c: Ditto.
* tree-data-ref.c: Ditto.
* loop-unroll.c: Ditto.
* treelang/treetree.c: Ditto.
* calls.c: Ditto.
* bt-load.c: Ditto.
* ggc-common.c: Ditto.
* except.c: Ditto.
* coverage.c: Ditto.
* cselib.c: Ditto.
* tree-cfgcleanup.c: Ditto.
* tree-ssa-pre.c: Ditto.
* cfgcleanup.c: Ditto.
* loop-invariant.c: Ditto.
* loop-iv.c: Ditto.
* ipa-prop.c: Ditto.
* print-tree.c: Ditto.
* conflict.c: Ditto.
* ggc-page.c: Ditto.
* sched-deps.c: Ditto.
* regclass.c: Ditto.
* tree-object-size.c: Ditto.
* combine.c: Ditto.
* bb-reorder.c: Ditto.
* resource.c: Ditto.
* var-tracking.c: Ditto.
* cfgloop.c: Ditto.
* df-problems.c: Ditto.
* reg-stack.c: Ditto.
* tlink.c: Ditto.
* gccspec.c: Ditto.
* sched-rgn.c: Ditto.
* tree-ssa-structalias.c: Ditto.
* tree-ssa-reassoc.c: Ditto.
* config/darwin-c.c: Ditto.
* config/darwin.c: Ditto.
* config/arm/arm.c: Ditto.
* cfgrtl.c: Ditto.
* collect2.c: Ditto.
* reload1.c: Ditto.
From-SVN: r110446
Diffstat (limited to 'gcc/java/gjavah.c')
-rw-r--r-- | gcc/java/gjavah.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c index 35bcdea..8c9884b 100644 --- a/gcc/java/gjavah.c +++ b/gcc/java/gjavah.c @@ -600,7 +600,7 @@ cxx_keyword_subst (const unsigned char *str, int length) are `$'. */ if (i == length) { - char *dup = xmalloc (2 + length - min_length + kwl); + char *dup = XNEWVEC (char, 2 + length - min_length + kwl); strcpy (dup, cxx_keywords[mid]); for (i = kwl; i < length + 1; ++i) dup[i] = '$'; @@ -719,7 +719,7 @@ get_field_name (JCF *jcf, int name_index, JCF_u2 flags) return NULL; } - override = xmalloc (length + 3); + override = XNEWVEC (char, length + 3); memcpy (override, name, length); strcpy (override + length, "__"); } @@ -929,13 +929,13 @@ print_method_info (FILE *stream, JCF* jcf, int name_index, int sig_index, { struct method_name *nn; - nn = xmalloc (sizeof (struct method_name)); - nn->name = xmalloc (length); + nn = XNEW (struct method_name); + nn->name = XNEWVEC (unsigned char, length); memcpy (nn->name, str, length); nn->length = length; nn->next = method_name_list; nn->sig_length = JPOOL_UTF_LENGTH (jcf, sig_index); - nn->signature = xmalloc (nn->sig_length); + nn->signature = XNEWVEC (unsigned char, nn->sig_length); nn->is_native = METHOD_IS_NATIVE (flags); memcpy (nn->signature, JPOOL_UTF_DATA (jcf, sig_index), nn->sig_length); @@ -1240,7 +1240,7 @@ throwable_p (const unsigned char *clname) for (length = 0; clname[length] != ';' && clname[length] != '\0'; ++length) ; - current = ALLOC (length + 1); + current = XNEWVEC (unsigned char, length + 1); for (i = 0; i < length; ++i) current[i] = clname[i] == '/' ? '.' : clname[i]; current[length] = '\0'; @@ -1276,7 +1276,7 @@ throwable_p (const unsigned char *clname) jcf_parse_class (&jcf); tmp = (unsigned char *) super_class_name (&jcf, &super_length); - super = ALLOC (super_length + 1); + super = XNEWVEC (unsigned char, super_length + 1); memcpy (super, tmp, super_length); super[super_length] = '\0'; @@ -1836,8 +1836,8 @@ print_include (FILE *out, const unsigned char *utf8, int len) return; } - incl = xmalloc (sizeof (struct include)); - incl->name = xmalloc (len + 1); + incl = XNEW (struct include); + incl->name = XNEWVEC (char, len + 1); strncpy (incl->name, (const char *) utf8, len); incl->name[len] = '\0'; incl->next = all_includes; @@ -1922,8 +1922,8 @@ add_namelet (const unsigned char *name, const unsigned char *name_limit, if (n == NULL) { - n = xmalloc (sizeof (struct namelet)); - n->name = xmalloc (p - name + 1); + n = XNEW (struct namelet); + n->name = XNEWVEC (char, p - name + 1); strncpy (n->name, (const char *) name, p - name); n->name[p - name] = '\0'; n->is_class = (p == name_limit); @@ -2173,7 +2173,7 @@ process_file (JCF *jcf, FILE *out) if (len > 6 && ! strcmp (&jcf->classname[len - 6], ".class")) len -= 6; /* Turn the class name into a file name. */ - name = xmalloc (len + 1); + name = XNEWVEC (char, len + 1); for (i = 0; i < len; ++i) name[i] = jcf->classname[i] == '.' ? '/' : jcf->classname[i]; name[i] = '\0'; @@ -2484,25 +2484,25 @@ main (int argc, char** argv) case OPT_PREPEND: if (prepend_count == 0) - prepend_specs = ALLOC (argc * sizeof (char*)); + prepend_specs = XNEWVEC (char *, argc); prepend_specs[prepend_count++] = optarg; break; case OPT_FRIEND: if (friend_count == 0) - friend_specs = ALLOC (argc * sizeof (char*)); + friend_specs = XNEWVEC (char *, argc); friend_specs[friend_count++] = optarg; break; case OPT_ADD: if (add_count == 0) - add_specs = ALLOC (argc * sizeof (char*)); + add_specs = XNEWVEC (char *, argc); add_specs[add_count++] = optarg; break; case OPT_APPEND: if (append_count == 0) - append_specs = ALLOC (argc * sizeof (char*)); + append_specs = XNEWVEC (char *, argc); append_specs[append_count++] = optarg; break; @@ -2608,7 +2608,7 @@ main (int argc, char** argv) { int dir_len = strlen (output_directory); int i, classname_length = strlen (classname); - current_output_file = ALLOC (dir_len + classname_length + 5); + current_output_file = XNEWVEC (char, dir_len + classname_length + 5); strcpy (current_output_file, output_directory); if (dir_len > 0 && output_directory[dir_len-1] != '/') current_output_file[dir_len++] = '/'; |