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