PLplot 5.15.0
build/sip.h
Go to the documentation of this file.
1/*
2 * The SIP module interface.
3 *
4 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
5 *
6 * This file is part of SIP.
7 *
8 * This copy of SIP is licensed for use under the terms of the SIP License
9 * Agreement. See the file LICENSE for more details.
10 *
11 * This copy of SIP may also used under the terms of the GNU General Public
12 * License v2 or v3 as published by the Free Software Foundation which can be
13 * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
14 *
15 * SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 */
18
19
20#ifndef _SIP_H
21#define _SIP_H
22
23
24#include <Python.h>
25
26/* Sanity check on the Python version. */
27#if PY_VERSION_HEX < 0x03050000
28#error "This version of SIP requires Python v3.5 or later"
29#endif
30
31
32#ifdef __cplusplus
33#include <exception>
34
35typedef bool (*sipExceptionHandler)(std::exception_ptr);
36#else
37typedef void *sipExceptionHandler;
38#endif
39
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45
46/* The version of the ABI. */
47#define SIP_ABI_MAJOR_VERSION 12
48#define SIP_ABI_MINOR_VERSION 9
49#define SIP_MODULE_PATCH_VERSION 1
50
51
52/*
53 * The changes to this version of the ABI.
54 *
55 * Preserve any current exception in the wrapper tp_dealloc functions.
56 */
57
58
59/* The version of the code generator. */
60#define SIP_VERSION 0x60501
61#define SIP_VERSION_STR "6.5.1"
62
63/* These are all dependent on the user-specified name of the sip module. */
64#define _SIP_MODULE_FQ_NAME "PyQt5.sip"
65#define _SIP_MODULE_NAME "sip"
66#define _SIP_MODULE_SHARED 1
67#define _SIP_MODULE_ENTRY PyInit_sip
68#define _SIP_MODULE_LEGACY 1
69
70/* Support the historical names. */
71#define SIP_API_MAJOR_NR SIP_ABI_MAJOR_VERSION
72#define SIP_API_MINOR_NR SIP_ABI_MINOR_VERSION
73
74
75/*
76 * Qt includes this typedef and its meta-object system explicitly converts
77 * types to uint. If these correspond to signal arguments then that conversion
78 * is exposed. Therefore SIP generates code that uses it. This definition is
79 * for the cases that SIP is generating non-Qt related bindings with compilers
80 * that don't include it themselves (i.e. MSVC).
81 */
82typedef unsigned int uint;
83
84
85/* Some C++ compatibility stuff. */
86#if defined(__cplusplus)
87
88/*
89 * Cast a PyCFunctionWithKeywords to a PyCFunction in such a way that it
90 * suppresses the GCC -Wcast-function-type warning.
91 */
92#define SIP_MLMETH_CAST(m) reinterpret_cast<PyCFunction>(reinterpret_cast<void (*)(void)>(m))
93
94#if __cplusplus >= 201103L || defined(_MSVC_LANG)
95
96/* C++11 and later. */
97#define SIP_NULLPTR nullptr
98#define SIP_OVERRIDE override
99
100#else
101
102/* Earlier versions of C++. */
103#define SIP_NULLPTR NULL
104#define SIP_OVERRIDE
105
106#endif
107
108#else
109
110/* Cast a PyCFunctionWithKeywords to a PyCFunction. */
111#define SIP_MLMETH_CAST(m) ((PyCFunction)(m))
112
113/* C. */
114#define SIP_NULLPTR NULL
115#define SIP_OVERRIDE
116
117#endif
118
119
120/* Remove in v5.1. */
121#define SIP_SSIZE_T Py_ssize_t
122#define SIP_SSIZE_T_FORMAT "%zd"
123#define SIP_USE_PYCAPSULE
124#define SIP_MODULE_RETURN(v) return (v)
125
126/*
127 * Remove in v5.1. These are undocumented and can be removed when PyQt5 drops
128 * support for Python v2.
129 */
130#define SIPLong_Check PyLong_Check
131#define SIPLong_FromLong PyLong_FromLong
132#define SIPLong_AsLong PyLong_AsLong
133
134#define SIPBytes_Check PyBytes_Check
135#define SIPBytes_FromString PyBytes_FromString
136#define SIPBytes_FromStringAndSize PyBytes_FromStringAndSize
137#define SIPBytes_AsString PyBytes_AsString
138#define SIPBytes_Size PyBytes_Size
139#define SIPBytes_AS_STRING PyBytes_AS_STRING
140#define SIPBytes_GET_SIZE PyBytes_GET_SIZE
141
142
143/*
144 * The mask that can be passed to sipTrace().
145 */
146#define SIP_TRACE_CATCHERS 0x0001
147#define SIP_TRACE_CTORS 0x0002
148#define SIP_TRACE_DTORS 0x0004
149#define SIP_TRACE_INITS 0x0008
150#define SIP_TRACE_DEALLOCS 0x0010
151#define SIP_TRACE_METHODS 0x0020
152
153
154/*
155 * Hide some thread dependent stuff.
156 */
157#ifdef WITH_THREAD
158typedef PyGILState_STATE sip_gilstate_t;
159#define SIP_RELEASE_GIL(gs) PyGILState_Release(gs);
160#define SIP_BLOCK_THREADS {PyGILState_STATE sipGIL = PyGILState_Ensure();
161#define SIP_UNBLOCK_THREADS PyGILState_Release(sipGIL);}
162#else
163typedef int sip_gilstate_t;
164#define SIP_RELEASE_GIL(gs)
165#define SIP_BLOCK_THREADS
166#define SIP_UNBLOCK_THREADS
167#endif
168
169
170/*
171 * Forward declarations of types.
172 */
173struct _sipBufferDef;
175
176struct _sipBufferInfoDef;
178
179struct _sipCFunctionDef;
181
182struct _sipDateDef;
183typedef struct _sipDateDef sipDateDef;
184
185struct _sipEnumTypeObject;
187
188struct _sipMethodDef;
190
191struct _sipSimpleWrapper;
193
194struct _sipTimeDef;
195typedef struct _sipTimeDef sipTimeDef;
196
197struct _sipTypeDef;
198typedef struct _sipTypeDef sipTypeDef;
199
200struct _sipWrapperType;
202
203struct _sipWrapper;
204typedef struct _sipWrapper sipWrapper;
205
206
207/*
208 * The different events a handler can be registered for.
209 */
210typedef enum
211{
212 sipEventWrappedInstance, /* After wrapping a C/C++ instance. */
213 sipEventCollectingWrapper, /* When garbage collecting a wrapper object. */
216
217/*
218 * The event handlers.
219 */
220typedef void (*sipWrappedInstanceEventHandler)(void *sipCpp);
222
223
224/*
225 * The operation an access function is being asked to perform.
226 */
227typedef enum
228{
229 UnguardedPointer, /* Return the unguarded pointer. */
230 GuardedPointer, /* Return the guarded pointer, ie. 0 if it has gone. */
231 ReleaseGuard /* Release the guard, if any. */
233
234
235/*
236 * Some convenient function pointers.
237 */
238typedef void *(*sipInitFunc)(sipSimpleWrapper *, PyObject *, PyObject *,
239 PyObject **, PyObject **, PyObject **);
240typedef int (*sipFinalFunc)(PyObject *, void *, PyObject *, PyObject **);
241typedef void *(*sipAccessFunc)(sipSimpleWrapper *, AccessFuncOp);
242typedef int (*sipTraverseFunc)(void *, visitproc, void *);
243typedef int (*sipClearFunc)(void *);
244typedef int (*sipGetBufferFuncLimited)(PyObject *, void *, sipBufferDef *);
245typedef void (*sipReleaseBufferFuncLimited)(PyObject *, void *);
246#if !defined(Py_LIMITED_API)
247typedef int (*sipGetBufferFunc)(PyObject *, void *, Py_buffer *, int);
248typedef void (*sipReleaseBufferFunc)(PyObject *, void *, Py_buffer *);
249#endif
251typedef void *(*sipCastFunc)(void *, const sipTypeDef *);
252typedef const sipTypeDef *(*sipSubClassConvertFunc)(void **);
253typedef int (*sipConvertToFunc)(PyObject *, void **, int *, PyObject *);
254typedef PyObject *(*sipConvertFromFunc)(void *, PyObject *);
257 sipSimpleWrapper *, PyObject *, ...);
258typedef void (*sipAssignFunc)(void *, Py_ssize_t, void *);
259typedef void *(*sipArrayFunc)(Py_ssize_t);
260typedef void *(*sipCopyFunc)(const void *, Py_ssize_t);
261typedef void (*sipReleaseFunc)(void *, int);
262typedef PyObject *(*sipPickleFunc)(void *);
263typedef int (*sipAttrGetterFunc)(const sipTypeDef *, PyObject *);
264typedef PyObject *(*sipVariableGetterFunc)(void *, PyObject *, PyObject *);
265typedef int (*sipVariableSetterFunc)(void *, PyObject *, PyObject *);
266typedef void *(*sipProxyResolverFunc)(void *);
268typedef void (*sipWrapperVisitorFunc)(sipSimpleWrapper *, void *);
269
270
271#if !defined(Py_LIMITED_API)
272/*
273 * The meta-type of a wrapper type.
274 */
276 /*
277 * The super-metatype. This must be first in the structure so that it can
278 * be cast to a PyTypeObject *.
279 */
280 PyHeapTypeObject super;
281
282 /* Set if the type is a user implemented Python sub-class. */
283 unsigned wt_user_type : 1;
284
285 /* Set if the type's dictionary contains all lazy attributes. */
286 unsigned wt_dict_complete : 1;
287
288 /* Unused and available for future use. */
289 unsigned wt_unused : 30;
290
291 /* The generated type structure. */
293
294 /* The list of init extenders. */
296
297 /* The handler called whenever a new user type has been created. */
299
300 /*
301 * For the user to use. Note that any data structure will leak if the
302 * type is garbage collected.
303 */
305};
306
307
308/*
309 * The type of a simple C/C++ wrapper object.
310 */
312 PyObject_HEAD
313
314 /*
315 * The data, initially a pointer to the C/C++ object, as interpreted by the
316 * access function.
317 */
318 void *data;
319
320 /* The optional access function. */
322
323 /* Object flags. */
324 unsigned sw_flags;
325
326 /* The optional dictionary of extra references keyed by argument number. */
327 PyObject *extra_refs;
328
329 /* For the user to use. */
330 PyObject *user;
331
332 /* The instance dictionary. */
333 PyObject *dict;
334
335 /* The main instance if this is a mixin. */
336 PyObject *mixin_main;
337
338 /* Next object at this address. */
340};
341
342
343/*
344 * The type of a C/C++ wrapper object that supports parent/child relationships.
345 */
347 /* The super-type. */
349
350 /* First child object. */
352
353 /* Next sibling. */
355
356 /* Previous sibling. */
358
359 /* Owning object. */
361};
362
363
364/*
365 * Removed in v5.1.
366 * The meta-type of an enum type. (This is exposed only to support the
367 * deprecated sipConvertFromNamedEnum() macro.)
368 */
370 /*
371 * The super-metatype. This must be first in the structure so that it can
372 * be cast to a PyTypeObject *.
373 */
374 PyHeapTypeObject super;
375
376 /* The generated type structure. */
378};
379#endif
380
381
382/*
383 * The information describing an encoded type ID.
384 */
385typedef struct _sipEncodedTypeDef {
386 /* The type number. */
387 unsigned sc_type : 16;
388
389 /* The module number (255 for this one). */
390 unsigned sc_module : 8;
391
392 /* A context specific flag. */
393 unsigned sc_flag : 1;
395
396
397/*
398 * The information describing an enum member.
399 */
400typedef struct _sipEnumMemberDef {
401 /* The member name. */
402 const char *em_name;
403
404 /* The member value. */
406
407 /* The member enum, -ve if anonymous. */
410
411
412/*
413 * The information describing static instances.
414 */
415typedef struct _sipInstancesDef {
416 /* The types. */
418
419 /* The void *. */
421
422 /* The chars. */
424
425 /* The strings. */
427
428 /* The ints. */
430
431 /* The longs. */
433
434 /* The unsigned longs. */
436
437 /* The long longs. */
439
440 /* The unsigned long longs. */
442
443 /* The doubles. */
446
447
448/*
449 * The information describing a type initialiser extender.
450 */
451typedef struct _sipInitExtenderDef {
452 /* The API version range index. */
454
455 /* The extender function. */
457
458 /* The class being extended. */
460
461 /* The next extender for this class. */
464
465
466/*
467 * The information describing a sub-class convertor.
468 */
470 /* The convertor. */
472
473 /* The encoded base type. */
475
476 /* The base type. */
479
480
481/*
482 * The structure populated by %BIGetBufferCode when the limited API is enabled.
483 */
485 /* The address of the buffer. */
487
488 /* The length of the buffer. */
489 Py_ssize_t bd_length;
490
491 /* Set if the buffer is read-only. */
493};
494
495
496/*
497 * The structure describing a Python buffer.
498 */
500 /* This is internal to sip. */
502
503 /* The address of the buffer. */
504 void *bi_buf;
505
506 /* A reference to the object implementing the buffer interface. */
507 PyObject *bi_obj;
508
509 /* The length of the buffer in bytes. */
510 Py_ssize_t bi_len;
511
512 /* The number of dimensions. */
514
515 /* The format of each element of the buffer. */
517};
518
519
520/*
521 * The structure describing a Python C function.
522 */
524 /* The C function. */
525 PyMethodDef *cf_function;
526
527 /* The optional bound object. */
528 PyObject *cf_self;
529};
530
531
532/*
533 * The structure describing a Python method.
534 */
536 /* The function that implements the method. */
537 PyObject *pm_function;
538
539 /* The bound object. */
540 PyObject *pm_self;
541};
542
543
544/*
545 * The structure describing a Python date.
546 */
548 /* The year. */
550
551 /* The month (1-12). */
553
554 /* The day (1-31). */
556};
557
558
559/*
560 * The structure describing a Python time.
561 */
563 /* The hour (0-23). */
565
566 /* The minute (0-59). */
568
569 /* The second (0-59). */
571
572 /* The microsecond (0-999999). */
574};
575
576
577/*
578 * The different error states of handwritten code.
579 */
580typedef enum {
581 sipErrorNone, /* There is no error. */
582 sipErrorFail, /* The error is a failure. */
583 sipErrorContinue /* It may not apply if a later operation succeeds. */
585
586
587/*
588 * The different Python slot types. New slots must be added to the end,
589 * otherwise the major version of the internal ABI must be changed.
590 */
591typedef enum {
592 str_slot, /* __str__ */
593 int_slot, /* __int__ */
594 float_slot, /* __float__ */
595 len_slot, /* __len__ */
596 contains_slot, /* __contains__ */
597 add_slot, /* __add__ for number */
598 concat_slot, /* __add__ for sequence types */
599 sub_slot, /* __sub__ */
600 mul_slot, /* __mul__ for number types */
601 repeat_slot, /* __mul__ for sequence types */
602 div_slot, /* __div__ */
603 mod_slot, /* __mod__ */
604 floordiv_slot, /* __floordiv__ */
605 truediv_slot, /* __truediv__ */
606 and_slot, /* __and__ */
607 or_slot, /* __or__ */
608 xor_slot, /* __xor__ */
609 lshift_slot, /* __lshift__ */
610 rshift_slot, /* __rshift__ */
611 iadd_slot, /* __iadd__ for number types */
612 iconcat_slot, /* __iadd__ for sequence types */
613 isub_slot, /* __isub__ */
614 imul_slot, /* __imul__ for number types */
615 irepeat_slot, /* __imul__ for sequence types */
616 idiv_slot, /* __idiv__ */
617 imod_slot, /* __imod__ */
618 ifloordiv_slot, /* __ifloordiv__ */
619 itruediv_slot, /* __itruediv__ */
620 iand_slot, /* __iand__ */
621 ior_slot, /* __ior__ */
622 ixor_slot, /* __ixor__ */
623 ilshift_slot, /* __ilshift__ */
624 irshift_slot, /* __irshift__ */
625 invert_slot, /* __invert__ */
626 call_slot, /* __call__ */
627 getitem_slot, /* __getitem__ */
628 setitem_slot, /* __setitem__ */
629 delitem_slot, /* __delitem__ */
630 lt_slot, /* __lt__ */
631 le_slot, /* __le__ */
632 eq_slot, /* __eq__ */
633 ne_slot, /* __ne__ */
634 gt_slot, /* __gt__ */
635 ge_slot, /* __ge__ */
636 bool_slot, /* __bool__, __nonzero__ */
637 neg_slot, /* __neg__ */
638 repr_slot, /* __repr__ */
639 hash_slot, /* __hash__ */
640 pos_slot, /* __pos__ */
641 abs_slot, /* __abs__ */
642 index_slot, /* __index__ */
643 iter_slot, /* __iter__ */
644 next_slot, /* __next__ */
645 setattr_slot, /* __setattr__, __delattr__ */
646 matmul_slot, /* __matmul__ (for Python v3.5 and later) */
647 imatmul_slot, /* __imatmul__ (for Python v3.5 and later) */
648 await_slot, /* __await__ (for Python v3.5 and later) */
649 aiter_slot, /* __aiter__ (for Python v3.5 and later) */
650 anext_slot, /* __anext__ (for Python v3.5 and later) */
652
653
654/*
655 * The information describing a Python slot function.
656 */
657typedef struct _sipPySlotDef {
658 /* The function. */
659 void *psd_func;
660
661 /* The type. */
664
665
666/*
667 * The information describing a Python slot extender.
668 */
669typedef struct _sipPySlotExtenderDef {
670 /* The function. */
671 void *pse_func;
672
673 /* The type. */
675
676 /* The encoded class. */
679
680
681/*
682 * The information describing a typedef.
683 */
684typedef struct _sipTypedefDef {
685 /* The typedef name. */
686 const char *tdd_name;
687
688 /* The typedef value. */
689 const char *tdd_type_name;
691
692
693/*
694 * The information describing a variable or property.
695 */
696
697typedef enum
698{
699 PropertyVariable, /* A property. */
700 InstanceVariable, /* An instance variable. */
701 ClassVariable /* A class (i.e. static) variable. */
703
704typedef struct _sipVariableDef {
705 /* The type of variable. */
707
708 /* The name. */
709 const char *vd_name;
710
711 /*
712 * The getter. If this is a variable (rather than a property) then the
713 * actual type is sipVariableGetterFunc.
714 */
715 PyMethodDef *vd_getter;
716
717 /*
718 * The setter. If this is a variable (rather than a property) then the
719 * actual type is sipVariableSetterFunc. It is NULL if the property cannot
720 * be set or the variable is const.
721 */
722 PyMethodDef *vd_setter;
723
724 /* The property deleter. */
725 PyMethodDef *vd_deleter;
726
727 /* The docstring. */
728 const char *vd_docstring;
730
731
732/*
733 * The information describing a type, either a C++ class (or C struct), a C++
734 * namespace, a mapped type or a named enum.
735 */
737 /* The version range index, -1 if the type isn't versioned. */
739
740 /* The next version of this type. */
742
743 /*
744 * The module, 0 if the type hasn't been initialised.
745 */
747
748 /* Type flags, see the sipType*() macros. */
750
751 /* The C/C++ name of the type. */
753
754 /* The Python type object. */
755 PyTypeObject *td_py_type;
756
757 /* Any additional fixed data generated by a plugin. */
759};
760
761
762/*
763 * The information describing a container (ie. a class, namespace or a mapped
764 * type).
765 */
766typedef struct _sipContainerDef {
767 /*
768 * The Python name of the type, -1 if this is a namespace extender (in the
769 * context of a class) or doesn't require a namespace (in the context of a
770 * mapped type). */
772
773 /*
774 * The scoping type or the namespace this is extending if it is a namespace
775 * extender.
776 */
778
779 /* The number of lazy methods. */
781
782 /* The table of lazy methods. */
783 PyMethodDef *cod_methods;
784
785 /* The number of lazy enum members. */
787
788 /* The table of lazy enum members. */
790
791 /* The number of variables. */
793
794 /* The table of variables. */
796
797 /* The static instances. */
800
801
802/*
803 * The information describing a C++ class (or C struct) or a C++ namespace.
804 */
805typedef struct _sipClassTypeDef {
806 /* The base type information. */
808
809 /* The container information. */
811
812 /* The docstring. */
813 const char *ctd_docstring;
814
815 /*
816 * The meta-type name, -1 to use the meta-type of the first super-type
817 * (normally sipWrapperType).
818 */
820
821 /* The super-type name, -1 to use sipWrapper. */
823
824 /* The super-types. */
826
827 /* The table of Python slots. */
829
830 /* The initialisation function. */
832
833 /* The traverse function. */
835
836 /* The clear function. */
838
839 /* The get buffer function. */
840#if defined(Py_LIMITED_API)
842#else
844#endif
845
846 /* The release buffer function. */
847#if defined(Py_LIMITED_API)
849#else
851#endif
852
853 /* The deallocation function. */
855
856 /* The optional assignment function. */
858
859 /* The optional array allocation function. */
861
862 /* The optional copy function. */
864
865 /* The release function, 0 if a C struct. */
867
868 /* The cast function, 0 if a C struct. */
870
871 /* The optional convert to function. */
873
874 /* The optional convert from function. */
876
877 /* The next namespace extender. */
879
880 /* The pickle function. */
882
883 /* The finalisation function. */
885
886 /* The mixin initialisation function. */
889
890
891/*
892 * The information describing a mapped type.
893 */
894typedef struct _sipMappedTypeDef {
895 /* The base type information. */
897
898 /* The container information. */
900
901 /* The optional assignment function. */
903
904 /* The optional array allocation function. */
906
907 /* The optional copy function. */
909
910 /* The optional release function. */
912
913 /* The convert to function. */
915
916 /* The convert from function. */
919
920
921/*
922 * The information describing a named enum.
923 */
924typedef struct _sipEnumTypeDef {
925 /* The base type information. */
927
928 /* The Python name of the enum. */
930
931 /* The scoping type, -1 if it is defined at the module level. */
933
934 /* The Python slots. */
937
938
939/*
940 * The information describing an external type.
941 */
942typedef struct _sipExternalTypeDef {
943 /* The index into the type table. */
944 int et_nr;
945
946 /* The name of the type. */
947 const char *et_name;
949
950
951/*
952 * Remove in v5.1.
953 * The information describing a mapped class. This (and anything that uses it)
954 * is deprecated.
955 */
957
958
959/*
960 * Defines an entry in the module specific list of delayed dtor calls.
961 */
962typedef struct _sipDelayedDtor {
963 /* The C/C++ instance. */
964 void *dd_ptr;
965
966 /* The class name. */
967 const char *dd_name;
968
969 /* Non-zero if dd_ptr is a derived class instance. */
971
972 /* Next in the list. */
975
976
977/*
978 * Defines an entry in the table of global functions all of whose overloads
979 * are versioned (so their names can't be automatically added to the module
980 * dictionary).
981 */
983 /* The name, -1 marks the end of the table. */
985
986 /* The function itself. */
987 PyCFunction vf_function;
988
989 /* The METH_* flags. */
991
992 /* The docstring. */
993 const char *vf_docstring;
994
995 /* The API version range index. */
998
999
1000/*
1001 * Defines a virtual error handler.
1002 */
1004 /* The name of the handler. */
1005 const char *veh_name;
1006
1007 /* The handler function. */
1010
1011
1012/*
1013 * Defines a type imported from another module.
1014 */
1015typedef union _sipImportedTypeDef {
1016 /* The type name before the module is imported. */
1017 const char *it_name;
1018
1019 /* The type after the module is imported. */
1022
1023
1024/*
1025 * Defines a virtual error handler imported from another module.
1026 */
1028 /* The handler name before the module is imported. */
1029 const char *iveh_name;
1030
1031 /* The handler after the module is imported. */
1034
1035
1036/*
1037 * Defines an exception imported from another module.
1038 */
1040 /* The exception name before the module is imported. */
1041 const char *iexc_name;
1042
1043 /* The exception object after the module is imported. */
1044 PyObject *iexc_object;
1046
1047
1048/*
1049 * The information describing an imported module.
1050 */
1052 /* The module name. */
1053 const char *im_name;
1054
1055 /* The types imported from the module. */
1057
1058 /* The virtual error handlers imported from the module. */
1060
1061 /* The exceptions imported from the module. */
1064
1065
1066/*
1067 * The main client module structure.
1068 */
1070 /* The next in the list. */
1072
1073 /* The SIP API minor version number. */
1075
1076 /* The module name. */
1078
1079 /* The module name as an object. */
1080 PyObject *em_nameobj;
1081
1082 /* The string pool. */
1083 const char *em_strings;
1084
1085 /* The imported modules. */
1087
1088 /* The optional Qt support API. */
1090
1091 /* The number of types. */
1093
1094 /* The table of types. */
1096
1097 /* The table of external types. */
1099
1100 /* The number of members in global enums. */
1102
1103 /* The table of members in global enums. */
1105
1106 /* The number of typedefs. */
1108
1109 /* The table of typedefs. */
1111
1112 /* The table of virtual error handlers. */
1114
1115 /* The sub-class convertors. */
1117
1118 /* The static instances. */
1120
1121 /* The license. */
1123
1124 /* The table of exception types. */
1125 PyObject **em_exceptions;
1126
1127 /* The table of Python slot extenders. */
1129
1130 /* The table of initialiser extenders. */
1132
1133 /* The delayed dtor handler. */
1135
1136 /* The list of delayed dtors. */
1138
1139 /*
1140 * The array of API version definitions. Each definition takes up 3
1141 * elements. If the third element of a 3-tuple is negative then the first
1142 * two elements define an API and its default version. All such
1143 * definitions will appear at the end of the array. If the first element
1144 * of a 3-tuple is negative then that is the last element of the array.
1145 */
1147
1148 /* The optional table of versioned functions. */
1150
1151 /* The exception handler. */
1154
1155
1156/*
1157 * The information describing a license to be added to a dictionary.
1158 */
1159typedef struct _sipLicenseDef {
1160 /* The type of license. */
1161 const char *lc_type;
1162
1163 /* The licensee. */
1164 const char *lc_licensee;
1165
1166 /* The timestamp. */
1167 const char *lc_timestamp;
1168
1169 /* The signature. */
1170 const char *lc_signature;
1172
1173
1174/*
1175 * The information describing a void pointer instance to be added to a
1176 * dictionary.
1177 */
1179 /* The void pointer name. */
1180 const char *vi_name;
1181
1182 /* The void pointer value. */
1183 void *vi_val;
1185
1186
1187/*
1188 * The information describing a char instance to be added to a dictionary.
1189 */
1190typedef struct _sipCharInstanceDef {
1191 /* The char name. */
1192 const char *ci_name;
1193
1194 /* The char value. */
1196
1197 /* The encoding used, either 'A', 'L', '8' or 'N'. */
1200
1201
1202/*
1203 * The information describing a string instance to be added to a dictionary.
1204 * This is also used as a hack to add (or fix) other types rather than add a
1205 * new table type and so requiring a new major version of the API.
1206 */
1208 /* The string name. */
1209 const char *si_name;
1210
1211 /* The string value. */
1212 const char *si_val;
1213
1214 /*
1215 * The encoding used, either 'A', 'L', '8' or 'N'. 'w' and 'W' are also
1216 * used to support the fix for wchar_t.
1217 */
1220
1221
1222/*
1223 * The information describing an int instance to be added to a dictionary.
1224 */
1225typedef struct _sipIntInstanceDef {
1226 /* The int name. */
1227 const char *ii_name;
1228
1229 /* The int value. */
1232
1233
1234/*
1235 * The information describing a long instance to be added to a dictionary.
1236 */
1237typedef struct _sipLongInstanceDef {
1238 /* The long name. */
1239 const char *li_name;
1240
1241 /* The long value. */
1244
1245
1246/*
1247 * The information describing an unsigned long instance to be added to a
1248 * dictionary.
1249 */
1251 /* The unsigned long name. */
1252 const char *uli_name;
1253
1254 /* The unsigned long value. */
1255 unsigned long uli_val;
1257
1258
1259/*
1260 * The information describing a long long instance to be added to a dictionary.
1261 */
1263 /* The long long name. */
1264 const char *lli_name;
1265
1266 /* The long long value. */
1267#if defined(HAVE_LONG_LONG)
1268 PY_LONG_LONG lli_val;
1269#else
1271#endif
1273
1274
1275/*
1276 * The information describing an unsigned long long instance to be added to a
1277 * dictionary.
1278 */
1280 /* The unsigned long long name. */
1281 const char *ulli_name;
1282
1283 /* The unsigned long long value. */
1284#if defined(HAVE_LONG_LONG)
1285 unsigned PY_LONG_LONG ulli_val;
1286#else
1287 unsigned long ulli_val;
1288#endif
1290
1291
1292/*
1293 * The information describing a double instance to be added to a dictionary.
1294 */
1296 /* The double name. */
1297 const char *di_name;
1298
1299 /* The double value. */
1300 double di_val;
1302
1303
1304/*
1305 * The information describing a class or enum instance to be added to a
1306 * dictionary.
1307 */
1308typedef struct _sipTypeInstanceDef {
1309 /* The type instance name. */
1310 const char *ti_name;
1311
1312 /* The actual instance. */
1313 void *ti_ptr;
1314
1315 /* A pointer to the generated type. */
1317
1318 /* The wrapping flags. */
1321
1322
1323/*
1324 * Remove in v5.1.
1325 * Define a mapping between a wrapped type identified by a string and the
1326 * corresponding Python type.
1327 */
1329 /* The type as a string. */
1330 const char *typeString;
1331
1332 /* A pointer to the Python type. */
1335
1336
1337/*
1338 * Remove in v5.1.
1339 * Define a mapping between a wrapped type identified by an integer and the
1340 * corresponding Python type.
1341 */
1342typedef struct _sipIntTypeClassMap {
1343 /* The type as an integer. */
1345
1346 /* A pointer to the Python type. */
1349
1350
1351/*
1352 * A Python method's component parts. This allows us to re-create the method
1353 * without changing the reference counts of the components.
1354 */
1355typedef struct _sipPyMethod {
1356 /* The function. */
1357 PyObject *mfunc;
1358
1359 /* Self if it is a bound method. */
1360 PyObject *mself;
1362
1363
1364/*
1365 * A slot (in the Qt, rather than Python, sense).
1366 */
1367typedef struct _sipSlot {
1368 /* Name if a Qt or Python signal. */
1369 char *name;
1370
1371 /* Signal or Qt slot object. */
1372 PyObject *pyobj;
1373
1374 /* Python slot method, pyobj is NULL. */
1376
1377 /* A weak reference to the slot, Py_True if pyobj has an extra reference. */
1378 PyObject *weakSlot;
1380
1381
1382/*
1383 * The API exported by the SIP module, ie. pointers to all the data and
1384 * functions that can be used by generated code.
1385 */
1386typedef struct _sipAPIDef {
1387 /*
1388 * This must be the first entry and it's signature must not change so that
1389 * version number mismatches can be detected and reported.
1390 */
1391 int (*api_export_module)(sipExportedModuleDef *client, unsigned api_major,
1392 unsigned api_minor, void *unused);
1393
1394 /*
1395 * The following are part of the public API.
1396 */
1398 PyTypeObject *api_wrapper_type;
1400 PyTypeObject *api_voidptr_type;
1401
1402 void (*api_bad_catcher_result)(PyObject *method);
1403 void (*api_bad_length_for_slice)(Py_ssize_t seqlen, Py_ssize_t slicelen);
1404 PyObject *(*api_build_result)(int *isErr, const char *fmt, ...);
1405 PyObject *(*api_call_method)(int *isErr, PyObject *method, const char *fmt,
1406 ...);
1408 sipSimpleWrapper *, PyObject *, const char *, ...);
1409 PyObject *(*api_connect_rx)(PyObject *txObj, const char *sig,
1410 PyObject *rxObj, const char *slot, int type);
1411 Py_ssize_t (*api_convert_from_sequence_index)(Py_ssize_t idx,
1412 Py_ssize_t len);
1413 int (*api_can_convert_to_type)(PyObject *pyObj, const sipTypeDef *td,
1414 int flags);
1415 void *(*api_convert_to_type)(PyObject *pyObj, const sipTypeDef *td,
1416 PyObject *transferObj, int flags, int *statep, int *iserrp);
1417 void *(*api_force_convert_to_type)(PyObject *pyObj, const sipTypeDef *td,
1418 PyObject *transferObj, int flags, int *statep, int *iserrp);
1419
1420 /*
1421 * The following are deprecated parts of the public API.
1422 */
1423 int (*api_can_convert_to_enum)(PyObject *pyObj, const sipTypeDef *td);
1424
1425 /*
1426 * The following are part of the public API.
1427 */
1428 void (*api_release_type)(void *cpp, const sipTypeDef *td, int state);
1429 PyObject *(*api_convert_from_type)(void *cpp, const sipTypeDef *td,
1430 PyObject *transferObj);
1431 PyObject *(*api_convert_from_new_type)(void *cpp, const sipTypeDef *td,
1432 PyObject *transferObj);
1433 PyObject *(*api_convert_from_enum)(int eval, const sipTypeDef *td);
1434 int (*api_get_state)(PyObject *transferObj);
1435 PyObject *(*api_disconnect_rx)(PyObject *txObj, const char *sig,
1436 PyObject *rxObj, const char *slot);
1437 void (*api_free)(void *mem);
1438 PyObject *(*api_get_pyobject)(void *cppPtr, const sipTypeDef *td);
1439 void *(*api_malloc)(size_t nbytes);
1440 int (*api_parse_result)(int *isErr, PyObject *method, PyObject *res,
1441 const char *fmt, ...);
1442 void (*api_trace)(unsigned mask, const char *fmt, ...);
1443 void (*api_transfer_back)(PyObject *self);
1444 void (*api_transfer_to)(PyObject *self, PyObject *owner);
1445 void (*api_transfer_break)(PyObject *self);
1446 unsigned long (*api_long_as_unsigned_long)(PyObject *o);
1447 PyObject *(*api_convert_from_void_ptr)(void *val);
1448 PyObject *(*api_convert_from_const_void_ptr)(const void *val);
1449 PyObject *(*api_convert_from_void_ptr_and_size)(void *val,
1450 Py_ssize_t size);
1451 PyObject *(*api_convert_from_const_void_ptr_and_size)(const void *val,
1452 Py_ssize_t size);
1453 void *(*api_convert_to_void_ptr)(PyObject *obj);
1454 int (*api_export_symbol)(const char *name, void *sym);
1455 void *(*api_import_symbol)(const char *name);
1456 const sipTypeDef *(*api_find_type)(const char *type);
1457 int (*api_register_py_type)(PyTypeObject *type);
1458 const sipTypeDef *(*api_type_from_py_type_object)(PyTypeObject *py_type);
1459 const sipTypeDef *(*api_type_scope)(const sipTypeDef *td);
1460 const char *(*api_resolve_typedef)(const char *name);
1462 sipAttrGetterFunc getter);
1463 int (*api_is_api_enabled)(const char *name, int from, int to);
1464 sipErrorState (*api_bad_callable_arg)(int arg_nr, PyObject *arg);
1465 void *(*api_get_address)(struct _sipSimpleWrapper *w);
1467 int (*api_enable_autoconversion)(const sipTypeDef *td, int enable);
1468 void *(*api_get_mixin_address)(struct _sipSimpleWrapper *w,
1469 const sipTypeDef *td);
1470 PyObject *(*api_convert_from_new_pytype)(void *cpp, PyTypeObject *py_type,
1471 sipWrapper *owner, sipSimpleWrapper **selfp, const char *fmt, ...);
1472 PyObject *(*api_convert_to_typed_array)(void *data, const sipTypeDef *td,
1473 const char *format, size_t stride, Py_ssize_t len, int flags);
1474 PyObject *(*api_convert_to_array)(void *data, const char *format,
1475 Py_ssize_t len, int flags);
1477 sipProxyResolverFunc resolver);
1478 PyInterpreterState *(*api_get_interpreter)(void);
1482 void *(*api_get_type_user_data)(const sipWrapperType *);
1483 PyObject *(*api_py_type_dict)(const PyTypeObject *);
1484 const char *(*api_py_type_name)(const PyTypeObject *);
1485 int (*api_get_method)(PyObject *, sipMethodDef *);
1486 PyObject *(*api_from_method)(const sipMethodDef *);
1488 int (*api_get_date)(PyObject *, sipDateDef *);
1489 PyObject *(*api_from_date)(const sipDateDef *);
1490 int (*api_get_datetime)(PyObject *, sipDateDef *, sipTimeDef *);
1491 PyObject *(*api_from_datetime)(const sipDateDef *, const sipTimeDef *);
1492 int (*api_get_time)(PyObject *, sipTimeDef *);
1493 PyObject *(*api_from_time)(const sipTimeDef *);
1495 struct _frame *(*api_get_frame)(int);
1496 int (*api_check_plugin_for_type)(const sipTypeDef *, const char *);
1497 PyObject *(*api_unicode_new)(Py_ssize_t, unsigned, int *, void **);
1498 void (*api_unicode_write)(int, void *, int, unsigned);
1499 void *(*api_unicode_data)(PyObject *, int *, Py_ssize_t *);
1502 PyObject *(*api_get_user_object)(const sipSimpleWrapper *);
1504
1505 /*
1506 * The following are not part of the public API.
1507 */
1508 int (*api_init_module)(sipExportedModuleDef *client, PyObject *mod_dict);
1509 int (*api_parse_args)(PyObject **parseErrp, PyObject *sipArgs,
1510 const char *fmt, ...);
1511 int (*api_parse_pair)(PyObject **parseErrp, PyObject *arg0, PyObject *arg1,
1512 const char *fmt, ...);
1513
1514 /*
1515 * The following are part of the public API.
1516 */
1518
1519 /*
1520 * The following are not part of the public API.
1521 */
1522 void (*api_no_function)(PyObject *parseErr, const char *func,
1523 const char *doc);
1524 void (*api_no_method)(PyObject *parseErr, const char *scope,
1525 const char *method, const char *doc);
1526 void (*api_abstract_method)(const char *classname, const char *method);
1527 void (*api_bad_class)(const char *classname);
1528 void *(*api_get_cpp_ptr)(sipSimpleWrapper *w, const sipTypeDef *td);
1529 void *(*api_get_complex_cpp_ptr)(sipSimpleWrapper *w);
1530 PyObject *(*api_is_py_method)(sip_gilstate_t *gil, char *pymc,
1531 sipSimpleWrapper *sipSelf, const char *cname, const char *mname);
1532 void (*api_call_hook)(const char *hookname);
1533 void (*api_end_thread)(void);
1535 void (*api_raise_type_exception)(const sipTypeDef *td, void *ptr);
1536 int (*api_add_type_instance)(PyObject *dict, const char *name,
1537 void *cppPtr, const sipTypeDef *td);
1538 void (*api_bad_operator_arg)(PyObject *self, PyObject *arg,
1539 sipPySlotType st);
1540 PyObject *(*api_pyslot_extend)(sipExportedModuleDef *mod, sipPySlotType st,
1541 const sipTypeDef *type, PyObject *arg0, PyObject *arg1);
1543 char (*api_bytes_as_char)(PyObject *obj);
1544 const char *(*api_bytes_as_string)(PyObject *obj);
1545 char (*api_string_as_ascii_char)(PyObject *obj);
1546 const char *(*api_string_as_ascii_string)(PyObject **obj);
1547 char (*api_string_as_latin1_char)(PyObject *obj);
1548 const char *(*api_string_as_latin1_string)(PyObject **obj);
1549 char (*api_string_as_utf8_char)(PyObject *obj);
1550 const char *(*api_string_as_utf8_string)(PyObject **obj);
1551#if defined(HAVE_WCHAR_H)
1552 wchar_t (*api_unicode_as_wchar)(PyObject *obj);
1553 wchar_t *(*api_unicode_as_wstring)(PyObject *obj);
1554#else
1555 int (*api_unicode_as_wchar)(PyObject *obj);
1556 int *(*api_unicode_as_wstring)(PyObject *obj);
1557#endif
1558 int (*api_deprecated)(const char *classname, const char *method);
1559 void (*api_keep_reference)(PyObject *self, int key, PyObject *obj);
1560 int (*api_parse_kwd_args)(PyObject **parseErrp, PyObject *sipArgs,
1561 PyObject *sipKwdArgs, const char **kwdlist, PyObject **unused,
1562 const char *fmt, ...);
1563 void (*api_add_exception)(sipErrorState es, PyObject **parseErrp);
1565 sipSimpleWrapper *, PyObject *method, PyObject *res,
1566 const char *fmt, ...);
1569 int (*api_init_mixin)(PyObject *self, PyObject *args, PyObject *kwds,
1570 const sipClassTypeDef *ctd);
1571 PyObject *(*api_get_reference)(PyObject *self, int key);
1572
1573 /*
1574 * The following are part of the public API.
1575 */
1577
1578 /*
1579 * The following are not part of the public API.
1580 */
1582
1583 /*
1584 * The following may be used by Qt support code but no other handwritten
1585 * code.
1586 */
1588 int (*api_same_slot)(const sipSlot *sp, PyObject *rxObj, const char *slot);
1589 void *(*api_convert_rx)(sipWrapper *txSelf, const char *sigargs,
1590 PyObject *rxObj, const char *slot, const char **memberp,
1591 int flags);
1592 PyObject *(*api_invoke_slot)(const sipSlot *slot, PyObject *sigargs);
1593 PyObject *(*api_invoke_slot_ex)(const sipSlot *slot, PyObject *sigargs,
1594 int check_receiver);
1595 int (*api_save_slot)(sipSlot *sp, PyObject *rxObj, const char *slot);
1597 int (*api_visit_slot)(sipSlot *slot, visitproc visit, void *arg);
1598
1599 /*
1600 * The following are deprecated parts of the public API.
1601 */
1602 PyTypeObject *(*api_find_named_enum)(const char *type);
1603 const sipMappedType *(*api_find_mapped_type)(const char *type);
1604 sipWrapperType *(*api_find_class)(const char *type);
1605 sipWrapperType *(*api_map_int_to_class)(int typeInt,
1606 const sipIntTypeClassMap *map, int maplen);
1607 sipWrapperType *(*api_map_string_to_class)(const char *typeString,
1608 const sipStringTypeClassMap *map, int maplen);
1609
1610 /*
1611 * The following are part of the public API.
1612 */
1613 int (*api_enable_gc)(int enable);
1614 void (*api_print_object)(PyObject *o);
1616 void *handler);
1617 int (*api_convert_to_enum)(PyObject *obj, const sipTypeDef *td);
1618 int (*api_convert_to_bool)(PyObject *obj);
1620 char (*api_long_as_char)(PyObject *o);
1621 signed char (*api_long_as_signed_char)(PyObject *o);
1622 unsigned char (*api_long_as_unsigned_char)(PyObject *o);
1623 short (*api_long_as_short)(PyObject *o);
1624 unsigned short (*api_long_as_unsigned_short)(PyObject *o);
1625 int (*api_long_as_int)(PyObject *o);
1626 unsigned int (*api_long_as_unsigned_int)(PyObject *o);
1627 long (*api_long_as_long)(PyObject *o);
1628#if defined(HAVE_LONG_LONG)
1629 PY_LONG_LONG (*api_long_as_long_long)(PyObject *o);
1630 unsigned PY_LONG_LONG (*api_long_as_unsigned_long_long)(PyObject *o);
1631#else
1634#endif
1635
1636 /*
1637 * The following are not part of the public API.
1638 */
1640
1641 /*
1642 * The following are part of the public API.
1643 */
1644 int (*api_convert_from_slice_object)(PyObject *slice, Py_ssize_t length,
1645 Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step,
1646 Py_ssize_t *slicelength);
1647 size_t (*api_long_as_size_t)(PyObject *o);
1648 void (*api_visit_wrappers)(sipWrapperVisitorFunc visitor, void *closure);
1649 int (*api_register_exit_notifier)(PyMethodDef *md);
1650
1651 /*
1652 * The following are not part of the public API.
1653 */
1654 PyObject *(*api_is_py_method_12_8)(sip_gilstate_t *gil, char *pymc,
1655 sipSimpleWrapper **sipSelfp, const char *cname, const char *mname);
1658
1659const sipAPIDef *sip_init_library(PyObject *mod_dict);
1660
1661
1662/*
1663 * The API implementing the optional Qt support.
1664 */
1665typedef struct _sipQtAPI {
1667 void *(*qt_create_universal_signal)(void *, const char **);
1668 void *(*qt_find_universal_signal)(void *, const char **);
1669 void *(*qt_create_universal_slot)(struct _sipWrapper *, const char *,
1670 PyObject *, const char *, const char **, int);
1672 void *(*qt_find_slot)(void *, const char *, PyObject *, const char *,
1673 const char **);
1674 int (*qt_connect)(void *, const char *, void *, const char *, int);
1675 int (*qt_disconnect)(void *, const char *, void *, const char *);
1676 int (*qt_same_name)(const char *, const char *);
1677 sipSlot *(*qt_find_sipslot)(void *, void **);
1678 int (*qt_emit_signal)(PyObject *, const char *, PyObject *);
1679 int (*qt_connect_py_signal)(PyObject *, const char *, PyObject *,
1680 const char *);
1681 void (*qt_disconnect_py_signal)(PyObject *, const char *, PyObject *,
1682 const char *);
1684
1685
1686/*
1687 * These are flags that can be passed to sipCanConvertToType(),
1688 * sipConvertToType() and sipForceConvertToType().
1689 */
1690#define SIP_NOT_NONE 0x01 /* Disallow None. */
1691#define SIP_NO_CONVERTORS 0x02 /* Disable any type convertors. */
1692
1693
1694/*
1695 * These are flags that can be passed to sipConvertToArray(). These are held
1696 * in sw_flags.
1697 */
1698#define SIP_READ_ONLY 0x01 /* The array is read-only. */
1699#define SIP_OWNS_MEMORY 0x02 /* The array owns its memory. */
1700
1701
1702/*
1703 * These are the state flags returned by %ConvertToTypeCode. Note that the
1704 * values share the same "flagspace" as the contents of sw_flags.
1705 */
1706#define SIP_TEMPORARY 0x01 /* A temporary instance. */
1707#define SIP_DERIVED_CLASS 0x02 /* The instance is derived. */
1708
1709
1710/*
1711 * These flags are specific to the Qt support API.
1712 */
1713#define SIP_SINGLE_SHOT 0x01 /* The connection is single shot. */
1714
1715
1716/*
1717 * Useful macros, not part of the public API.
1718 */
1719
1720/* These are held in sw_flags. */
1721#define SIP_INDIRECT 0x0004 /* If there is a level of indirection. */
1722#define SIP_ACCFUNC 0x0008 /* If there is an access function. */
1723#define SIP_NOT_IN_MAP 0x0010 /* If Python object is not in the map. */
1724
1725#if !defined(Py_LIMITED_API)
1726#define SIP_PY_OWNED 0x0020 /* If owned by Python. */
1727#define SIP_SHARE_MAP 0x0040 /* If the map slot might be occupied. */
1728#define SIP_CPP_HAS_REF 0x0080 /* If C/C++ has a reference. */
1729#define SIP_POSSIBLE_PROXY 0x0100 /* If there might be a proxy slot. */
1730#define SIP_ALIAS 0x0200 /* If it is an alias. */
1731#define SIP_CREATED 0x0400 /* If the C/C++ object has been created. */
1732
1733#define sipIsDerived(sw) ((sw)->sw_flags & SIP_DERIVED_CLASS)
1734#define sipIsIndirect(sw) ((sw)->sw_flags & SIP_INDIRECT)
1735#define sipIsAccessFunc(sw) ((sw)->sw_flags & SIP_ACCFUNC)
1736#define sipNotInMap(sw) ((sw)->sw_flags & SIP_NOT_IN_MAP)
1737#define sipSetNotInMap(sw) ((sw)->sw_flags |= SIP_NOT_IN_MAP)
1738#define sipIsPyOwned(sw) ((sw)->sw_flags & SIP_PY_OWNED)
1739#define sipSetPyOwned(sw) ((sw)->sw_flags |= SIP_PY_OWNED)
1740#define sipResetPyOwned(sw) ((sw)->sw_flags &= ~SIP_PY_OWNED)
1741#define sipCppHasRef(sw) ((sw)->sw_flags & SIP_CPP_HAS_REF)
1742#define sipSetCppHasRef(sw) ((sw)->sw_flags |= SIP_CPP_HAS_REF)
1743#define sipResetCppHasRef(sw) ((sw)->sw_flags &= ~SIP_CPP_HAS_REF)
1744#define sipPossibleProxy(sw) ((sw)->sw_flags & SIP_POSSIBLE_PROXY)
1745#define sipSetPossibleProxy(sw) ((sw)->sw_flags |= SIP_POSSIBLE_PROXY)
1746#define sipIsAlias(sw) ((sw)->sw_flags & SIP_ALIAS)
1747#define sipWasCreated(sw) ((sw)->sw_flags & SIP_CREATED)
1748#endif
1749
1750#define SIP_TYPE_TYPE_MASK 0x0007 /* The type type mask. */
1751#define SIP_TYPE_CLASS 0x0000 /* If the type is a C++ class. */
1752#define SIP_TYPE_NAMESPACE 0x0001 /* If the type is a C++ namespace. */
1753#define SIP_TYPE_MAPPED 0x0002 /* If the type is a mapped type. */
1754#define SIP_TYPE_ENUM 0x0003 /* If the type is a named enum. */
1755#define SIP_TYPE_SCOPED_ENUM 0x0004 /* If the type is a scoped enum. */
1756#define SIP_TYPE_ABSTRACT 0x0008 /* If the type is abstract. */
1757#define SIP_TYPE_SCC 0x0010 /* If the type is subject to sub-class convertors. */
1758#define SIP_TYPE_ALLOW_NONE 0x0020 /* If the type can handle None. */
1759#define SIP_TYPE_STUB 0x0040 /* If the type is a stub. */
1760#define SIP_TYPE_NONLAZY 0x0080 /* If the type has a non-lazy method. */
1761#define SIP_TYPE_SUPER_INIT 0x0100 /* If the instance's super init should be called. */
1762#define SIP_TYPE_LIMITED_API 0x0200 /* Use the limited API. If this is more generally required it may need to be moved to the module definition. */
1763
1764
1765/*
1766 * The following are part of the public API.
1767 */
1768#define sipTypeIsClass(td) (((td)->td_flags & SIP_TYPE_TYPE_MASK) == SIP_TYPE_CLASS)
1769#define sipTypeIsNamespace(td) (((td)->td_flags & SIP_TYPE_TYPE_MASK) == SIP_TYPE_NAMESPACE)
1770#define sipTypeIsMapped(td) (((td)->td_flags & SIP_TYPE_TYPE_MASK) == SIP_TYPE_MAPPED)
1771#define sipTypeIsEnum(td) (((td)->td_flags & SIP_TYPE_TYPE_MASK) == SIP_TYPE_ENUM)
1772#define sipTypeIsScopedEnum(td) (((td)->td_flags & SIP_TYPE_TYPE_MASK) == SIP_TYPE_SCOPED_ENUM)
1773#define sipTypeAsPyTypeObject(td) ((td)->td_py_type)
1774#define sipTypeName(td) sipNameFromPool((td)->td_module, (td)->td_cname)
1775#define sipTypePluginData(td) ((td)->td_plugin_data)
1776
1777
1778/*
1779 * Remove in v5.1.
1780 */
1781#define sipClassName(w) PyString_FromString(Py_TYPE(w)->tp_name)
1782#define sipIsExactWrappedType(wt) (sipTypeAsPyTypeObject((wt)->wt_td) == (PyTypeObject *)(wt))
1783
1784
1785/*
1786 * The following are not part of the public API.
1787 */
1788#define sipTypeIsAbstract(td) ((td)->td_flags & SIP_TYPE_ABSTRACT)
1789#define sipTypeHasSCC(td) ((td)->td_flags & SIP_TYPE_SCC)
1790#define sipTypeAllowNone(td) ((td)->td_flags & SIP_TYPE_ALLOW_NONE)
1791#define sipTypeIsStub(td) ((td)->td_flags & SIP_TYPE_STUB)
1792#define sipTypeSetStub(td) ((td)->td_flags |= SIP_TYPE_STUB)
1793#define sipTypeHasNonlazyMethod(td) ((td)->td_flags & SIP_TYPE_NONLAZY)
1794#define sipTypeCallSuperInit(td) ((td)->td_flags & SIP_TYPE_SUPER_INIT)
1795#define sipTypeUseLimitedAPI(td) ((td)->td_flags & SIP_TYPE_LIMITED_API)
1796
1797/*
1798 * Get various names from the string pool for various data types.
1799 */
1800#define sipNameFromPool(em, mr) (&((em)->em_strings)[(mr)])
1801#define sipNameOfModule(em) sipNameFromPool((em), (em)->em_name)
1802#define sipPyNameOfContainer(cod, td) sipNameFromPool((td)->td_module, (cod)->cod_name)
1803#define sipPyNameOfEnum(etd) sipNameFromPool((etd)->etd_base.td_module, (etd)->etd_name)
1804
1805
1806/*
1807 * The following are PyQt4-specific extensions. In SIP v5 they will be pushed
1808 * out to a plugin supplied by PyQt4.
1809 */
1810
1811/*
1812 * The description of a Qt signal for PyQt4.
1813 */
1814typedef struct _pyqt4QtSignal {
1815 /* The C++ name and signature of the signal. */
1816 const char *signature;
1817
1818 /* The optional docstring. */
1819 const char *docstring;
1820
1821 /*
1822 * If the signal is an overload of regular methods then this points to the
1823 * code that implements those methods.
1824 */
1825 PyMethodDef *non_signals;
1826
1827 /*
1828 * The hack to apply when built against Qt5:
1829 *
1830 * 0 - no hack
1831 * 1 - add an optional None
1832 * 2 - add an optional []
1833 * 3 - add an optional False
1834 */
1835 int hack;
1837
1838
1839/*
1840 * This is the PyQt4-specific extension to the generated class type structure.
1841 */
1842typedef struct _pyqt4ClassPluginDef {
1843 /* A pointer to the QObject sub-class's staticMetaObject class variable. */
1845
1846 /*
1847 * A set of flags. At the moment only bit 0 is used to say if the type is
1848 * derived from QFlags.
1849 */
1850 unsigned flags;
1851
1852 /*
1853 * The table of signals emitted by the type. These are grouped by signal
1854 * name.
1855 */
1858
1859
1860/*
1861 * The following are PyQt5-specific extensions. In SIP v5 they will be pushed
1862 * out to a plugin supplied by PyQt5.
1863 */
1864
1865/*
1866 * The description of a Qt signal for PyQt5.
1867 */
1868typedef int (*pyqt5EmitFunc)(void *, PyObject *);
1869
1870typedef struct _pyqt5QtSignal {
1871 /* The normalised C++ name and signature of the signal. */
1872 const char *signature;
1873
1874 /* The optional docstring. */
1875 const char *docstring;
1876
1877 /*
1878 * If the signal is an overload of regular methods then this points to the
1879 * code that implements those methods.
1880 */
1881 PyMethodDef *non_signals;
1882
1883 /*
1884 * If the signal has optional arguments then this function will implement
1885 * emit() for the signal.
1886 */
1889
1890
1891/*
1892 * This is the PyQt5-specific extension to the generated class type structure.
1893 */
1894typedef struct _pyqt5ClassPluginDef {
1895 /* A pointer to the QObject sub-class's staticMetaObject class variable. */
1897
1898 /*
1899 * A set of flags. At the moment only bit 0 is used to say if the type is
1900 * derived from QFlags.
1901 */
1902 unsigned flags;
1903
1904 /*
1905 * The table of signals emitted by the type. These are grouped by signal
1906 * name.
1907 */
1909
1910 /* The name of the interface that the class defines. */
1911 const char *qt_interface;
1913
1914
1915#ifdef __cplusplus
1916}
1917#endif
1918
1919
1920#endif
struct _sipLongInstanceDef sipLongInstanceDef
struct _pyqt5QtSignal pyqt5QtSignal
int(* sipTraverseFunc)(void *, visitproc, void *)
Definition: build/sip.h:242
const sipAPIDef * sip_init_library(PyObject *mod_dict)
void(* sipWrapperVisitorFunc)(sipSimpleWrapper *, void *)
Definition: build/sip.h:268
void *(* sipAccessFunc)(sipSimpleWrapper *, AccessFuncOp)
Definition: build/sip.h:241
void(* sipReleaseBufferFuncLimited)(PyObject *, void *)
Definition: build/sip.h:245
sipVariableType
Definition: build/sip.h:698
@ ClassVariable
Definition: build/sip.h:701
@ InstanceVariable
Definition: build/sip.h:700
@ PropertyVariable
Definition: build/sip.h:699
struct _sipTypedefDef sipTypedefDef
struct _sipVoidPtrInstanceDef sipVoidPtrInstanceDef
int sip_gilstate_t
Definition: build/sip.h:163
union _sipImportedTypeDef sipImportedTypeDef
void(* sipAssignFunc)(void *, Py_ssize_t, void *)
Definition: build/sip.h:258
const sipTypeDef *(* sipSubClassConvertFunc)(void **)
Definition: build/sip.h:252
struct _sipMappedTypeDef sipMappedTypeDef
struct _sipLongLongInstanceDef sipLongLongInstanceDef
int(* sipVariableSetterFunc)(void *, PyObject *, PyObject *)
Definition: build/sip.h:265
struct _sipTypeInstanceDef sipTypeInstanceDef
struct _sipInitExtenderDef sipInitExtenderDef
int(* sipFinalFunc)(PyObject *, void *, PyObject *, PyObject **)
Definition: build/sip.h:240
void *(* sipInitFunc)(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **)
Definition: build/sip.h:238
int(* sipGetBufferFunc)(PyObject *, void *, Py_buffer *, int)
Definition: build/sip.h:247
struct _sipVariableDef sipVariableDef
struct _sipContainerDef sipContainerDef
void *(* sipArrayFunc)(Py_ssize_t)
Definition: build/sip.h:259
void * sipExceptionHandler
Definition: build/sip.h:37
void(* sipVirtErrorHandlerFunc)(sipSimpleWrapper *, sip_gilstate_t)
Definition: build/sip.h:255
int(* sipAttrGetterFunc)(const sipTypeDef *, PyObject *)
Definition: build/sip.h:263
sipPySlotType
Definition: build/sip.h:591
@ ne_slot
Definition: build/sip.h:633
@ mul_slot
Definition: build/sip.h:600
@ iadd_slot
Definition: build/sip.h:611
@ float_slot
Definition: build/sip.h:594
@ xor_slot
Definition: build/sip.h:608
@ lt_slot
Definition: build/sip.h:630
@ str_slot
Definition: build/sip.h:592
@ aiter_slot
Definition: build/sip.h:649
@ irshift_slot
Definition: build/sip.h:624
@ hash_slot
Definition: build/sip.h:639
@ rshift_slot
Definition: build/sip.h:610
@ gt_slot
Definition: build/sip.h:634
@ index_slot
Definition: build/sip.h:642
@ or_slot
Definition: build/sip.h:607
@ lshift_slot
Definition: build/sip.h:609
@ delitem_slot
Definition: build/sip.h:629
@ next_slot
Definition: build/sip.h:644
@ floordiv_slot
Definition: build/sip.h:604
@ le_slot
Definition: build/sip.h:631
@ div_slot
Definition: build/sip.h:602
@ itruediv_slot
Definition: build/sip.h:619
@ iter_slot
Definition: build/sip.h:643
@ matmul_slot
Definition: build/sip.h:646
@ bool_slot
Definition: build/sip.h:636
@ imatmul_slot
Definition: build/sip.h:647
@ iconcat_slot
Definition: build/sip.h:612
@ abs_slot
Definition: build/sip.h:641
@ mod_slot
Definition: build/sip.h:603
@ irepeat_slot
Definition: build/sip.h:615
@ ge_slot
Definition: build/sip.h:635
@ ixor_slot
Definition: build/sip.h:622
@ neg_slot
Definition: build/sip.h:637
@ anext_slot
Definition: build/sip.h:650
@ imod_slot
Definition: build/sip.h:617
@ imul_slot
Definition: build/sip.h:614
@ await_slot
Definition: build/sip.h:648
@ pos_slot
Definition: build/sip.h:640
@ concat_slot
Definition: build/sip.h:598
@ repeat_slot
Definition: build/sip.h:601
@ int_slot
Definition: build/sip.h:593
@ sub_slot
Definition: build/sip.h:599
@ repr_slot
Definition: build/sip.h:638
@ getitem_slot
Definition: build/sip.h:627
@ truediv_slot
Definition: build/sip.h:605
@ idiv_slot
Definition: build/sip.h:616
@ eq_slot
Definition: build/sip.h:632
@ ior_slot
Definition: build/sip.h:621
@ ilshift_slot
Definition: build/sip.h:623
@ add_slot
Definition: build/sip.h:597
@ invert_slot
Definition: build/sip.h:625
@ call_slot
Definition: build/sip.h:626
@ iand_slot
Definition: build/sip.h:620
@ ifloordiv_slot
Definition: build/sip.h:618
@ isub_slot
Definition: build/sip.h:613
@ setitem_slot
Definition: build/sip.h:628
@ len_slot
Definition: build/sip.h:595
@ setattr_slot
Definition: build/sip.h:645
@ and_slot
Definition: build/sip.h:606
@ contains_slot
Definition: build/sip.h:596
AccessFuncOp
Definition: build/sip.h:228
@ GuardedPointer
Definition: build/sip.h:230
@ UnguardedPointer
Definition: build/sip.h:229
@ ReleaseGuard
Definition: build/sip.h:231
int(* pyqt5EmitFunc)(void *, PyObject *)
Definition: build/sip.h:1868
struct _sipPySlotDef sipPySlotDef
struct _sipImportedModuleDef sipImportedModuleDef
void(* sipWrappedInstanceEventHandler)(void *sipCpp)
Definition: build/sip.h:220
void *(* sipCastFunc)(void *, const sipTypeDef *)
Definition: build/sip.h:251
struct _sipDelayedDtor sipDelayedDtor
struct _sipQtAPI sipQtAPI
struct _sipAPIDef sipAPIDef
struct _sipLicenseDef sipLicenseDef
int(* sipVirtHandlerFunc)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,...)
Definition: build/sip.h:256
struct _sipCharInstanceDef sipCharInstanceDef
struct _sipInstancesDef sipInstancesDef
unsigned int uint
Definition: build/sip.h:82
struct _sipEnumTypeDef sipEnumTypeDef
void(* sipCollectingWrapperEventHandler)(sipSimpleWrapper *sipSelf)
Definition: build/sip.h:221
PyObject *(* sipConvertFromFunc)(void *, PyObject *)
Definition: build/sip.h:254
int(* sipConvertToFunc)(PyObject *, void **, int *, PyObject *)
Definition: build/sip.h:253
struct _sipPySlotExtenderDef sipPySlotExtenderDef
void *(* sipCopyFunc)(const void *, Py_ssize_t)
Definition: build/sip.h:260
sipEventType
Definition: build/sip.h:211
@ sipEventNrEvents
Definition: build/sip.h:214
@ sipEventWrappedInstance
Definition: build/sip.h:212
@ sipEventCollectingWrapper
Definition: build/sip.h:213
struct _sipEncodedTypeDef sipEncodedTypeDef
sipErrorState
Definition: build/sip.h:580
@ sipErrorNone
Definition: build/sip.h:581
@ sipErrorFail
Definition: build/sip.h:582
@ sipErrorContinue
Definition: build/sip.h:583
struct _sipStringInstanceDef sipStringInstanceDef
void(* sipReleaseFunc)(void *, int)
Definition: build/sip.h:261
sipTypeDef sipMappedType
Definition: build/sip.h:956
struct _pyqt5ClassPluginDef pyqt5ClassPluginDef
struct _sipVersionedFunctionDef sipVersionedFunctionDef
int(* sipGetBufferFuncLimited)(PyObject *, void *, sipBufferDef *)
Definition: build/sip.h:244
struct _sipSlot sipSlot
struct _sipStringTypeClassMap sipStringTypeClassMap
struct _pyqt4ClassPluginDef pyqt4ClassPluginDef
void(* sipDeallocFunc)(sipSimpleWrapper *)
Definition: build/sip.h:250
struct _sipVirtErrorHandlerDef sipVirtErrorHandlerDef
int(* sipNewUserTypeFunc)(sipWrapperType *)
Definition: build/sip.h:267
struct _sipIntTypeClassMap sipIntTypeClassMap
void *(* sipProxyResolverFunc)(void *)
Definition: build/sip.h:266
struct _sipClassTypeDef sipClassTypeDef
struct _sipEnumMemberDef sipEnumMemberDef
PyObject *(* sipPickleFunc)(void *)
Definition: build/sip.h:262
struct _sipExternalTypeDef sipExternalTypeDef
union _sipImportedVirtErrorHandlerDef sipImportedVirtErrorHandlerDef
union _sipImportedExceptionDef sipImportedExceptionDef
struct _sipIntInstanceDef sipIntInstanceDef
struct _sipUnsignedLongLongInstanceDef sipUnsignedLongLongInstanceDef
struct _sipSubClassConvertorDef sipSubClassConvertorDef
struct _sipExportedModuleDef sipExportedModuleDef
struct _sipUnsignedLongInstanceDef sipUnsignedLongInstanceDef
void(* sipReleaseBufferFunc)(PyObject *, void *, Py_buffer *)
Definition: build/sip.h:248
struct _pyqt4QtSignal pyqt4QtSignal
struct _sipPyMethod sipPyMethod
int(* sipClearFunc)(void *)
Definition: build/sip.h:243
struct _sipDoubleInstanceDef sipDoubleInstanceDef
const void * static_metaobject
Definition: build/sip.h:1844
const pyqt4QtSignal * qt_signals
Definition: build/sip.h:1856
const char * docstring
Definition: build/sip.h:1819
const char * signature
Definition: build/sip.h:1816
PyMethodDef * non_signals
Definition: build/sip.h:1825
const void * static_metaobject
Definition: build/sip.h:1896
const pyqt5QtSignal * qt_signals
Definition: build/sip.h:1908
const char * qt_interface
Definition: build/sip.h:1911
const char * docstring
Definition: build/sip.h:1875
const char * signature
Definition: build/sip.h:1872
pyqt5EmitFunc emitter
Definition: build/sip.h:1887
PyMethodDef * non_signals
Definition: build/sip.h:1881
int(* api_convert_to_bool)(PyObject *obj)
Definition: build/sip.h:1618
void(* api_end_thread)(void)
Definition: build/sip.h:1533
int(* api_init_module)(sipExportedModuleDef *client, PyObject *mod_dict)
Definition: build/sip.h:1508
int(* api_register_event_handler)(sipEventType type, const sipTypeDef *td, void *handler)
Definition: build/sip.h:1615
void(* api_abstract_method)(const char *classname, const char *method)
Definition: build/sip.h:1526
Py_ssize_t(* api_convert_from_sequence_index)(Py_ssize_t idx, Py_ssize_t len)
Definition: build/sip.h:1411
char(* api_long_as_char)(PyObject *o)
Definition: build/sip.h:1620
void * api_long_as_unsigned_long_long
Definition: build/sip.h:1633
int(* api_long_as_int)(PyObject *o)
Definition: build/sip.h:1625
void(* api_set_user_object)(sipSimpleWrapper *, PyObject *)
Definition: build/sip.h:1503
int(* api_visit_slot)(sipSlot *slot, visitproc visit, void *arg)
Definition: build/sip.h:1597
int(* api_deprecated)(const char *classname, const char *method)
Definition: build/sip.h:1558
void(* api_transfer_back)(PyObject *self)
Definition: build/sip.h:1443
void(* api_add_delayed_dtor)(sipSimpleWrapper *w)
Definition: build/sip.h:1542
int(* api_convert_from_slice_object)(PyObject *slice, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength)
Definition: build/sip.h:1644
void(* api_free_sipslot)(sipSlot *slot)
Definition: build/sip.h:1587
int(* api_unicode_as_wchar)(PyObject *obj)
Definition: build/sip.h:1555
void(* api_print_object)(PyObject *o)
Definition: build/sip.h:1614
void(* api_set_destroy_on_exit)(int)
Definition: build/sip.h:1466
int(* api_save_slot)(sipSlot *sp, PyObject *rxObj, const char *slot)
Definition: build/sip.h:1595
void(* api_release_buffer_info)(sipBufferInfoDef *)
Definition: build/sip.h:1501
int(* api_register_py_type)(PyTypeObject *type)
Definition: build/sip.h:1457
int(* api_export_module)(sipExportedModuleDef *client, unsigned api_major, unsigned api_minor, void *unused)
Definition: build/sip.h:1391
int(* api_export_symbol)(const char *name, void *sym)
Definition: build/sip.h:1454
int(* api_parse_args)(PyObject **parseErrp, PyObject *sipArgs, const char *fmt,...)
Definition: build/sip.h:1509
int(* api_parse_result)(int *isErr, PyObject *method, PyObject *res, const char *fmt,...)
Definition: build/sip.h:1440
void(* api_keep_reference)(PyObject *self, int key, PyObject *obj)
Definition: build/sip.h:1559
sipErrorState(* api_bad_callable_arg)(int arg_nr, PyObject *arg)
Definition: build/sip.h:1464
int(* api_convert_to_enum)(PyObject *obj, const sipTypeDef *td)
Definition: build/sip.h:1617
PyTypeObject * api_wrapper_type
Definition: build/sip.h:1398
int(* api_register_proxy_resolver)(const sipTypeDef *td, sipProxyResolverFunc resolver)
Definition: build/sip.h:1476
int(* api_init_mixin)(PyObject *self, PyObject *args, PyObject *kwds, const sipClassTypeDef *ctd)
Definition: build/sip.h:1569
void(* api_unicode_write)(int, void *, int, unsigned)
Definition: build/sip.h:1498
void(* api_instance_destroyed_ex)(sipSimpleWrapper **sipSelfp)
Definition: build/sip.h:1639
int(* api_is_api_enabled)(const char *name, int from, int to)
Definition: build/sip.h:1463
int(* api_can_convert_to_type)(PyObject *pyObj, const sipTypeDef *td, int flags)
Definition: build/sip.h:1413
char(* api_string_as_utf8_char)(PyObject *obj)
Definition: build/sip.h:1549
sipNewUserTypeFunc(* api_set_new_user_type_handler)(const sipTypeDef *, sipNewUserTypeFunc)
Definition: build/sip.h:1479
int(* api_get_time)(PyObject *, sipTimeDef *)
Definition: build/sip.h:1492
int(* api_check_plugin_for_type)(const sipTypeDef *, const char *)
Definition: build/sip.h:1496
int(* api_get_state)(PyObject *transferObj)
Definition: build/sip.h:1434
int(* api_enable_overflow_checking)(int enable)
Definition: build/sip.h:1619
int(* api_get_date)(PyObject *, sipDateDef *)
Definition: build/sip.h:1488
void(* api_release_type)(void *cpp, const sipTypeDef *td, int state)
Definition: build/sip.h:1428
void(* api_bad_class)(const char *classname)
Definition: build/sip.h:1527
int(* api_parse_pair)(PyObject **parseErrp, PyObject *arg0, PyObject *arg1, const char *fmt,...)
Definition: build/sip.h:1511
sipExceptionHandler(* api_next_exception_handler)(void **statep)
Definition: build/sip.h:1656
void(* api_no_method)(PyObject *parseErr, const char *scope, const char *method, const char *doc)
Definition: build/sip.h:1524
void * api_long_as_long_long
Definition: build/sip.h:1632
PyTypeObject * api_wrappertype_type
Definition: build/sip.h:1399
int(* api_is_owned_by_python)(sipSimpleWrapper *)
Definition: build/sip.h:1576
size_t(* api_long_as_size_t)(PyObject *o)
Definition: build/sip.h:1647
void(* api_no_function)(PyObject *parseErr, const char *func, const char *doc)
Definition: build/sip.h:1522
unsigned short(* api_long_as_unsigned_short)(PyObject *o)
Definition: build/sip.h:1624
int(* api_get_buffer_info)(PyObject *, sipBufferInfoDef *)
Definition: build/sip.h:1500
short(* api_long_as_short)(PyObject *o)
Definition: build/sip.h:1623
char(* api_string_as_latin1_char)(PyObject *obj)
Definition: build/sip.h:1547
void(* api_transfer_break)(PyObject *self)
Definition: build/sip.h:1445
signed char(* api_long_as_signed_char)(PyObject *o)
Definition: build/sip.h:1621
unsigned long(* api_long_as_unsigned_long)(PyObject *o)
Definition: build/sip.h:1446
void(* api_call_procedure_method)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const char *,...)
Definition: build/sip.h:1407
void(* api_call_error_handler)(sipVirtErrorHandlerFunc, sipSimpleWrapper *, sip_gilstate_t)
Definition: build/sip.h:1567
void(* api_call_hook)(const char *hookname)
Definition: build/sip.h:1532
int(* api_register_attribute_getter)(const sipTypeDef *td, sipAttrGetterFunc getter)
Definition: build/sip.h:1461
void(* api_transfer_to)(PyObject *self, PyObject *owner)
Definition: build/sip.h:1444
void(* api_trace)(unsigned mask, const char *fmt,...)
Definition: build/sip.h:1442
void(* api_bad_operator_arg)(PyObject *self, PyObject *arg, sipPySlotType st)
Definition: build/sip.h:1538
int(* api_is_derived_class)(sipSimpleWrapper *)
Definition: build/sip.h:1581
int(* api_get_c_function)(PyObject *, sipCFunctionDef *)
Definition: build/sip.h:1487
int(* api_same_slot)(const sipSlot *sp, PyObject *rxObj, const char *slot)
Definition: build/sip.h:1588
int(* api_get_datetime)(PyObject *, sipDateDef *, sipTimeDef *)
Definition: build/sip.h:1490
void(* api_add_exception)(sipErrorState es, PyObject **parseErrp)
Definition: build/sip.h:1563
void(* api_bad_length_for_slice)(Py_ssize_t seqlen, Py_ssize_t slicelen)
Definition: build/sip.h:1403
void(* api_set_type_user_data)(sipWrapperType *, void *)
Definition: build/sip.h:1481
void(* api_visit_wrappers)(sipWrapperVisitorFunc visitor, void *closure)
Definition: build/sip.h:1648
int(* api_register_exit_notifier)(PyMethodDef *md)
Definition: build/sip.h:1649
int(* api_add_type_instance)(PyObject *dict, const char *name, void *cppPtr, const sipTypeDef *td)
Definition: build/sip.h:1536
void(* api_bad_catcher_result)(PyObject *method)
Definition: build/sip.h:1402
void(* api_raise_type_exception)(const sipTypeDef *td, void *ptr)
Definition: build/sip.h:1535
int(* api_enable_autoconversion)(const sipTypeDef *td, int enable)
Definition: build/sip.h:1467
void(* api_free)(void *mem)
Definition: build/sip.h:1437
void(* api_raise_unknown_exception)(void)
Definition: build/sip.h:1534
int(* api_parse_kwd_args)(PyObject **parseErrp, PyObject *sipArgs, PyObject *sipKwdArgs, const char **kwdlist, PyObject **unused, const char *fmt,...)
Definition: build/sip.h:1560
int(* api_is_user_type)(const sipWrapperType *)
Definition: build/sip.h:1494
PyTypeObject * api_simplewrapper_type
Definition: build/sip.h:1397
void(* api_clear_any_slot_reference)(sipSlot *slot)
Definition: build/sip.h:1596
int(* api_can_convert_to_enum)(PyObject *pyObj, const sipTypeDef *td)
Definition: build/sip.h:1423
long(* api_long_as_long)(PyObject *o)
Definition: build/sip.h:1627
unsigned int(* api_long_as_unsigned_int)(PyObject *o)
Definition: build/sip.h:1626
int(* api_enable_gc)(int enable)
Definition: build/sip.h:1613
unsigned char(* api_long_as_unsigned_char)(PyObject *o)
Definition: build/sip.h:1622
char(* api_bytes_as_char)(PyObject *obj)
Definition: build/sip.h:1543
void(* api_instance_destroyed)(sipSimpleWrapper *sipSelf)
Definition: build/sip.h:1517
int(* api_parse_result_ex)(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *method, PyObject *res, const char *fmt,...)
Definition: build/sip.h:1564
PyTypeObject * api_voidptr_type
Definition: build/sip.h:1400
char(* api_string_as_ascii_char)(PyObject *obj)
Definition: build/sip.h:1545
int(* api_get_method)(PyObject *, sipMethodDef *)
Definition: build/sip.h:1485
void * bd_buffer
Definition: build/sip.h:486
Py_ssize_t bd_length
Definition: build/sip.h:489
void * bi_internal
Definition: build/sip.h:501
PyObject * bi_obj
Definition: build/sip.h:507
Py_ssize_t bi_len
Definition: build/sip.h:510
PyObject * cf_self
Definition: build/sip.h:528
PyMethodDef * cf_function
Definition: build/sip.h:525
const char * ci_name
Definition: build/sip.h:1192
sipDeallocFunc ctd_dealloc
Definition: build/sip.h:854
sipGetBufferFunc ctd_getbuffer
Definition: build/sip.h:843
sipConvertToFunc ctd_cto
Definition: build/sip.h:872
const char * ctd_docstring
Definition: build/sip.h:813
sipCopyFunc ctd_copy
Definition: build/sip.h:863
sipClearFunc ctd_clear
Definition: build/sip.h:837
sipFinalFunc ctd_final
Definition: build/sip.h:884
sipConvertFromFunc ctd_cfrom
Definition: build/sip.h:875
sipTypeDef ctd_base
Definition: build/sip.h:807
sipReleaseBufferFunc ctd_releasebuffer
Definition: build/sip.h:850
sipInitFunc ctd_init
Definition: build/sip.h:831
sipPickleFunc ctd_pickle
Definition: build/sip.h:881
sipReleaseFunc ctd_release
Definition: build/sip.h:866
sipEncodedTypeDef * ctd_supers
Definition: build/sip.h:825
sipContainerDef ctd_container
Definition: build/sip.h:810
sipArrayFunc ctd_array
Definition: build/sip.h:860
sipAssignFunc ctd_assign
Definition: build/sip.h:857
initproc ctd_init_mixin
Definition: build/sip.h:887
sipTraverseFunc ctd_traverse
Definition: build/sip.h:834
struct _sipClassTypeDef * ctd_nsextender
Definition: build/sip.h:878
sipPySlotDef * ctd_pyslots
Definition: build/sip.h:828
sipCastFunc ctd_cast
Definition: build/sip.h:869
PyMethodDef * cod_methods
Definition: build/sip.h:783
sipVariableDef * cod_variables
Definition: build/sip.h:795
sipInstancesDef cod_instances
Definition: build/sip.h:798
sipEnumMemberDef * cod_enummembers
Definition: build/sip.h:789
sipEncodedTypeDef cod_scope
Definition: build/sip.h:777
int pd_month
Definition: build/sip.h:552
struct _sipDelayedDtor * dd_next
Definition: build/sip.h:973
const char * dd_name
Definition: build/sip.h:967
const char * di_name
Definition: build/sip.h:1297
unsigned sc_type
Definition: build/sip.h:387
unsigned sc_flag
Definition: build/sip.h:393
unsigned sc_module
Definition: build/sip.h:390
const char * em_name
Definition: build/sip.h:402
struct _sipPySlotDef * etd_pyslots
Definition: build/sip.h:935
sipTypeDef etd_base
Definition: build/sip.h:926
struct _sipTypeDef * type
Definition: build/sip.h:377
PyHeapTypeObject super
Definition: build/sip.h:374
sipTypedefDef * em_typedefs
Definition: build/sip.h:1110
sipVirtErrorHandlerDef * em_virterrorhandlers
Definition: build/sip.h:1113
sipInstancesDef em_instances
Definition: build/sip.h:1119
sipExternalTypeDef * em_external
Definition: build/sip.h:1098
sipSubClassConvertorDef * em_convertors
Definition: build/sip.h:1116
PyObject ** em_exceptions
Definition: build/sip.h:1125
void(* em_delayeddtors)(const sipDelayedDtor *)
Definition: build/sip.h:1134
sipPySlotExtenderDef * em_slotextend
Definition: build/sip.h:1128
struct _sipQtAPI * em_qt_api
Definition: build/sip.h:1089
struct _sipLicenseDef * em_license
Definition: build/sip.h:1122
sipInitExtenderDef * em_initextend
Definition: build/sip.h:1131
struct _sipExportedModuleDef * em_next
Definition: build/sip.h:1071
const char * em_strings
Definition: build/sip.h:1083
sipEnumMemberDef * em_enummembers
Definition: build/sip.h:1104
PyObject * em_nameobj
Definition: build/sip.h:1080
sipImportedModuleDef * em_imports
Definition: build/sip.h:1086
sipVersionedFunctionDef * em_versioned_functions
Definition: build/sip.h:1149
sipDelayedDtor * em_ddlist
Definition: build/sip.h:1137
sipExceptionHandler em_exception_handler
Definition: build/sip.h:1152
sipTypeDef ** em_types
Definition: build/sip.h:1095
const char * et_name
Definition: build/sip.h:947
const char * im_name
Definition: build/sip.h:1053
sipImportedExceptionDef * im_imported_exceptions
Definition: build/sip.h:1062
sipImportedTypeDef * im_imported_types
Definition: build/sip.h:1056
sipImportedVirtErrorHandlerDef * im_imported_veh
Definition: build/sip.h:1059
sipEncodedTypeDef ie_class
Definition: build/sip.h:459
struct _sipInitExtenderDef * ie_next
Definition: build/sip.h:462
sipInitFunc ie_extender
Definition: build/sip.h:456
struct _sipTypeInstanceDef * id_type
Definition: build/sip.h:417
struct _sipCharInstanceDef * id_char
Definition: build/sip.h:423
struct _sipVoidPtrInstanceDef * id_voidp
Definition: build/sip.h:420
struct _sipUnsignedLongLongInstanceDef * id_ullong
Definition: build/sip.h:441
struct _sipStringInstanceDef * id_string
Definition: build/sip.h:426
struct _sipLongLongInstanceDef * id_llong
Definition: build/sip.h:438
struct _sipIntInstanceDef * id_int
Definition: build/sip.h:429
struct _sipLongInstanceDef * id_long
Definition: build/sip.h:432
struct _sipUnsignedLongInstanceDef * id_ulong
Definition: build/sip.h:435
struct _sipDoubleInstanceDef * id_double
Definition: build/sip.h:444
const char * ii_name
Definition: build/sip.h:1227
struct _sipWrapperType ** pyType
Definition: build/sip.h:1347
const char * lc_type
Definition: build/sip.h:1161
const char * lc_timestamp
Definition: build/sip.h:1167
const char * lc_signature
Definition: build/sip.h:1170
const char * lc_licensee
Definition: build/sip.h:1164
const char * li_name
Definition: build/sip.h:1239
const char * lli_name
Definition: build/sip.h:1264
sipContainerDef mtd_container
Definition: build/sip.h:899
sipArrayFunc mtd_array
Definition: build/sip.h:905
sipReleaseFunc mtd_release
Definition: build/sip.h:911
sipConvertFromFunc mtd_cfrom
Definition: build/sip.h:917
sipCopyFunc mtd_copy
Definition: build/sip.h:908
sipTypeDef mtd_base
Definition: build/sip.h:896
sipConvertToFunc mtd_cto
Definition: build/sip.h:914
sipAssignFunc mtd_assign
Definition: build/sip.h:902
PyObject * pm_function
Definition: build/sip.h:537
PyObject * pm_self
Definition: build/sip.h:540
PyObject * mself
Definition: build/sip.h:1360
PyObject * mfunc
Definition: build/sip.h:1357
void * psd_func
Definition: build/sip.h:659
sipPySlotType psd_type
Definition: build/sip.h:662
sipEncodedTypeDef pse_class
Definition: build/sip.h:677
sipPySlotType pse_type
Definition: build/sip.h:674
int(* qt_connect)(void *, const char *, void *, const char *, int)
Definition: build/sip.h:1674
void(* qt_destroy_universal_slot)(void *)
Definition: build/sip.h:1671
void(* qt_disconnect_py_signal)(PyObject *, const char *, PyObject *, const char *)
Definition: build/sip.h:1681
int(* qt_same_name)(const char *, const char *)
Definition: build/sip.h:1676
int(* qt_connect_py_signal)(PyObject *, const char *, PyObject *, const char *)
Definition: build/sip.h:1679
sipTypeDef ** qt_qobject
Definition: build/sip.h:1666
int(* qt_emit_signal)(PyObject *, const char *, PyObject *)
Definition: build/sip.h:1678
int(* qt_disconnect)(void *, const char *, void *, const char *)
Definition: build/sip.h:1675
PyObject_HEAD void * data
Definition: build/sip.h:318
unsigned sw_flags
Definition: build/sip.h:324
PyObject * extra_refs
Definition: build/sip.h:327
PyObject * user
Definition: build/sip.h:330
PyObject * dict
Definition: build/sip.h:333
struct _sipSimpleWrapper * next
Definition: build/sip.h:339
sipAccessFunc access_func
Definition: build/sip.h:321
PyObject * mixin_main
Definition: build/sip.h:336
char * name
Definition: build/sip.h:1369
PyObject * pyobj
Definition: build/sip.h:1372
PyObject * weakSlot
Definition: build/sip.h:1378
sipPyMethod meth
Definition: build/sip.h:1375
const char * si_val
Definition: build/sip.h:1212
const char * si_name
Definition: build/sip.h:1209
const char * typeString
Definition: build/sip.h:1330
struct _sipWrapperType ** pyType
Definition: build/sip.h:1333
sipEncodedTypeDef scc_base
Definition: build/sip.h:474
struct _sipTypeDef * scc_basetype
Definition: build/sip.h:477
sipSubClassConvertFunc scc_convertor
Definition: build/sip.h:471
int pt_minute
Definition: build/sip.h:567
int pt_microsecond
Definition: build/sip.h:573
int pt_second
Definition: build/sip.h:570
int td_cname
Definition: build/sip.h:752
void * td_plugin_data
Definition: build/sip.h:758
PyTypeObject * td_py_type
Definition: build/sip.h:755
struct _sipExportedModuleDef * td_module
Definition: build/sip.h:746
int td_flags
Definition: build/sip.h:749
int td_version
Definition: build/sip.h:738
struct _sipTypeDef * td_next_version
Definition: build/sip.h:741
struct _sipTypeDef ** ti_type
Definition: build/sip.h:1316
const char * ti_name
Definition: build/sip.h:1310
const char * tdd_type_name
Definition: build/sip.h:689
const char * tdd_name
Definition: build/sip.h:686
const char * vd_name
Definition: build/sip.h:709
PyMethodDef * vd_getter
Definition: build/sip.h:715
const char * vd_docstring
Definition: build/sip.h:728
PyMethodDef * vd_deleter
Definition: build/sip.h:725
sipVariableType vd_type
Definition: build/sip.h:706
PyMethodDef * vd_setter
Definition: build/sip.h:722
const char * vf_docstring
Definition: build/sip.h:993
PyCFunction vf_function
Definition: build/sip.h:987
sipVirtErrorHandlerFunc veh_handler
Definition: build/sip.h:1008
const char * veh_name
Definition: build/sip.h:1005
const char * vi_name
Definition: build/sip.h:1180
sipTypeDef * wt_td
Definition: build/sip.h:292
PyHeapTypeObject super
Definition: build/sip.h:280
void * wt_user_data
Definition: build/sip.h:304
struct _sipInitExtenderDef * wt_iextend
Definition: build/sip.h:295
unsigned wt_dict_complete
Definition: build/sip.h:286
unsigned wt_user_type
Definition: build/sip.h:283
sipNewUserTypeFunc wt_new_user_type_handler
Definition: build/sip.h:298
unsigned wt_unused
Definition: build/sip.h:289
struct _sipWrapper * sibling_next
Definition: build/sip.h:354
sipSimpleWrapper super
Definition: build/sip.h:348
struct _sipWrapper * parent
Definition: build/sip.h:360
struct _sipWrapper * first_child
Definition: build/sip.h:351
struct _sipWrapper * sibling_prev
Definition: build/sip.h:357
static const char * name
Definition: tkMain.c:135
const char * iexc_name
Definition: build/sip.h:1041
const char * it_name
Definition: build/sip.h:1017
sipTypeDef * it_td
Definition: build/sip.h:1020
sipVirtErrorHandlerFunc iveh_handler
Definition: build/sip.h:1032