Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/girepository/gtypelib.c
diff options
context:
space:
mode:
authorJohan Bilien <jobi@litl.com>2008-10-11 23:19:59 (GMT)
committer Lucas Almeida Rocha <lucasr@src.gnome.org>2008-10-11 23:19:59 (GMT)
commite36cf2f246a5e65c8fa9ed8b3b18d73c1b9ce470 (patch)
tree17ddfc31a142d124e853e8d398c76fba2bb90f4d /girepository/gtypelib.c
parent8d37e2cb7be78a40ca3649a48f405db29d2cabcc (diff)
ignore non-UTF-8 string constants
2008-10-11 Johan Bilien <jobi@litl.com> * giscanner/scannerparser.y: ignore non-UTF-8 string constants 2008-10-11 Johan Bilien <jobi@litl.com> Bug 552347: Parse #defines constants * girepository/gtypelib.c: update the list of value_size with recently defined type tags * giscanner/scannerparser.y: brought back parsing of #defined, as present in older version * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename * giscanner/girwriter.py: write out constant tags in the gir * giscanner/sourcescanner.py: add accessor for const_string * giscanner/transformer.py, giscanner/glibtransformer.py: handle constant svn path=/trunk/; revision=673
Diffstat (limited to 'girepository/gtypelib.c')
-rw-r--r--girepository/gtypelib.c36
1 files changed, 29 insertions, 7 deletions
diff --git a/girepository/gtypelib.c b/girepository/gtypelib.c
index df99eb4..e3f52aa 100644
--- a/girepository/gtypelib.c
+++ b/girepository/gtypelib.c
@@ -878,13 +878,35 @@ validate_constant_blob (GTypelib *typelib,
GError **error)
{
gint value_size[] = {
- 0, 4, 1, 1, 2, 2, 4, 4, 8, 8,
- sizeof (gint), sizeof (guint),
- sizeof (glong), sizeof (gulong),
- sizeof (gssize), sizeof (gsize),
- sizeof (gfloat), sizeof (gdouble),
- 0, 0
- };
+ 0, /* VOID */
+ 4, /* BOOLEAN */
+ 1, /* INT8 */
+ 1, /* UINT8 */
+ 2, /* INT16 */
+ 2, /* UINT16 */
+ 4, /* INT32 */
+ 4, /* UINT32 */
+ 8, /* INT64 */
+ 8, /* UINT64 */
+ sizeof (gint),
+ sizeof (guint),
+ sizeof (glong),
+ sizeof (gulong),
+ sizeof (gssize),
+ sizeof (gsize),
+ sizeof (gfloat),
+ sizeof (gdouble),
+ sizeof (time_t),
+ 0, /* GTYPE */
+ 0, /* UTF8 */
+ 0, /* FILENAME */
+ 0, /* ARRAY */
+ 0, /* INTERFACE */
+ 0, /* GLIST */
+ 0, /* GSLIST */
+ 0, /* GHASH */
+ 0, /* ERROR */
+ };
ConstantBlob *blob;
SimpleTypeBlob *type;