~ubuntu-branches/ubuntu/hardy/vala/hardy

« back to all changes in this revision

Viewing changes to gobject-introspection/gidlnode.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge, Marc-Andre Lureau, Kumar Appaiah, Sebastian Dröge
  • Date: 2007-11-26 08:16:57 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20071126081657-pbycv1holrkgalk3
Tags: 0.1.5-1
[ Marc-Andre Lureau ]
* New Upstream Version; closes: #452870.
* debian/libvala-dev.install
  + Rename gidlgen to vala-gen-instrospect
  + Remove deleted .pl files

[ Kumar Appaiah ]
* debian/control:
  + Add Homepage field.
  + Modify XS-Vcs-Git and XS-Vcs-Broswer to Vcs-Git and Vcs-Browser
    respectively, as dpkg now supports them.

[ Sebastian Dröge ]
* debian/libvala-dev.install,
  debian/rules:
  + Also ship vala-gen-project.
* debian/control:
  + Build depend on libgtk2.0-dev (>= 2.10.0) and libglib2.0-dev (>= 2.12.0).
* debian/patches/01_vala-gen-project-paths.patch,
  debian/rules:
  + Adjust the paths in vala-gen-project for the license files, etc.
    Needs again an automake-touch hack for timestamp issues.
* debian/control,
  debian/libvala-dev.install,
  debian/valac.install,
  debian/vala-utils.install:
  + Move vala-gen-introspect/vapigen to valac and vala-gen-project/vapicheck
    to vala-utils.
* debian/patches/01_vala-gen-project-paths.patch,
  debian/control:
  + Fix paths for COPYING and INSTALL files and depend on automake1.10 for
    this.

[ Kumar Appaiah ]
* debian/watch: Fix watch file to point to new download location.
  (Closes: #452870)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 */
20
20
 
21
21
#include <stdio.h>
 
22
#include <stdlib.h>
22
23
#include <string.h>
23
24
 
24
25
#include "gidlmodule.h"
46
47
void
47
48
dump_stats (void)
48
49
{
49
 
  g_message ("%d strings (%d before sharing), %d bytes (%d before sharing)",
 
50
  g_message ("%lu strings (%lu before sharing), %lu bytes (%lu before sharing)",
50
51
             unique_string_count, string_count, unique_string_size, string_size);
51
 
  g_message ("%d types (%d before sharing)", unique_types_count, types_count);
 
52
  g_message ("%lu types (%lu before sharing)", unique_types_count, types_count);
52
53
}
53
54
 
54
55
#define ALIGN_VALUE(this, boundary) \
63
64
  switch (type)
64
65
    {
65
66
   case G_IDL_NODE_FUNCTION:
 
67
   case G_IDL_NODE_CALLBACK:
66
68
      node = g_malloc0 (sizeof (GIdlNodeFunction));
67
69
      break;
68
70
 
251
253
 
252
254
    case G_IDL_NODE_VALUE:
253
255
      {
254
 
        GIdlNodeValue *value = (GIdlNodeValue *)node;
255
 
        
256
256
        g_free (node->name);
257
257
      }
258
258
      break;
479
479
      size = 0;
480
480
    }
481
481
 
482
 
  g_debug ("node %d type %d size %d", node, node->type, size);
 
482
  g_debug ("node %p type %d size %d", node, node->type, size);
483
483
 
484
484
  return size;
485
485
}
633
633
 
634
634
    case G_IDL_NODE_VALUE:
635
635
      {
636
 
        GIdlNodeValue *value = (GIdlNodeValue *)node;
637
 
        
638
636
        size = 12;
639
637
        size += ALIGN_VALUE (strlen (node->name) + 1, 4);
640
638
      }
761
759
      size = 0;
762
760
    }
763
761
 
764
 
  g_debug ("node %d type %d full size %d", node, node->type, size);
 
762
  g_debug ("node %p type %d full size %d", node, node->type, size);
765
763
 
766
764
  return size;
767
765
}
1129
1127
                  case TYPE_TAG_ERROR:
1130
1128
                    {
1131
1129
                      ErrorTypeBlob *blob = (ErrorTypeBlob *)&data[*offset2];
1132
 
                      gint i, domain;
 
1130
                      gint i;
1133
1131
                      
1134
1132
                      blob->pointer = 1;
1135
1133
                      blob->reserved = 0;
1201
1199
        FunctionBlob *blob = (FunctionBlob *)&data[*offset];
1202
1200
        SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
1203
1201
        GIdlNodeFunction *function = (GIdlNodeFunction *)node;
1204
 
        guint32 signature, res;
 
1202
        guint32 signature;
1205
1203
        gint n;
1206
1204
 
1207
1205
        signature = *offset2;
1250
1248
        CallbackBlob *blob = (CallbackBlob *)&data[*offset];
1251
1249
        SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
1252
1250
        GIdlNodeFunction *function = (GIdlNodeFunction *)node;
1253
 
        guint32 signature, res;
 
1251
        guint32 signature;
1254
1252
        gint n;
1255
1253
 
1256
1254
        signature = *offset2;
1293
1291
        SignalBlob *blob = (SignalBlob *)&data[*offset];
1294
1292
        SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
1295
1293
        GIdlNodeSignal *signal = (GIdlNodeSignal *)node;
1296
 
        guint32 signature, res;
 
1294
        guint32 signature;
1297
1295
        gint n;
1298
1296
 
1299
1297
        signature = *offset2;
1344
1342
        VFuncBlob *blob = (VFuncBlob *)&data[*offset];
1345
1343
        SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
1346
1344
        GIdlNodeVFunc *vfunc = (GIdlNodeVFunc *)node;
1347
 
        guint32 signature, res;
 
1345
        guint32 signature;
1348
1346
        gint n;
1349
1347
 
1350
1348
        signature = *offset2;
1390
1388
      {
1391
1389
        ArgBlob *blob = (ArgBlob *)&data[*offset];
1392
1390
        GIdlNodeParam *param = (GIdlNodeParam *)node;
1393
 
        guint32 res;
1394
1391
 
1395
1392
        *offset += 8;
1396
1393
 
1414
1411
      {
1415
1412
        StructBlob *blob = (StructBlob *)&data[*offset];
1416
1413
        GIdlNodeStruct *struct_ = (GIdlNodeStruct *)node;
1417
 
        guint32 pos;
1418
1414
        
1419
1415
        blob->blob_type = BLOB_TYPE_STRUCT;
1420
1416
        blob->deprecated = struct_->deprecated;
1624
1620
      {
1625
1621
        ObjectBlob *blob = (ObjectBlob *)&data[*offset];
1626
1622
        GIdlNodeInterface *object = (GIdlNodeInterface *)node;
1627
 
        gint parent;
1628
1623
 
1629
1624
        blob->blob_type = BLOB_TYPE_OBJECT;
1630
1625
        blob->deprecated = object->deprecated;
1947
1942
                                   strings, types, data, &pos, offset2);
1948
1943
      }
1949
1944
      break;
 
1945
    default:
 
1946
      g_assert_not_reached ();
1950
1947
    }
1951
1948
  
1952
1949
  g_debug ("node %p type %d, offset %d -> %d, offset2 %d -> %d",