--- export.c.orig	2008-11-17 14:41:06.000000000 +0100
+++ export.c	2008-12-27 12:24:12.000000000 +0100
@@ -22,6 +22,12 @@
 #define XML_VERSION_NR  0       /* The schema version number. */
 
 
+#define CLASS_ID    1
+#define METHOD_ID   4
+#define VARIABLE_ID 7
+#define ENUM_ID     10
+
+
 static void apiEnums(sipSpec *pt, moduleDef *mod, classDef *scope, FILE *fp);
 static void apiVars(sipSpec *pt, moduleDef *mod, classDef *scope, FILE *fp);
 static int apiCtor(moduleDef *mod, classDef *scope, ctorDef *ct, int sec,
@@ -127,7 +133,7 @@
     /* Do the callable type form. */
     fprintf(fp, "%s.", mod->name);
     prScopedPythonName(fp, scope->ecd, scope->pyname);
-    fprintf(fp, "(");
+    fprintf(fp, "?%d(", CLASS_ID);
 
     need_comma = FALSE;
 
@@ -146,7 +152,7 @@
     /* Do the call __init__ form. */
     fprintf(fp, "%s.", mod->name);
     prScopedPythonName(fp, scope->ecd, scope->pyname);
-    fprintf(fp, ".__init__(self");
+    fprintf(fp, ".__init__?%d(self",CLASS_ID);
 
     for (a = 0; a < ct->pysig.nrArgs; ++a)
         apiArgument(&ct->pysig.args[a], FALSE, TRUE, sec, fp);
@@ -178,14 +184,14 @@
         {
             fprintf(fp, "%s.", mod->name);
             prScopedPythonName(fp, ed->ecd, ed->pyname->text);
-            fprintf(fp, "\n");
+            fprintf(fp, "?%d\n", ENUM_ID);
         }
 
         for (emd = ed->members; emd != NULL; emd = emd->next)
         {
             fprintf(fp, "%s.", mod->name);
             prScopedPythonName(fp, ed->ecd, emd->pyname->text);
-            fprintf(fp, "\n");
+            fprintf(fp, "?%d\n", ENUM_ID);
         }
     }
 }
@@ -208,7 +214,7 @@
 
         fprintf(fp, "%s.", mod->name);
         prScopedPythonName(fp, vd->ecd, vd->pyname->text);
-        fprintf(fp, "\n");
+        fprintf(fp, "?%d\n", VARIABLE_ID);
     }
 }
 
@@ -223,7 +229,7 @@
 
     fprintf(fp, "%s.", mod->name);
     prScopedPythonName(fp, scope, od->common->pyname->text);
-    fprintf(fp, "(");
+    fprintf(fp, "?%d(", METHOD_ID);
 
     nr_out = 0;
 
