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