~ubuntu-branches/ubuntu/utopic/sip4-qt3/utopic

« back to all changes in this revision

Viewing changes to sipgen/export.c

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-07-21 10:18:00 UTC
  • mfrom: (1.3.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100721101800-9lk0k2t6hx6pq0dh
Tags: 4.10.5-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
239
239
    prScopedPythonName(fp, scope, od->common->pyname->text);
240
240
    fprintf(fp, "?%d", METHOD_ID);
241
241
 
242
 
    need_sec = prPythonSignature(pt, fp, &od->pysig, sec, TRUE, TRUE, FALSE);
 
242
    need_sec = prPythonSignature(pt, fp, &od->pysig, sec, TRUE, TRUE, FALSE,
 
243
            FALSE);
243
244
 
244
245
    fprintf(fp, "\n");
245
246
 
1074
1075
 * Generate a Python signature.
1075
1076
 */
1076
1077
int prPythonSignature(sipSpec *pt, FILE *fp, signatureDef *sd, int sec,
1077
 
        int names, int defaults, int in_str)
 
1078
        int names, int defaults, int in_str, int is_signal)
1078
1079
{
1079
1080
    int need_sec = FALSE, need_comma = FALSE, is_res, nr_out, a;
1080
1081
 
1081
 
    fprintf(fp, "(");
 
1082
    fprintf(fp, "%c", (is_signal ? '[' : '('));
1082
1083
 
1083
1084
    nr_out = 0;
1084
1085
 
1099
1100
            need_sec = TRUE;
1100
1101
    }
1101
1102
 
1102
 
    fprintf(fp, ")");
 
1103
    fprintf(fp, "%c", (is_signal ? ']' : ')'));
1103
1104
 
1104
1105
    is_res = !((sd->result.atype == void_type && sd->result.nrderefs == 0) ||
1105
1106
            (sd->result.doctype != NULL && sd->result.doctype[0] == '\0'));