public
Description: SIP fork (C/C++ Python bindings generator) with automatic property generation
Homepage: http://www.riverbankcomputing.co.uk/sip/index.php
Clone URL: git://github.com/kevinwatters/sip.git
Merged changes from sip-4.7.5-snapshot-20080424.tar.gz
kevinw (author)
Thu Apr 24 23:36:47 -0700 2008
commit  df0bb76f59f467659d99d6aafa4186496bca8b86
tree    2a04715362795d599b86c9d2483ed316f93bb9ae
parent  a058e87d2d3e01ac0c5797ab542e5e24298895bb
...
1
 
2
3
4
5
 
6
7
8
9
10
11
 
12
13
 
14
15
 
16
17
18
 
19
20
21
 
22
23
 
24
25
26
27
 
28
29
30
31
32
 
 
33
34
35
...
41
42
43
44
 
45
...
 
1
2
3
4
 
5
6
7
8
9
10
 
11
12
 
13
14
 
15
16
17
 
18
19
20
 
21
22
 
23
24
25
26
 
27
28
29
30
 
 
31
32
33
34
35
...
41
42
43
 
44
45
0
@@ -1,35 +1,35 @@
0
-RIVERBANK COMPUTING LIMITED LICENSE AGREEMENT FOR SIP 4.7.4
0
+RIVERBANK COMPUTING LIMITED LICENSE AGREEMENT FOR SIP 4.7.5
0
 
0
 1. This LICENSE AGREEMENT is between Riverbank Computing Limited
0
 ("Riverbank"), and the Individual or Organization ("Licensee") accessing
0
-and otherwise using SIP 4.7.4 software in source or binary form and its
0
+and otherwise using SIP 4.7.5 software in source or binary form and its
0
 associated documentation.
0
 
0
 2. Subject to the terms and conditions of this License Agreement, Riverbank
0
 hereby grants Licensee a nonexclusive, royalty-free, world-wide license
0
 to reproduce, analyze, test, perform and/or display publicly, prepare
0
-derivative works, distribute, and otherwise use SIP 4.7.4 alone or in
0
+derivative works, distribute, and otherwise use SIP 4.7.5 alone or in
0
 any derivative version, provided, however, that Riverbank's License
0
-Agreement and Riverbank's notice of copyright, i.e., "Copyright (c) 2004
0
+Agreement and Riverbank's notice of copyright, e.g., "Copyright (c) 2008
0
 Riverbank Computing Limited; All Rights Reserved" are retained in
0
-SIP 4.7.4 alone or in any derivative version prepared by Licensee.
0
+SIP 4.7.5 alone or in any derivative version prepared by Licensee.
0
 
0
 3. In the event Licensee prepares a derivative work that is based on
0
-or incorporates SIP 4.7.4 or any part thereof, and wants to make
0
+or incorporates SIP 4.7.5 or any part thereof, and wants to make
0
 the derivative work available to others as provided herein, then
0
 Licensee hereby agrees to include in any such work a brief summary of
0
-the changes made to SIP 4.7.4.
0
+the changes made to SIP 4.7.5.
0
 
0
-4. Riverbank is making SIP 4.7.4 available to Licensee on an "AS IS"
0
+4. Riverbank is making SIP 4.7.5 available to Licensee on an "AS IS"
0
 basis. RIVERBANK MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
0
 IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, RIVERBANK MAKES NO AND
0
 DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
0
-FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF SIP 4.7.4 WILL NOT
0
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF SIP 4.7.5 WILL NOT
0
 INFRINGE ANY THIRD PARTY RIGHTS.
0
 
0
 5. RIVERBANK SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF
0
-SIP 4.7.4 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
0
-AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING SIP 4.7.4,
0
+SIP 4.7.5 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
0
+AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING SIP 4.7.5,
0
 OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
0
 
0
 6. This License Agreement will automatically terminate upon a material
0
@@ -41,5 +41,5 @@ and Licensee. This License Agreement does not grant permission to use
0
 Riverbank trademarks or trade name in a trademark sense to endorse or
0
 promote products or services of Licensee, or any third party.
0
 
0
-8. By copying, installing or otherwise using SIP 4.7.4, Licensee
0
+8. By copying, installing or otherwise using SIP 4.7.5, Licensee
0
 agrees to be bound by the terms and conditions of this License Agreement.
0
...
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
36
37
38
 
 
 
 
 
39
40
41
42
43
44
 
 
45
46
47
48
49
50
51
52
53
54
55
56
57
58
0
@@ -36,16 +36,23 @@ extend sipParseArgs() to take an options dictionary and list of keywords.
0
 
0
 25.  Add support for specifying docstrings for generated methods.
0
 
0
-26. Fully implement QObject.disconnect().
0
-
0
-27. Look at adding QObject.Q_OBJECT() that will create the moc generated
0
-methods dynamically (maybe just the tr() functions).
0
-
0
 28.  Consider creating a copy of a const reference when wrapping it in order
0
 to enforce const in Python. Or add a flag to the wrapper which says it is a
0
 const instance. I think the only to way to implement it is to have a "const"
0
 Python type - an instance of which will point to the underlying Python object.
0
 This will enable const_cast to be implemented.
0
 
0
-30. Add support for specifying the reverse arithmetic operators. (Or just
0
-document that you should use the normal ones as global operators?)
0
+31. Allow (some) handwritten code to be implemented in Python.
0
+
0
+32. Consider support for Python properties. Something like...
0
+
0
+ const char *GetTitle() const /PropertyGetter=Title/;
0
+ void SetTitle(const char *title) /PropertySetter=Title/;
0
+
0
+ ...which would define the getter and setter for a property "Title".
0
+ Would the getter and setter also be exposed as separate functions?
0
+ Would that be an option? You could infer the property name (by
0
+ removing the optional leading [Gg]et and [Ss]set...
0
+
0
+ const char *GetTitle() const /Property/;
0
+ void SetTitle(const char *title) /Property/;
...
1
2
3
4
 
5
6
7
...
23
24
25
26
27
 
 
28
29
30
...
212
213
214
215
 
216
217
218
...
221
222
223
224
225
226
227
228
229
230
231
232
233
234
 
235
236
237
...
1
2
 
 
3
4
5
6
...
22
23
24
 
 
25
26
27
28
29
...
211
212
213
 
214
215
216
217
...
220
221
222
 
 
 
 
 
 
 
 
 
 
 
223
224
225
226
0
@@ -1,7 +1,6 @@
0
 # This script handles the SIP configuration and generates the Makefiles.
0
 #
0
-# Copyright (c) 2008
0
-# Phil Thompson <phil@river-bank.demon.co.uk>
0
+# Copyright (c) 2008 Riverbank Computing Limited <info@riverbankcomputing.com>
0
 #
0
 # This file is part of SIP.
0
 #
0
@@ -23,8 +22,8 @@ import siputils
0
 
0
 
0
 # Initialise the globals.
0
-sip_version = 0x040704
0
-sip_version_str = "4.7.4"
0
+sip_version = 0x040705
0
+sip_version_str = "4.7.5-snapshot-20080424"
0
 py_version = sys.hexversion >> 8
0
 plat_py_site_dir = None
0
 plat_py_inc_dir = None
0
@@ -212,7 +211,7 @@ def set_platform_directories():
0
     global plat_bin_dir, plat_py_lib_dir, plat_sip_dir
0
 
0
     # We trust distutils for some stuff.
0
- plat_py_site_dir = sysconfig.get_python_lib()
0
+ plat_py_site_dir = sysconfig.get_python_lib(plat_specific=1)
0
     plat_py_inc_dir = sysconfig.get_python_inc()
0
     plat_py_conf_inc_dir = os.path.dirname(sysconfig.get_config_h_filename())
0
 
0
@@ -221,17 +220,7 @@ def set_platform_directories():
0
         plat_bin_dir = sys.exec_prefix
0
         plat_sip_dir = sys.prefix + "\\sip"
0
     else:
0
- vers = "%d.%d" % ((py_version >> 16) & 0xff, (py_version >> 8) & 0xff)
0
-
0
- # Some 64 bit Linux distros (Mandriva, SuSE) seem to add sys.lib as a
0
- # non-standard extension presumably to allow 32 and 64 bit versions to
0
- # be installed side by side. Use it if it seems to be available.
0
- try:
0
- lib_dir = sys.lib
0
- except AttributeError:
0
- lib_dir = "lib"
0
-
0
- lib_dir = sys.prefix + "/" + lib_dir + "/python" + vers
0
+ lib_dir = sysconfig.get_python_lib(plat_specific=1, standard_lib=1)
0
 
0
         plat_py_lib_dir = lib_dir + "/config"
0
         plat_bin_dir = sys.exec_prefix + "/bin"
...
1
2
3
4
5
 
6
7
8
...
1
2
3
 
 
4
5
6
7
0
@@ -1,8 +1,7 @@
0
 /*
0
  * The XML and API file generator module for SIP.
0
  *
0
- * Copyright (c) 2008
0
- * Phil Thompson <phil@river-bank.demon.co.uk>
0
+ * Copyright (c) 2008 Riverbank Computing Limited <info@riverbankcomputing.com>
0
  *
0
  * This file is part of SIP.
0
  *
...
1
2
3
4
5
 
6
7
8
...
32
33
34
35
 
36
37
38
39
40
...
106
107
108
109
 
 
 
110
111
112
113
114
115
...
125
126
127
128
 
129
130
131
...
603
604
605
 
 
 
 
 
 
 
 
 
 
606
607
608
...
1820
1821
1822
1823
 
 
 
 
 
 
1824
1825
 
1826
1827
1828
...
2138
2139
2140
2141
 
2142
2143
2144
2145
2146
 
2147
2148
2149
...
2165
2166
2167
 
 
2168
2169
 
 
 
 
 
 
2170
2171
 
2172
2173
 
 
 
 
 
 
2174
2175
 
2176
2177
2178
2179
2180
2181
2182
2183
2184
 
 
2185
2186
2187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2188
 
2189
2190
2191
2192
2193
 
 
2194
2195
2196
2197
2198
 
 
 
2199
2200
 
2201
2202
2203
...
3156
3157
3158
3159
 
3160
3161
3162
3163
 
 
 
3164
3165
3166
3167
 
3168
3169
3170
 
 
3171
3172
 
3173
3174
 
3175
3176
3177
 
3178
3179
3180
 
 
3181
3182
 
3183
3184
3185
 
 
3186
3187
3188
3189
 
 
 
3190
3191
 
3192
3193
3194
 
 
3195
3196
 
3197
3198
 
3199
3200
3201
 
 
3202
3203
3204
...
3235
3236
3237
 
 
 
 
 
 
 
 
 
3238
 
 
 
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
...
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
 
 
3932
3933
3934
...
4051
4052
4053
4054
 
4055
4056
4057
...
5142
5143
5144
5145
 
5146
5147
5148
...
5162
5163
5164
5165
 
5166
5167
5168
...
5403
5404
5405
5406
 
5407
5408
5409
...
5415
5416
5417
5418
 
5419
5420
5421
...
5448
5449
5450
5451
 
5452
5453
5454
...
5810
5811
5812
5813
 
5814
5815
5816
...
5911
5912
5913
5914
 
5915
5916
5917
...
5958
5959
5960
5961
 
5962
5963
5964
...
6094
6095
6096
6097
 
6098
6099
6100
...
6542
6543
6544
6545
 
6546
6547
6548
...
6552
6553
6554
6555
 
6556
6557
6558
...
6763
6764
6765
6766
6767
6768
6769
6770
 
6771
6772
6773
...
7065
7066
7067
7068
 
7069
7070
7071
...
7241
7242
7243
7244
 
7245
7246
 
7247
7248
 
7249
7250
7251
7252
 
 
7253
7254
7255
7256
 
 
 
 
 
 
7257
7258
7259
7260
7261
7262
7263
 
7264
7265
7266
 
 
7267
7268
 
7269
7270
 
7271
7272
7273
7274
7275
7276
 
 
7277
7278
7279
7280
 
 
7281
 
7282
7283
7284
7285
7286
7287
7288
7289
7290
 
 
 
 
 
 
 
 
 
7291
7292
 
7293
7294
7295
7296
 
 
 
 
 
 
7297
7298
7299
7300
7301
7302
7303
 
7304
7305
7306
7307
 
 
 
 
7308
7309
7310
7311
7312
7313
 
7314
7315
7316
7317
 
 
 
 
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
 
 
7328
7329
 
 
 
 
 
 
 
7330
7331
7332
7333
7334
7335
7336
 
 
 
 
 
7337
7338
 
 
 
 
7339
7340
7341
7342
7343
 
 
 
 
 
 
 
 
7344
7345
7346
7347
7348
7349
7350
 
 
 
 
 
 
 
 
7351
7352
 
 
 
 
 
 
7353
7354
7355
7356
7357
7358
7359
7360
 
 
7361
7362
7363
...
7395
7396
7397
7398
 
7399
7400
7401
...
7448
7449
7450
 
 
 
 
7451
7452
7453
...
7631
7632
7633
7634
 
7635
7636
 
7637
7638
7639
...
7671
7672
7673
7674
 
 
7675
7676
 
 
7677
7678
7679
...
8106
8107
8108
8109
 
8110
8111
8112
 
 
 
 
 
 
 
 
 
8113
8114
8115
...
8657
8658
8659
8660
 
8661
8662
8663
...
8911
8912
8913
8914
 
 
8915
8916
8917
...
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
 
 
9259
9260
9261
 
 
 
 
 
 
 
 
 
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
 
 
9277
9278
9279
...
9413
9414
9415
9416
 
 
9417
9418
9419
...
9480
9481
9482
 
9483
9484
9485
9486
9487
9488
 
 
 
9489
9490
9491
...
9630
9631
9632
9633
 
9634
9635
9636
...
9826
9827
9828
9829
 
9830
9831
9832
...
9863
9864
9865
9866
 
 
9867
9868
9869
...
9889
9890
9891
9892
9893
 
 
9894
9895
9896
9897
9898
9899
9900
 
9901
9902
9903
...
9927
9928
9929
9930
 
9931
9932
9933
9934
9935
9936
9937
 
9938
9939
9940
...
9972
9973
9974
9975
 
9976
9977
 
9978
9979
9980
...
10010
10011
10012
10013
 
10014
10015
10016
...
10089
10090
10091
 
 
 
10092
10093
 
10094
 
 
 
10095
10096
 
 
10097
10098
10099
10100
 
 
 
10101
10102
10103
...
10125
10126
10127
10128
 
10129
10130
10131
...
10135
10136
10137
10138
 
10139
10140
10141
...
10306
10307
10308
10309
 
 
 
 
 
10310
10311
10312
...
10330
10331
10332
10333
 
10334
10335
10336
...
10344
10345
10346
10347
 
10348
10349
10350
...
10516
10517
10518
 
 
 
 
10519
 
10520
10521
10522
...
10790
10791
10792
10793
 
10794
10795
10796
...
1
2
3
 
 
4
5
6
7
...
31
32
33
 
34
35
 
36
37
38
...
104
105
106
 
107
108
109
110
111
 
112
113
114
...
124
125
126
 
127
128
129
130
...
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
...
1829
1830
1831
 
1832
1833
1834
1835
1836
1837
1838
 
1839
1840
1841
1842
...
2152
2153
2154
 
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
...
2180
2181
2182
2183
2184
2185
 
2186
2187
2188
2189
2190
2191
2192
 
2193
2194
 
2195
2196
2197
2198
2199
2200
2201
 
2202
2203
2204
2205
2206
2207
2208
 
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
 
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
 
2249
2250
2251
2252
...
3205
3206
3207
 
3208
3209
3210
3211
 
3212
3213
3214
3215
3216
3217
 
3218
3219
 
 
3220
3221
3222
 
3223
3224
 
3225
3226
3227
 
3228
3229
 
 
3230
3231
3232
 
3233
3234
 
 
3235
3236
3237
 
 
 
3238
3239
3240
3241
 
3242
3243
 
 
3244
3245
3246
 
3247
3248
 
3249
3250
3251
 
3252
3253
3254
3255
3256
...
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
 
 
 
 
3309
3310
3311
...
3964
3965
3966
 
 
 
 
 
 
 
 
 
 
 
 
 
3967
3968
 
 
 
 
 
 
 
 
 
 
3969
3970
3971
3972
3973
...
4090
4091
4092
 
4093
4094
4095
4096
...
5181
5182
5183
 
5184
5185
5186
5187
...
5201
5202
5203
 
5204
5205
5206
5207
...
5442
5443
5444
 
5445
5446
5447
5448
...
5454
5455
5456
 
5457
5458
5459
5460
...
5487
5488
5489
 
5490
5491
5492
5493
...
5849
5850
5851
 
5852
5853
5854
5855
...
5950
5951
5952
 
5953
5954
5955
5956
...
5997
5998
5999
 
6000
6001
6002
6003
...
6133
6134
6135
 
6136
6137
6138
6139
...
6581
6582
6583
 
6584
6585
6586
6587
...
6591
6592
6593
 
6594
6595
6596
6597
...
6802
6803
6804
 
 
 
 
 
6805
6806
6807
6808
...
7100
7101
7102
 
7103
7104
7105
7106
...
7276
7277
7278
 
7279
7280
 
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
 
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
 
 
7305
7306
 
 
7307
7308
7309
 
7310
7311
 
7312
7313
 
 
 
 
 
7314
7315
7316
 
 
 
7317
7318
7319
7320
7321
 
 
 
 
 
 
 
 
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
 
7332
7333
 
 
 
7334
7335
7336
7337
7338
7339
7340
 
 
 
 
 
 
7341
7342
 
 
 
7343
7344
7345
7346
7347
 
 
 
 
 
7348
7349
 
 
 
7350
7351
7352
7353
7354
 
 
 
 
 
 
 
 
 
7355
7356
7357
 
7358
7359
7360
7361
7362
7363
7364
7365
 
 
 
 
 
 
7366
7367
7368
7369
7370
7371
 
7372
7373
7374
7375
7376
 
 
 
 
7377
7378
7379
7380
7381
7382
7383
7384
7385
 
7386
 
 
 
 
7387
7388
7389
7390
7391
7392
7393
7394
7395
 
7396
7397
7398
7399
7400
7401
7402
 
 
7403
 
 
 
 
7404
7405
7406
7407
7408
...
7440
7441
7442
 
7443
7444
7445
7446
...
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
...
7680
7681
7682
 
7683
7684
 
7685
7686
7687
7688
...
7720
7721
7722
 
7723
7724
7725
 
7726
7727
7728
7729
7730
...
8157
8158
8159
 
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
...
8717
8718
8719
 
8720
8721
8722
8723
...
8971
8972
8973
 
8974
8975
8976
8977
8978
...
9310
9311
9312
 
 
 
 
 
 
 
9313
9314
9315
 
 
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
 
 
 
 
 
 
 
 
 
 
9330
9331
9332
9333
9334
...
9468
9469
9470
 
9471
9472
9473
9474
9475
...
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
...
9690
9691
9692
 
9693
9694
9695
9696
...
9886
9887
9888
 
9889
9890
9891
9892
...
9923
9924
9925
 
9926
9927
9928
9929
9930
...
9950
9951
9952
 
 
9953
9954
9955
9956
9957
9958
9959
9960
 
9961
9962
9963
9964
...
9988
9989
9990
 
9991
9992
9993
9994
9995
9996
9997
 
9998
9999
10000
10001
...
10033
10034
10035
 
10036
10037
 
10038
10039
10040
10041
...
10071
10072
10073
 
10074
10075
10076
10077
...
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
 
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
...
10197
10198
10199
 
10200
10201
10202
10203
...
10207
10208
10209
 
10210
10211
10212
10213
...
10378
10379
10380
 
10381
10382
10383
10384
10385
10386
10387
10388
...
10406
10407
10408
 
10409
10410
10411
10412
...
10420
10421
10422
 
10423
10424
10425
10426
...
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
...
10871
10872
10873
 
10874
10875
10876
10877
0
@@ -1,8 +1,7 @@
0
 /*
0
  * The code generator module for SIP.
0
  *
0
- * Copyright (c) 2008
0
- * Phil Thompson <phil@river-bank.demon.co.uk>
0
+ * Copyright (c) 2008 Riverbank Computing Limited <info@riverbankcomputing.com>
0
  *
0
  * This file is part of SIP.
0
  *
0
@@ -32,9 +31,8 @@
0
 #define TYPE_FLAGS_MASK 0x0f00
0
 
0
 
0
-/* Control what generateSingleArg() actually generates. */
0
+/* Control what generateCalledArgs() actually generates. */
0
 typedef enum {
0
- Call,
0
     Declaration,
0
     Definition
0
 } funcArgType;
0
@@ -106,10 +104,11 @@ static void generateShadowClassDeclaration(sipSpec *, classDef *, FILE *);
0
 static int hasConvertToCode(argDef *ad);
0
 static void deleteTemps(signatureDef *sd, FILE *fp);
0
 static void gc_ellipsis(signatureDef *sd, FILE *fp);
0
-static void generateArgs(classDef *, signatureDef *, funcArgType, FILE *);
0
+static void generateCallArgs(classDef *, signatureDef *, signatureDef *,
0
+ FILE *);
0
+static void generateCalledArgs(classDef *, signatureDef *, funcArgType, FILE *);
0
 static void generateVariable(classDef *, argDef *, int, FILE *);
0
 static void generateNamedValueType(classDef *, argDef *, char *, FILE *);
0
-static void generateSingleArg(classDef *, argDef *, int, funcArgType, FILE *);
0
 static void generateBaseType(classDef *, argDef *, FILE *);
0
 static void generateNamedBaseType(classDef *, argDef *, char *, FILE *);
0
 static void generateTupleBuilder(signatureDef *, FILE *);
0
@@ -125,7 +124,7 @@ static void generateProtectedDeclarations(classDef *, FILE *);
0
 static void generateProtectedDefinitions(classDef *, FILE *);
0
 static void generateProtectedCallArgs(overDef *od, FILE *fp);
0
 static void generateConstructorCall(classDef *, ctorDef *, int, FILE *);
0
-static void generateHandleResult(overDef *, int, char *, FILE *);
0
+static void generateHandleResult(overDef *, int, int, char *, FILE *);
0
 static void generateOrdinaryFunction(moduleDef *mod, classDef *cd,
0
         memberDef *md, FILE *fp);
0
 static void generateSimpleFunctionCall(fcallDef *, FILE *);
0
@@ -603,6 +602,16 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
0
 "#define sipString_AsChar sipAPI_%s->api_string_as_char\n"
0
 "#define sipUnicode_AsWChar sipAPI_%s->api_unicode_as_wchar\n"
0
 "#define sipUnicode_AsWString sipAPI_%s->api_unicode_as_wstring\n"
0
+"#define sipConvertFromConstVoidPtr sipAPI_%s->api_convert_from_const_void_ptr\n"
0
+"#define sipConvertFromVoidPtrAndSize sipAPI_%s->api_convert_from_void_ptr_and_size\n"
0
+"#define sipConvertFromConstVoidPtrAndSize sipAPI_%s->api_convert_from_const_void_ptr_and_size\n"
0
+"#define sipInvokeSlot sipAPI_%s->api_invoke_slot\n"
0
+"#define sipParseType sipAPI_%s->api_parse_type\n"
0
+ ,mname
0
+ ,mname
0
+ ,mname
0
+ ,mname
0
+ ,mname
0
         ,mname
0
         ,mname
0
         ,mname
0
@@ -1820,9 +1829,14 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
0
 
0
     for (md = mod->othfuncs; md != NULL; md = md->next)
0
         if (md->slot == no_slot)
0
- prcode(fp,
0
+ if (noArgParser(md))
0
+ prcode(fp,
0
+" {%N, (PyCFunction)func_%s, METH_KEYWORDS, NULL},\n"
0
+ , md->pyname, md->pyname->text);
0
+ else
0
+ prcode(fp,
0
 " {%N, func_%s, METH_VARARGS, NULL},\n"
0
- , md->pyname, md->pyname->text);
0
+ , md->pyname, md->pyname->text);
0
 
0
     prcode(fp,
0
 " {0, 0, 0, 0}\n"
0
@@ -2138,12 +2152,13 @@ static void generateEncodedClass(moduleDef *mod, classDef *cd, int last,
0
 
0
 
0
 /*
0
- * Generate an ordinary function (ie. not a class method).
0
+ * Generate an ordinary function.
0
  */
0
 static void generateOrdinaryFunction(moduleDef *mod, classDef *cd,
0
         memberDef *md, FILE *fp)
0
 {
0
     overDef *od;
0
+ int need_intro;
0
 
0
     prcode(fp,
0
 "\n"
0
@@ -2165,39 +2180,73 @@ static void generateOrdinaryFunction(moduleDef *mod, classDef *cd,
0
     }
0
     else
0
     {
0
+ const char *self = (generating_c ? "sipSelf" : "");
0
+
0
         if (!generating_c)
0
- prcode(fp,
0
+ if (noArgParser(md))
0
+ prcode(fp,
0
+"extern \"C\" {static PyObject *func_%s(PyObject *,PyObject *,PyObject *);}\n"
0
+ , md->pyname->text);
0
+ else
0
+ prcode(fp,
0
 "extern \"C\" {static PyObject *func_%s(PyObject *,PyObject *);}\n"
0
- , md->pyname->text);
0
+ , md->pyname->text);
0
 
0
- prcode(fp,
0
+ if (noArgParser(md))
0
+ prcode(fp,
0
+"static PyObject *func_%s(PyObject *%s,PyObject *sipArgs,PyObject *sipKwds)\n"
0
+ , md->pyname->text, self);
0
+ else
0
+ prcode(fp,
0
 "static PyObject *func_%s(PyObject *%s,PyObject *sipArgs)\n"
0
- ,md->pyname->text,(generating_c ? "sipSelf" : ""));
0
+ , md->pyname->text, self);
0
 
0
         od = mod->overs;
0
     }
0
 
0
     prcode(fp,
0
 "{\n"
0
-" int sipArgsParsed = 0;\n"
0
         );
0
 
0
+ need_intro = TRUE;
0
+
0
     while (od != NULL)
0
     {
0
         if (od->common == md)
0
+ {
0
+ if (noArgParser(md))
0
+ {