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