Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Christian Butz
VTK
Commits
016162b0
Commit
016162b0
authored
Jun 17, 2010
by
David Gobbi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
COMP: fix signed/unsigned mismatch warnings
parent
97eb9cf9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
Wrapping/Python/vtkPythonUtil.cxx
Wrapping/Python/vtkPythonUtil.cxx
+8
-6
Wrapping/vtkWrapPython.c
Wrapping/vtkWrapPython.c
+6
-8
No files found.
Wrapping/Python/vtkPythonUtil.cxx
View file @
016162b0
...
...
@@ -155,8 +155,8 @@ public:
void
initialize
(
bool
selfIsClass
,
const
char
*
format
);
bool
next
(
const
char
**
format
,
const
char
**
classname
);
int
penalty
()
{
return
m_penalty
;
};
int
penalty
(
int
p
enalty
)
{
if
(
p
enalty
>
m_penalty
)
{
m_penalty
=
p
enalty
;
};
int
penalty
(
int
p
)
{
if
(
p
>
m_penalty
)
{
m_penalty
=
p
;
};
return
m_penalty
;
};
private:
...
...
@@ -233,6 +233,8 @@ int vtkPythonIntPenalty(PY_LONG_LONG tmpi, int penalty, char format)
int
vtkPythonIntPenalty
(
long
tmpi
,
int
penalty
,
char
format
)
#endif
{
tmpi
;
format
;
// avoid "unused parameter" compiler warnings
#if VTK_SIZEOF_LONG != VTK_SIZEOF_INT
if
(
tmpi
>
VTK_INT_MAX
||
tmpi
<
VTK_INT_MIN
)
{
...
...
@@ -573,10 +575,10 @@ int vtkPythonUtil::CheckArg(
penalty
=
VTK_PYTHON_NEEDS_CONVERSION
;
// Look up the required type in the map
vtkPythonSpecialTypeMap
::
iterator
i
;
vtkPythonSpecialTypeMap
::
iterator
i
ter
;
if
(
level
!=
0
||
(
i
=
vtkPythonMap
->
SpecialTypeMap
->
find
(
classname
))
==
(
i
ter
=
vtkPythonMap
->
SpecialTypeMap
->
find
(
classname
))
==
vtkPythonMap
->
SpecialTypeMap
->
end
())
{
penalty
=
VTK_PYTHON_INCOMPATIBLE
;
...
...
@@ -584,7 +586,7 @@ int vtkPythonUtil::CheckArg(
else
{
// Get info about the required type
PyVTKSpecialType
*
info
=
&
i
->
second
;
PyVTKSpecialType
*
info
=
&
i
ter
->
second
;
// Try out all the constructor methods
if
(
!
vtkPythonUtil
::
FindConversionMethod
(
info
->
constructors
,
arg
))
...
...
@@ -1514,7 +1516,7 @@ int vtkPythonUtil::CheckArray(PyObject *args, int i, bool *a, int n)
for
(
i
=
0
;
i
<
n
;
i
++
)
{
PyObject
*
oldobj
=
PySequence_GetItem
(
seq
,
i
);
bool
oldval
=
PyObject_IsTrue
(
oldobj
);
bool
oldval
=
(
PyObject_IsTrue
(
oldobj
)
!=
0
)
;
Py_DECREF
(
oldobj
);
changed
|=
(
a
[
i
]
!=
oldval
);
}
...
...
Wrapping/vtkWrapPython.c
View file @
016162b0
...
...
@@ -43,8 +43,7 @@ static void vtkWrapPython_CustomMethods(
/* print out all methods and the method table */
static
void
vtkWrapPython_GenerateMethods
(
FILE
*
fp
,
FileInfo
*
data
,
int
class_has_new
,
int
is_vtkobject
,
int
do_constructors
);
FILE
*
fp
,
FileInfo
*
data
,
int
is_vtkobject
,
int
do_constructors
);
/* make a temporary variable for an arg value or a return value */
static
void
vtkWrapPython_MakeTempVariable
(
...
...
@@ -732,7 +731,7 @@ static void vtkWrapPython_ReturnValue(
static
char
*
vtkWrapPython_FormatString
(
FunctionInfo
*
currentFunction
)
{
static
char
result
[
1024
];
in
t
currPos
=
0
;
size_
t
currPos
=
0
;
int
argtype
;
int
i
,
j
;
int
typeChar
;
...
...
@@ -875,7 +874,7 @@ static char *vtkWrapPython_ArgCheckString(
int
isvtkobjmethod
,
FunctionInfo
*
currentFunction
)
{
static
char
result
[
1024
];
in
t
currPos
=
0
;
size_
t
currPos
=
0
;
int
argtype
;
int
i
;
...
...
@@ -1608,8 +1607,7 @@ void vtkWrapPython_RemovePreceededMethods(
* words, this poorly named function is "the big one". */
static
void
vtkWrapPython_GenerateMethods
(
FILE
*
fp
,
FileInfo
*
data
,
int
class_has_new
,
int
is_vtkobject
,
int
do_constructors
)
FILE
*
fp
,
FileInfo
*
data
,
int
is_vtkobject
,
int
do_constructors
)
{
int
i
,
j
,
k
,
is_static
,
is_pure_virtual
,
fnum
,
occ
;
int
numberOfSignatures
,
signatureCount
;
...
...
@@ -3034,7 +3032,7 @@ static void vtkWrapPython_GenerateSpecialObjectNew(
int
i
;
/* handle all constructors */
vtkWrapPython_GenerateMethods
(
fp
,
data
,
class_has_new
,
0
,
1
);
vtkWrapPython_GenerateMethods
(
fp
,
data
,
0
,
1
);
/* the method table for the New method */
fprintf
(
fp
,
...
...
@@ -3316,7 +3314,7 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
/* now output all the methods are wrappable */
if
(
is_vtkobject
||
!
data
->
IsAbstract
)
{
vtkWrapPython_GenerateMethods
(
fp
,
data
,
class_has_new
,
is_vtkobject
,
0
);
vtkWrapPython_GenerateMethods
(
fp
,
data
,
is_vtkobject
,
0
);
}
/* output the class initilization function for VTK objects */
...
...
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