64 bit portability warnings fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9580 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
532ad9d08c
commit
c5a8c80883
4 changed files with 11 additions and 10 deletions
|
|
@ -21,6 +21,7 @@ struct Base {
|
|||
Base(int v = 0) : value(v) {}
|
||||
int value;
|
||||
virtual int method(int v) {
|
||||
return v;
|
||||
}
|
||||
};
|
||||
struct Derived : Base {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
const std::string &invoke(int idx) {
|
||||
return quuxen_[idx]->director_method();
|
||||
}
|
||||
int size() {
|
||||
size_t size() {
|
||||
return quuxen_.size();
|
||||
}
|
||||
private:
|
||||
|
|
@ -86,7 +86,7 @@ public:
|
|||
void push(Quux *elem);
|
||||
Quux *get(int idx);
|
||||
const std::string &invoke(int idx);
|
||||
int size();
|
||||
size_t size();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -195,8 +195,8 @@ If you have used typedef to change type-names, you can also do this :
|
|||
void * ALIGN8,
|
||||
Pointer ALIGN8
|
||||
{
|
||||
long tmp;
|
||||
tmp = (long) $1;
|
||||
unsigned long long tmp;
|
||||
tmp = (unsigned long long) $1;
|
||||
if (tmp & 7) {
|
||||
SWIG_exception(SWIG_ValueError,"Pointer must be 8-byte aligned.");
|
||||
}
|
||||
|
|
@ -206,8 +206,8 @@ If you have used typedef to change type-names, you can also do this :
|
|||
void * ALIGN4,
|
||||
Pointer ALIGN4
|
||||
{
|
||||
long tmp;
|
||||
tmp = (long) $1;
|
||||
unsigned long long tmp;
|
||||
tmp = (unsigned long long) $1;
|
||||
if (tmp & 3) {
|
||||
SWIG_exception(SWIG_ValueError,"Pointer must be 4-byte aligned.");
|
||||
}
|
||||
|
|
@ -217,8 +217,8 @@ If you have used typedef to change type-names, you can also do this :
|
|||
void * ALIGN2,
|
||||
Pointer ALIGN2
|
||||
{
|
||||
long tmp;
|
||||
tmp = (long) $1;
|
||||
unsigned long long tmp;
|
||||
tmp = (unsigned long long) $1;
|
||||
if (tmp & 1) {
|
||||
SWIG_exception(SWIG_ValueError,"Pointer must be 2-byte aligned.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -297,14 +297,14 @@
|
|||
int index = -1;
|
||||
std::vector<CTYPE >::iterator it = std::find(self->begin(), self->end(), value);
|
||||
if (it != self->end())
|
||||
index = it - self->begin();
|
||||
index = (int)(it - self->begin());
|
||||
return index;
|
||||
}
|
||||
int LastIndexOf(const value_type& value) {
|
||||
int index = -1;
|
||||
std::vector<CTYPE >::reverse_iterator rit = std::find(self->rbegin(), self->rend(), value);
|
||||
if (rit != self->rend())
|
||||
index = self->rend() - 1 - rit;
|
||||
index = (int)(self->rend() - 1 - rit);
|
||||
return index;
|
||||
}
|
||||
void Remove(const value_type& value) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue