mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Fix various compilation and linker issues across several platforms
This commit is contained in:
parent
a5f340c587
commit
7f7f85794d
@ -20,8 +20,10 @@
|
||||
|
||||
#ifdef HAVE_PYTHON
|
||||
|
||||
#undef HAVE_LONG_LONG // NSPR and Python both define this.
|
||||
#define PY_SSIZE_T_CLEAN 1
|
||||
|
||||
#undef _POSIX_C_SOURCE
|
||||
#undef _XOPEN_SOURCE
|
||||
#include <Python.h>
|
||||
|
||||
// Python 2.5 adds Py_ssize_t; earlier versions don't have it.
|
||||
|
@ -1653,6 +1653,8 @@ def CompileLink(dll, obj, opts):
|
||||
else:
|
||||
cmd += " -pthread"
|
||||
|
||||
cmd += " -Wl,-allow-multiple-definition"
|
||||
|
||||
if LDFLAGS != "":
|
||||
cmd += " " + LDFLAGS
|
||||
|
||||
|
@ -985,7 +985,7 @@ clear_cache() {
|
||||
RenderState *state = (RenderState *)(*ti).p();
|
||||
|
||||
int i;
|
||||
int cache_size = state->_composition_cache.get_size();
|
||||
int cache_size = (int)state->_composition_cache.get_size();
|
||||
for (i = 0; i < cache_size; ++i) {
|
||||
if (state->_composition_cache.has_element(i)) {
|
||||
const RenderState *result = state->_composition_cache.get_data(i)._result;
|
||||
@ -995,10 +995,10 @@ clear_cache() {
|
||||
}
|
||||
}
|
||||
}
|
||||
_cache_stats.add_total_size(-state->_composition_cache.get_num_entries());
|
||||
_cache_stats.add_total_size(-(int)state->_composition_cache.get_num_entries());
|
||||
state->_composition_cache.clear();
|
||||
|
||||
cache_size = state->_invert_composition_cache.get_size();
|
||||
cache_size = (int)state->_invert_composition_cache.get_size();
|
||||
for (i = 0; i < cache_size; ++i) {
|
||||
if (state->_invert_composition_cache.has_element(i)) {
|
||||
const RenderState *result = state->_invert_composition_cache.get_data(i)._result;
|
||||
@ -1008,7 +1008,7 @@ clear_cache() {
|
||||
}
|
||||
}
|
||||
}
|
||||
_cache_stats.add_total_size(-state->_invert_composition_cache.get_num_entries());
|
||||
_cache_stats.add_total_size(-(int)state->_invert_composition_cache.get_num_entries());
|
||||
state->_invert_composition_cache.clear();
|
||||
}
|
||||
|
||||
|
@ -1174,7 +1174,7 @@ clear_cache() {
|
||||
TransformState *state = (TransformState *)(*ti).p();
|
||||
|
||||
int i;
|
||||
int cache_size = state->_composition_cache.get_size();
|
||||
int cache_size = (int)state->_composition_cache.get_size();
|
||||
for (i = 0; i < cache_size; ++i) {
|
||||
if (state->_composition_cache.has_element(i)) {
|
||||
const TransformState *result = state->_composition_cache.get_data(i)._result;
|
||||
@ -1184,7 +1184,7 @@ clear_cache() {
|
||||
}
|
||||
}
|
||||
}
|
||||
_cache_stats.add_total_size(-state->_composition_cache.get_num_entries());
|
||||
_cache_stats.add_total_size(-(int)state->_composition_cache.get_num_entries());
|
||||
state->_composition_cache.clear();
|
||||
|
||||
cache_size = state->_invert_composition_cache.get_size();
|
||||
@ -1197,7 +1197,7 @@ clear_cache() {
|
||||
}
|
||||
}
|
||||
}
|
||||
_cache_stats.add_total_size(-state->_invert_composition_cache.get_num_entries());
|
||||
_cache_stats.add_total_size(-(int)state->_invert_composition_cache.get_num_entries());
|
||||
state->_invert_composition_cache.clear();
|
||||
}
|
||||
|
||||
|
@ -575,8 +575,8 @@ output_binary(ostream &out, int spaces_every) const {
|
||||
if (_highest_bits) {
|
||||
out << "...1 ";
|
||||
}
|
||||
size_t num_bits = max(get_num_bits(), (size_t)spaces_every);
|
||||
for (size_t i = num_bits - 1; i >= 0; i--) {
|
||||
int num_bits = max((int)get_num_bits(), spaces_every);
|
||||
for (int i = num_bits - 1; i >= 0; i--) {
|
||||
if (spaces_every != 0 && ((i % spaces_every) == spaces_every - 1)) {
|
||||
out << ' ';
|
||||
}
|
||||
|
@ -153,6 +153,8 @@ private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
#include "paramValue.I"
|
||||
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, ParamValue<std::string>);
|
||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, ParamValue<std::wstring>);
|
||||
|
||||
@ -211,8 +213,6 @@ typedef ParamMatrix3f ParamMatrix3;
|
||||
typedef ParamMatrix4f ParamMatrix4;
|
||||
#endif
|
||||
|
||||
#include "paramValue.I"
|
||||
|
||||
// Tell GCC that we'll take care of the instantiation explicitly here.
|
||||
#ifdef __GNUC__
|
||||
#pragma interface
|
||||
|
Loading…
x
Reference in New Issue
Block a user