Skip to content

Commit 8137f1f

Browse files
committed
Get rid of typedef struct completely, this is C++ code
1 parent 7012000 commit 8137f1f

9 files changed

+18
-18
lines changed

src/PythonQtBoolResult.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ extern PYTHONQT_EXPORT PyTypeObject PythonQtBoolResult_Type;
5151
#define PythonQtBoolResult_Check(op) (Py_TYPE(op) == &PythonQtBoolResult_Type)
5252

5353
//! defines a python object that stores a single bool
54-
typedef struct {
54+
struct PythonQtBoolResultObject {
5555
PyObject_HEAD
5656
bool _value;
57-
} PythonQtBoolResultObject;
57+
};
5858

5959

6060
#endif

src/PythonQtImporter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@
5555

5656

5757
//! defines a python object that stores a Qt slot info
58-
typedef struct _PythonQtImporter {
58+
struct PythonQtImporter {
5959
PyObject_HEAD
6060
QString* _path;
61-
} PythonQtImporter;
61+
};
6262

6363

6464
//! implements importing of python files into PythonQt

src/PythonQtInstanceWrapper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ extern PYTHONQT_EXPORT PyTypeObject PythonQtInstanceWrapper_Type;
6060

6161
//---------------------------------------------------------------
6262
//! a Python wrapper object for Qt objects and C++ objects (that are themselves wrapped by wrapper QObjects)
63-
typedef struct PythonQtInstanceWrapperStruct {
63+
struct PythonQtInstanceWrapper {
6464
PyObject_HEAD
6565

6666
//! the class information, this is set even if the _obj or _wrappedPtr is NULL to support typed NULL pointers
@@ -126,7 +126,7 @@ typedef struct PythonQtInstanceWrapperStruct {
126126
//! stores if the shell instance (C++) owns the wrapper with its ref count
127127
bool _shellInstanceRefCountsWrapper;
128128

129-
} PythonQtInstanceWrapper;
129+
};
130130

131131
int PythonQtInstanceWrapper_init(PythonQtInstanceWrapper * self, PyObject * args, PyObject * kwds);
132132

src/PythonQtProperty.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct PythonQtPropertyData
8888
bool final;
8989
};
9090

91-
typedef struct {
91+
struct PythonQtProperty {
9292
PyObject_HEAD
9393
PythonQtPropertyData* data;
94-
} PythonQtProperty;
94+
};

src/PythonQtSignal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ struct PythonQtDynamicSignalInfo
6363
};
6464

6565
//! defines a python object that stores a Qt signal info
66-
typedef struct {
66+
struct PythonQtSignalFunctionObject {
6767
PyObject_HEAD
6868
PythonQtSlotInfo *m_ml; /* Description of the C function to call */
6969
PyObject *m_self; /* Passed as 'self' arg to the C func, can be NULL */
7070
PyObject *m_module; /* The __module__ attribute, can be anything */
7171
PythonQtDynamicSignalInfo* _dynamicInfo;
72-
} PythonQtSignalFunctionObject;
72+
};
7373

7474

7575
#endif

src/PythonQtSlot.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ PyObject *PythonQtMemberFunction_parameterNames(PythonQtSlotInfo* theInfo);
8181
PyObject *PythonQtMemberFunction_typeName(PythonQtSlotInfo* theInfo);
8282

8383
//! defines a python object that stores a Qt slot info
84-
typedef struct {
84+
struct PythonQtSlotFunctionObject {
8585
PyObject_HEAD
8686
PythonQtSlotInfo *m_ml; /* Description of the C function to call */
8787
PyObject *m_self; /* Passed as 'self' arg to the C func, can be NULL */
8888
PyObject *m_module; /* The __module__ attribute, can be anything */
89-
} PythonQtSlotFunctionObject;
89+
};
9090

9191

9292
#endif

src/PythonQtSlotDecorator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ extern PYTHONQT_EXPORT PyTypeObject PythonQtSlotDecorator_Type;
4343

4444
#define PythonQtSlotDecorator_Check(op) (Py_TYPE(op) == &PythonQtSlotDecorator_Type)
4545

46-
typedef struct {
46+
struct PythonQtSlotDecorator {
4747
PyObject_HEAD
4848
QByteArray* args;
4949
QByteArray* returnType;
50-
} PythonQtSlotDecorator;
50+
};

src/PythonQtStdIn.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ extern PyTypeObject PythonQtStdInRedirectType;
5454
typedef QString PythonQtInputChangedCB(void* callData);
5555

5656
//! declares the stdin redirection class
57-
typedef struct {
57+
struct PythonQtStdInRedirect {
5858
PyObject_HEAD
5959
PythonQtInputChangedCB* _cb;
6060
void * _callData;
6161
bool _isatty;
62-
} PythonQtStdInRedirect;
62+
};
6363

6464
#endif

src/PythonQtStdOut.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ extern PyTypeObject PythonQtStdOutRedirectType;
5555
typedef void PythonQtOutputChangedCB(const QString& str);
5656

5757
//! declares the stdout redirection class
58-
typedef struct {
58+
struct PythonQtStdOutRedirect {
5959
PyObject_HEAD
6060
PythonQtOutputChangedCB* _cb;
6161
int softspace;
6262
bool closed;
63-
} PythonQtStdOutRedirect;
63+
};
6464

6565
#endif

0 commit comments

Comments
 (0)