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