mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
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:
parent
bda7180145
commit
8e20616dd9
5 changed files with 9 additions and 11 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "Callback.h"
|
||||
using namespace boost::python;
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ invoke(PyObject* callable
|
|||
}} //ns
|
||||
|
||||
NAMESPACE_UPP
|
||||
using namespace boost::python;
|
||||
|
||||
void* call_convertible(PyObject* po);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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[] =
|
||||
|
|
|
|||
|
|
@ -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); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue