Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
VTK
VTK
Commits
be8d2a8e
Commit
be8d2a8e
authored
Sep 01, 2016
by
David Gobbi
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify template macros in vtkPythonArgs
parent
3edd29cc
Pipeline
#25732
passed with stage
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
32 deletions
+23
-32
Wrapping/PythonCore/vtkPythonArgs.cxx
Wrapping/PythonCore/vtkPythonArgs.cxx
+4
-8
Wrapping/PythonCore/vtkPythonArgs.h
Wrapping/PythonCore/vtkPythonArgs.h
+19
-24
No files found.
Wrapping/PythonCore/vtkPythonArgs.cxx
View file @
be8d2a8e
...
...
@@ -22,7 +22,7 @@ resulting in wrapper code that is faster and more compact.
-----------------------------------------------------------------------*/
// Keep vtkPythonArgs.h from declaring externs for templates we instantiate
#define
VTK_PYTHON_ARGS_CXX
#define
vtkPythonArgs_cxx
#include "vtkPythonArgs.h"
#include "vtkPythonUtil.h"
...
...
@@ -1380,10 +1380,6 @@ vtkPythonArgs::Array<T>::Array(Py_ssize_t n) : Pointer(0)
}
// Instantiate the Array class template over all types:
#define vtkForPythonArrayTypeMacro(type) \
template class VTKWRAPPINGPYTHONCORE_EXPORT vtkPythonArgs::Array<type>;
vtkExpandForPythonArrayTypesMacro
()
#undef vtkForPythonArrayTypeMacro
vtkPythonArgsTemplateMacro
(
template
class
VTKWRAPPINGPYTHONCORE_EXPORT
vtkPythonArgs
::
Array
)
Wrapping/PythonCore/vtkPythonArgs.h
View file @
be8d2a8e
...
...
@@ -807,32 +807,27 @@ PyObject *vtkPythonArgs::BuildBytes(const char *a, int n)
// List of all types for the Array class template:
#define vtk
ExpandForPythonArrayTypes
Macro() \
vtkForPythonArrayTypeMacro(
bool
)
\
vtkForPythonArrayTypeMacro(
float
)
\
vtkForPythonArrayTypeMacro(
double
)
\
vtkForPythonArrayTypeMacro(
char
)
\
vtkForPythonArrayTypeMacro(
signed char
)
\
vtkForPythonArrayTypeMacro(
unsigned char
)
\
vtkForPythonArrayTypeMacro(
short
)
\
vtkForPythonArrayTypeMacro(
unsigned short
)
\
vtkForPythonArrayTypeMacro(
int
)
\
vtkForPythonArrayTypeMacro(
unsigned int
)
\
vtkForPythonArrayTypeMacro(
long
)
\
vtkForPythonArrayTypeMacro(
unsigned long
)
\
vtkForPythonArrayTypeMacro(
long long
)
\
vtkForPythonArrayTypeMacro(
unsigned long long
)
#define vtk
PythonArgsTemplate
Macro(
decl
) \
decl<
bool
>;
\
decl<
float
>;
\
decl<
double
>;
\
decl<
char
>;
\
decl<
signed char
>;
\
decl<
unsigned char
>;
\
decl<
short
>;
\
decl<
unsigned short
>;
\
decl<
int
>;
\
decl<
unsigned int
>;
\
decl<
long
>;
\
decl<
unsigned long
>;
\
decl<
long long
>;
\
decl<
unsigned long long
>;
// Forward declare the Array class template over all types:
#if defined(VTK_USE_EXTERN_TEMPLATE) && !defined(VTK_PYTHON_ARGS_CXX)
#define vtkForPythonArrayTypeMacro(type) \
extern template class vtkPythonArgs::Array<type>;
vtkExpandForPythonArrayTypesMacro
()
#undef vtkForPythonArrayTypeMacro
#if defined(VTK_USE_EXTERN_TEMPLATE) && !defined(vtkPythonArgs_cxx)
vtkPythonArgsTemplateMacro
(
extern
template
class
VTKWRAPPINGPYTHONCORE_EXPORT
vtkPythonArgs
::
Array
)
#endif
#endif
David Gobbi
@dgobbi
mentioned in commit
a1a94d0c
·
Sep 13, 2016
mentioned in commit
a1a94d0c
mentioned in commit a1a94d0ca96854fe72480cf2ec031a533b129b04
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment