bazaar: CoreBoostPy: using namespace fixes, cllided with stdlib typedefs (i.e. ssize_t), Urr: redundant includes

git-svn-id: svn://ultimatepp.org/upp/trunk@3953 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
kohait 2011-10-04 10:42:12 +00:00
parent bda7180145
commit 8e20616dd9
5 changed files with 9 additions and 11 deletions

View file

@ -1,4 +1,5 @@
#include "Callback.h"
using namespace boost::python;
NAMESPACE_UPP

View file

@ -34,7 +34,6 @@ invoke(PyObject* callable
}} //ns
NAMESPACE_UPP
using namespace boost::python;
void* call_convertible(PyObject* po);

View file

@ -12,8 +12,8 @@ NAMESPACE_UPP
class PyEvalConvert : public Convert
{
public:
object globals;
mutable object locals; //added to by Format
boost::python::object globals;
mutable boost::python::object locals; //added to by Format
String expr;
virtual Value Format(const Value& q) const;

View file

@ -4,7 +4,7 @@ using namespace std;
struct FuncID
{
DWORD id; // An index number of the function.
short id; // An index number of the function.
PyObject* cbf; // Pointer to the callback function.
};
@ -12,7 +12,7 @@ Array<FuncID> FunctionsList;
PyObject* newmodule_RegisterFunction ( PyObject* pSelf, PyObject* pArgs )
{
DWORD index = 0;
short index = 0;
PyObject* CallbackFunction = NULL;
if ( !PyArg_ParseTuple ( pArgs, "lO", &index, &CallbackFunction ) )
@ -31,7 +31,7 @@ PyObject* newmodule_RegisterFunction ( PyObject* pSelf, PyObject* pArgs )
if ( FunctionsList[i].id == index )
{
// Sorry mates.
return Py_BuildValue ( "i", FALSE );
return Py_BuildValue ( "i", 0 );
}
}
@ -54,12 +54,12 @@ PyObject* newmodule_RegisterFunction ( PyObject* pSelf, PyObject* pArgs )
return NULL;
}
return Py_BuildValue ( "i", TRUE );
return Py_BuildValue ( "i", 1 );
}
PyObject* newmodule_CallFunctionByID ( PyObject* pSelf, PyObject* pArgs )
{
DWORD index = 0;
short index = 0;
if ( !PyArg_ParseTuple ( pArgs, "l", &index ) )
return NULL;
@ -79,7 +79,7 @@ PyObject* newmodule_CallFunctionByID ( PyObject* pSelf, PyObject* pArgs )
}
// Damn function wasn't found.
return Py_BuildValue ( "i", FALSE );
return Py_BuildValue ( "i", 0 );
}
static PyMethodDef newmoduleMethods[] =

View file

@ -10,11 +10,9 @@ typedef int socklen_t;
#endif
#ifdef PLATFORM_POSIX
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/in.h>
#include <arpa/inet.h>
typedef int SOCKET;
inline void closesocket(int fd) { close(fd); }