Skip to content

Commit e901a56

Browse files
committed
Move C headers in extern C context.
This fixes a few 'deprecated register' warnings.
1 parent c13172d commit e901a56

File tree

7 files changed

+17
-7
lines changed

7 files changed

+17
-7
lines changed

graf2d/asimage/src/TASImage.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ ROOT tutorials: `$ROOTSYS/tutorials/image/`
104104
# include <win32/afterbase.h>
105105
# define X_DISPLAY_MISSING 1
106106
#endif
107+
extern "C" {
107108
# include <afterimage.h>
108109
# include <bmp.h>
109-
extern "C" {
110110
# include <draw.h>
111111
}
112112

graf2d/asimage/src/TASPaletteEditor.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ It is called by a pull down menu item of TASImage.
4646
# include <win32/config.h>
4747
# include <win32/afterbase.h>
4848
#endif
49-
# include <afterimage.h>
5049
extern "C" {
50+
# include <afterimage.h>
5151
# include <bmp.h>
5252
}
5353

tmva/pymva/src/MethodPyAdaBoost.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
* *
1818
**********************************************************************************/
1919

20-
#include <Python.h> // Needs to be included first to avoid redefinition of _POSIX_C_SOURCE
20+
extern "C" {
21+
#include <Python.h> // Needs to be included first to avoid redefinition of _POSIX_C_SOURCE
22+
}
2123
#include "TMVA/MethodPyAdaBoost.h"
2224

2325
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION

tmva/pymva/src/MethodPyGTB.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
* *
1818
**********************************************************************************/
1919

20-
#include <Python.h> // Needs to be included first to avoid redefinition of _POSIX_C_SOURCE
20+
extern "C" {
21+
#include <Python.h> // Needs to be included first to avoid redefinition of _POSIX_C_SOURCE
22+
}
2123
#include "TMVA/MethodPyGTB.h"
2224

2325
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION

tmva/pymva/src/MethodPyKeras.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// @(#)root/tmva/pymva $Id$
22
// Author: Stefan Wunsch, 2016
33

4-
#include <Python.h>
4+
extern "C" {
5+
#include <Python.h>
6+
}
57
#include "TMVA/MethodPyKeras.h"
68

79
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION

tmva/pymva/src/MethodPyRandomForest.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
* (http://tmva.sourceforge.net/LICENSE) *
1717
* *
1818
**********************************************************************************/
19-
#include <Python.h> // Needs to be included first to avoid redefinition of _POSIX_C_SOURCE
19+
extern "C" {
20+
#include <Python.h> // Needs to be included first to avoid redefinition of _POSIX_C_SOURCE
21+
}
2022
#include "TMVA/MethodPyRandomForest.h"
2123

2224
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION

tmva/pymva/src/PyMethodBase.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
* *
1212
**********************************************************************************/
1313

14-
#include <Python.h> // Needs to be included first to avoid redefinition of _POSIX_C_SOURCE
14+
extern "C" {
15+
#include <Python.h> // Needs to be included first to avoid redefinition of _POSIX_C_SOURCE
16+
}
1517
#include <TMVA/PyMethodBase.h>
1618

1719
#include "TMVA/DataSet.h"

0 commit comments

Comments
 (0)