generator: Introduce error code (errcode) concept.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 7 Mar 2011 19:28:30 +0000 (19:28 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Mon, 7 Mar 2011 19:28:30 +0000 (19:28 +0000)
commit8037da06feea097716ce700f38c0eac0d5411a7c
tree482fa34741bcdf650948eebb99903943137f4e19
parent7c721e4fd674c409b3eee60fe237d480afa1c5e2
generator: Introduce error code (errcode) concept.

There was a lot of repeated code to map return types (eg. RErr)
to error cases (eg. -1 or NULL).

This commit introduces an error code type and two functions to
map return types to error codes and error codes to strings.
generator/generator_c.ml
generator/generator_capitests.ml
generator/generator_daemon.ml
generator/generator_java.ml
generator/generator_ocaml.ml
generator/generator_php.ml
generator/generator_python.ml
generator/generator_ruby.ml
generator/generator_types.ml
generator/generator_utils.ml
generator/generator_utils.mli