@@ -181,7 +181,7 @@ static PyTypeObject DictRemover_Type = {
181
181
0 , /* tp_as_buffer */
182
182
/* XXX should participate in GC? */
183
183
Py_TPFLAGS_DEFAULT , /* tp_flags */
184
- "deletes a key from a dictionary" , /* tp_doc */
184
+ PyDoc_STR ( "deletes a key from a dictionary" ), /* tp_doc */
185
185
0 , /* tp_traverse */
186
186
0 , /* tp_clear */
187
187
0 , /* tp_richcompare */
@@ -563,8 +563,8 @@ UnionType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
563
563
return StructUnionType_new (type , args , kwds , 0 );
564
564
}
565
565
566
- static const char from_address_doc [] =
567
- "C.from_address(integer) -> C instance\naccess a C instance at the specified address" ;
566
+ PyDoc_STRVAR ( from_address_doc ,
567
+ "C.from_address(integer) -> C instance\naccess a C instance at the specified address" ) ;
568
568
569
569
static PyObject *
570
570
CDataType_from_address (PyObject * type , PyObject * value )
@@ -581,8 +581,8 @@ CDataType_from_address(PyObject *type, PyObject *value)
581
581
return PyCData_AtAddress (type , buf );
582
582
}
583
583
584
- static const char from_buffer_doc [] =
585
- "C.from_buffer(object, offset=0) -> C instance\ncreate a C instance from a writeable buffer" ;
584
+ PyDoc_STRVAR ( from_buffer_doc ,
585
+ "C.from_buffer(object, offset=0) -> C instance\ncreate a C instance from a writeable buffer" ) ;
586
586
587
587
static int
588
588
KeepRef (CDataObject * target , Py_ssize_t index , PyObject * keep );
@@ -661,8 +661,8 @@ CDataType_from_buffer(PyObject *type, PyObject *args)
661
661
return result ;
662
662
}
663
663
664
- static const char from_buffer_copy_doc [] =
665
- "C.from_buffer_copy(object, offset=0) -> C instance\ncreate a C instance from a readable buffer" ;
664
+ PyDoc_STRVAR ( from_buffer_copy_doc ,
665
+ "C.from_buffer_copy(object, offset=0) -> C instance\ncreate a C instance from a readable buffer" ) ;
666
666
667
667
static PyObject *
668
668
GenericPyCData_new (PyTypeObject * type , PyObject * args , PyObject * kwds );
@@ -712,8 +712,8 @@ CDataType_from_buffer_copy(PyObject *type, PyObject *args)
712
712
return result ;
713
713
}
714
714
715
- static const char in_dll_doc [] =
716
- "C.in_dll(dll, name) -> C instance\naccess a C instance in a dll" ;
715
+ PyDoc_STRVAR ( in_dll_doc ,
716
+ "C.in_dll(dll, name) -> C instance\naccess a C instance in a dll" ) ;
717
717
718
718
static PyObject *
719
719
CDataType_in_dll (PyObject * type , PyObject * args )
@@ -774,8 +774,8 @@ CDataType_in_dll(PyObject *type, PyObject *args)
774
774
return PyCData_AtAddress (type , address );
775
775
}
776
776
777
- static const char from_param_doc [] =
778
- "Convert a Python object into a function call parameter." ;
777
+ PyDoc_STRVAR ( from_param_doc ,
778
+ "Convert a Python object into a function call parameter." ) ;
779
779
780
780
static PyObject *
781
781
CDataType_from_param (PyObject * type , PyObject * value )
@@ -929,7 +929,7 @@ PyTypeObject PyCStructType_Type = {
929
929
PyCStructType_setattro , /* tp_setattro */
930
930
0 , /* tp_as_buffer */
931
931
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC , /* tp_flags */
932
- "metatype for the CData Objects" , /* tp_doc */
932
+ PyDoc_STR ( "metatype for the CData Objects" ), /* tp_doc */
933
933
(traverseproc )CDataType_traverse , /* tp_traverse */
934
934
(inquiry )CDataType_clear , /* tp_clear */
935
935
0 , /* tp_richcompare */
@@ -971,7 +971,7 @@ static PyTypeObject UnionType_Type = {
971
971
UnionType_setattro , /* tp_setattro */
972
972
0 , /* tp_as_buffer */
973
973
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC , /* tp_flags */
974
- "metatype for the CData Objects" , /* tp_doc */
974
+ PyDoc_STR ( "metatype for the CData Objects" ), /* tp_doc */
975
975
(traverseproc )CDataType_traverse , /* tp_traverse */
976
976
(inquiry )CDataType_clear , /* tp_clear */
977
977
0 , /* tp_richcompare */
@@ -1229,7 +1229,7 @@ PyTypeObject PyCPointerType_Type = {
1229
1229
0 , /* tp_setattro */
1230
1230
0 , /* tp_as_buffer */
1231
1231
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC , /* tp_flags */
1232
- "metatype for the Pointer Objects" , /* tp_doc */
1232
+ PyDoc_STR ( "metatype for the Pointer Objects" ), /* tp_doc */
1233
1233
(traverseproc )CDataType_traverse , /* tp_traverse */
1234
1234
(inquiry )CDataType_clear , /* tp_clear */
1235
1235
0 , /* tp_richcompare */
@@ -1651,7 +1651,7 @@ PyTypeObject PyCArrayType_Type = {
1651
1651
0 , /* tp_setattro */
1652
1652
0 , /* tp_as_buffer */
1653
1653
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , /* tp_flags */
1654
- "metatype for the Array Objects" , /* tp_doc */
1654
+ PyDoc_STR ( "metatype for the Array Objects" ), /* tp_doc */
1655
1655
0 , /* tp_traverse */
1656
1656
0 , /* tp_clear */
1657
1657
0 , /* tp_richcompare */
@@ -2345,7 +2345,7 @@ PyTypeObject PyCSimpleType_Type = {
2345
2345
0 , /* tp_setattro */
2346
2346
0 , /* tp_as_buffer */
2347
2347
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , /* tp_flags */
2348
- "metatype for the PyCSimpleType Objects" , /* tp_doc */
2348
+ PyDoc_STR ( "metatype for the PyCSimpleType Objects" ), /* tp_doc */
2349
2349
0 , /* tp_traverse */
2350
2350
0 , /* tp_clear */
2351
2351
0 , /* tp_richcompare */
@@ -2627,7 +2627,7 @@ PyTypeObject PyCFuncPtrType_Type = {
2627
2627
0 , /* tp_setattro */
2628
2628
0 , /* tp_as_buffer */
2629
2629
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC , /* tp_flags */
2630
- "metatype for C function pointers" , /* tp_doc */
2630
+ PyDoc_STR ( "metatype for C function pointers" ), /* tp_doc */
2631
2631
(traverseproc )CDataType_traverse , /* tp_traverse */
2632
2632
(inquiry )CDataType_clear , /* tp_clear */
2633
2633
0 , /* tp_richcompare */
@@ -2932,7 +2932,7 @@ PyTypeObject PyCData_Type = {
2932
2932
0 , /* tp_setattro */
2933
2933
& PyCData_as_buffer , /* tp_as_buffer */
2934
2934
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , /* tp_flags */
2935
- "XXX to be provided" , /* tp_doc */
2935
+ PyDoc_STR ( "XXX to be provided" ), /* tp_doc */
2936
2936
(traverseproc )PyCData_traverse , /* tp_traverse */
2937
2937
(inquiry )PyCData_clear , /* tp_clear */
2938
2938
0 , /* tp_richcompare */
@@ -4327,7 +4327,7 @@ PyTypeObject PyCFuncPtr_Type = {
4327
4327
0 , /* tp_setattro */
4328
4328
& PyCData_as_buffer , /* tp_as_buffer */
4329
4329
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , /* tp_flags */
4330
- "Function Pointer" , /* tp_doc */
4330
+ PyDoc_STR ( "Function Pointer" ), /* tp_doc */
4331
4331
(traverseproc )PyCFuncPtr_traverse , /* tp_traverse */
4332
4332
(inquiry )PyCFuncPtr_clear , /* tp_clear */
4333
4333
0 , /* tp_richcompare */
@@ -4481,7 +4481,7 @@ static PyTypeObject Struct_Type = {
4481
4481
0 , /* tp_setattro */
4482
4482
& PyCData_as_buffer , /* tp_as_buffer */
4483
4483
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , /* tp_flags */
4484
- "Structure base class" , /* tp_doc */
4484
+ PyDoc_STR ( "Structure base class" ), /* tp_doc */
4485
4485
(traverseproc )PyCData_traverse , /* tp_traverse */
4486
4486
(inquiry )PyCData_clear , /* tp_clear */
4487
4487
0 , /* tp_richcompare */
@@ -4523,7 +4523,7 @@ static PyTypeObject Union_Type = {
4523
4523
0 , /* tp_setattro */
4524
4524
& PyCData_as_buffer , /* tp_as_buffer */
4525
4525
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , /* tp_flags */
4526
- "Union base class" , /* tp_doc */
4526
+ PyDoc_STR ( "Union base class" ), /* tp_doc */
4527
4527
(traverseproc )PyCData_traverse , /* tp_traverse */
4528
4528
(inquiry )PyCData_clear , /* tp_clear */
4529
4529
0 , /* tp_richcompare */
@@ -4845,7 +4845,7 @@ PyTypeObject PyCArray_Type = {
4845
4845
0 , /* tp_setattro */
4846
4846
& PyCData_as_buffer , /* tp_as_buffer */
4847
4847
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , /* tp_flags */
4848
- "XXX to be provided" , /* tp_doc */
4848
+ PyDoc_STR ( "XXX to be provided" ), /* tp_doc */
4849
4849
(traverseproc )PyCData_traverse , /* tp_traverse */
4850
4850
(inquiry )PyCData_clear , /* tp_clear */
4851
4851
0 , /* tp_richcompare */
@@ -5064,7 +5064,7 @@ static PyTypeObject Simple_Type = {
5064
5064
0 , /* tp_setattro */
5065
5065
& PyCData_as_buffer , /* tp_as_buffer */
5066
5066
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , /* tp_flags */
5067
- "XXX to be provided" , /* tp_doc */
5067
+ PyDoc_STR ( "XXX to be provided" ), /* tp_doc */
5068
5068
(traverseproc )PyCData_traverse , /* tp_traverse */
5069
5069
(inquiry )PyCData_clear , /* tp_clear */
5070
5070
0 , /* tp_richcompare */
@@ -5448,7 +5448,7 @@ PyTypeObject PyCPointer_Type = {
5448
5448
0 , /* tp_setattro */
5449
5449
& PyCData_as_buffer , /* tp_as_buffer */
5450
5450
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE , /* tp_flags */
5451
- "XXX to be provided" , /* tp_doc */
5451
+ PyDoc_STR ( "XXX to be provided" ), /* tp_doc */
5452
5452
(traverseproc )PyCData_traverse , /* tp_traverse */
5453
5453
(inquiry )PyCData_clear , /* tp_clear */
5454
5454
0 , /* tp_richcompare */
@@ -5475,12 +5475,12 @@ PyTypeObject PyCPointer_Type = {
5475
5475
* Module initialization.
5476
5476
*/
5477
5477
5478
- static const char module_docs [] =
5479
- "Create and manipulate C compatible data types in Python." ;
5478
+ PyDoc_STRVAR ( module_docs ,
5479
+ "Create and manipulate C compatible data types in Python." ) ;
5480
5480
5481
5481
#ifdef MS_WIN32
5482
5482
5483
- static const char comerror_doc [] = "Raised when a COM method call failed." ;
5483
+ PyDoc_STRVAR ( comerror_doc , "Raised when a COM method call failed." ) ;
5484
5484
5485
5485
int
5486
5486
comerror_init (PyObject * self , PyObject * args , PyObject * kwds )
0 commit comments