[asterisk-scf-commits] asterisk-scf/integration/ice.git branch "py-vs2010" created.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Apr 5 16:22:54 CDT 2011


branch "py-vs2010" has been created
        at  010324b0339df3ff3767f9a3752c97dd092d453a (commit)

- Log -----------------------------------------------------------------
commit 010324b0339df3ff3767f9a3752c97dd092d453a
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue Apr 5 16:20:04 2011 -0500

    Changes to allow Ice Python support to compile under VS 2010.
      - Changed initialization of std:air objects.
      - Added VS100 and VS100_EXPRESS as compiler options.

diff --git a/py/config/Make.rules.mak b/py/config/Make.rules.mak
index 22aa243..99364ae 100644
--- a/py/config/Make.rules.mak
+++ b/py/config/Make.rules.mak
@@ -23,10 +23,10 @@ OPTIMIZE		= yes
 
 #
 # Specify your C++ compiler. Supported values are:
-# VC60, VC90, VC90_EXPRESS
+# VC60, VC90, VC90_EXPRESS, VC100, VC100_EXPRESS
 #
 !if "$(CPP_COMPILER)" == ""
-CPP_COMPILER            = VC90
+CPP_COMPILER            = VC100
 !endif
 
 #
@@ -71,7 +71,8 @@ install_libdir		= $(prefix)\python$(x64suffix)
 
 !if "$(CPP_COMPILER)" != "VC60" && "$(CPP_COMPILER)" != "VC71" && \
     "$(CPP_COMPILER)" != "VC80" && "$(CPP_COMPILER)" != "VC80_EXPRESS" && \
-    "$(CPP_COMPILER)" != "VC90" && "$(CPP_COMPILER)" != "VC90_EXPRESS"
+    "$(CPP_COMPILER)" != "VC90" && "$(CPP_COMPILER)" != "VC90_EXPRESS" && \
+    "$(CPP_COMPILER)" != "VC100" && "$(CPP_COMPILER)" != "VC100_EXPRESS"
 !error Invalid setting for CPP_COMPILER: $(CPP_COMPILER)
 !endif
 
diff --git a/py/modules/IcePy/Operation.cpp b/py/modules/IcePy/Operation.cpp
index b54aeb3..472468a 100644
--- a/py/modules/IcePy/Operation.cpp
+++ b/py/modules/IcePy/Operation.cpp
@@ -1275,6 +1275,7 @@ PyTypeObject AsyncResultType =
     0,                               /* tp_is_gc */
 };
 
+const Ice::Byte* const NullBytePtr = 0;
 }
 
 bool
@@ -1617,7 +1618,7 @@ IcePy::SyncTypedInvocation::invoke(PyObject* args, PyObject* /* kwds */)
                 //
                 // Unmarshal a user exception.
                 //
-                pair<const Ice::Byte*, const Ice::Byte*> rb(0, 0);
+                pair<const Ice::Byte*, const Ice::Byte*> rb(NullBytePtr, NullBytePtr);
                 if(!result.empty())
                 {
                     rb.first = &result[0];
@@ -1637,7 +1638,7 @@ IcePy::SyncTypedInvocation::invoke(PyObject* args, PyObject* /* kwds */)
                 // Unmarshal the results. If there is more than one value to be returned, then return them
                 // in a tuple of the form (result, outParam1, ...). Otherwise just return the value.
                 //
-                pair<const Ice::Byte*, const Ice::Byte*> rb(0, 0);
+                pair<const Ice::Byte*, const Ice::Byte*> rb(NullBytePtr, NullBytePtr);
                 if(!result.empty())
                 {
                     rb.first = &result[0];
@@ -1777,7 +1778,7 @@ IcePy::AsyncTypedInvocation::invoke(PyObject* args, PyObject* /* kwds */)
     try
     {
         checkAsyncTwowayOnly(_prx);
-        pair<const Ice::Byte*, const Ice::Byte*> pparams(0, 0);
+        pair<const Ice::Byte*, const Ice::Byte*> pparams(NullBytePtr, NullBytePtr);
         if(!params.empty())
         {
             pparams.first = &params[0];
@@ -2066,7 +2067,7 @@ IcePy::OldAsyncTypedInvocation::invoke(PyObject* args, PyObject* /* kwds */)
     try
     {
         checkTwowayOnly(_prx);
-        pair<const Ice::Byte*, const Ice::Byte*> pparams(0, 0);
+        pair<const Ice::Byte*, const Ice::Byte*> pparams(NullBytePtr, NullBytePtr);
         if(!params.empty())
         {
             pparams.first = &params[0];
@@ -2249,7 +2250,7 @@ IcePy::SyncBlobjectInvocation::invoke(PyObject* args, PyObject* /* kwds */)
 #endif
     Py_ssize_t sz = inParams->ob_type->tp_as_buffer->bf_getcharbuffer(inParams, 0, &charBuf);
     const Ice::Byte* mem = reinterpret_cast<const Ice::Byte*>(charBuf);
-    pair<const ::Ice::Byte*, const ::Ice::Byte*> in(0, 0);
+    pair<const ::Ice::Byte*, const ::Ice::Byte*> in(NullBytePtr, NullBytePtr);
     if(sz > 0)
     {
         in.first = mem;
@@ -2434,7 +2435,7 @@ IcePy::AsyncBlobjectInvocation::invoke(PyObject* args, PyObject* kwds)
 #endif
     Py_ssize_t sz = inParams->ob_type->tp_as_buffer->bf_getcharbuffer(inParams, 0, &charBuf);
     const Ice::Byte* mem = reinterpret_cast<const Ice::Byte*>(charBuf);
-    pair<const ::Ice::Byte*, const ::Ice::Byte*> in(0, 0);
+    pair<const ::Ice::Byte*, const ::Ice::Byte*> in(NullBytePtr, NullBytePtr);
     if(sz > 0)
     {
         in.first = mem;
@@ -2708,7 +2709,7 @@ IcePy::OldAsyncBlobjectInvocation::invoke(PyObject* args, PyObject* /* kwds */)
 #endif
     Py_ssize_t sz = inParams->ob_type->tp_as_buffer->bf_getcharbuffer(inParams, 0, &charBuf);
     const Ice::Byte* mem = reinterpret_cast<const Ice::Byte*>(charBuf);
-    pair<const ::Ice::Byte*, const ::Ice::Byte*> in(0, 0);
+    pair<const ::Ice::Byte*, const ::Ice::Byte*> in(NullBytePtr, NullBytePtr);
     if(sz > 0)
     {
         in.first = mem;
@@ -3072,7 +3073,7 @@ IcePy::TypedUpcall::response(PyObject* args)
 
             Ice::ByteSeq bytes;
             os->finished(bytes);
-            pair<const Ice::Byte*, const Ice::Byte*> ob(0, 0);
+            pair<const Ice::Byte*, const Ice::Byte*> ob(NullBytePtr, NullBytePtr);
             if(!bytes.empty())
             {
                 ob.first = &bytes[0];
@@ -3151,7 +3152,7 @@ IcePy::TypedUpcall::exception(PyException& ex)
 
                     Ice::ByteSeq bytes;
                     os->finished(bytes);
-                    pair<const Ice::Byte*, const Ice::Byte*> ob(0, 0);
+                    pair<const Ice::Byte*, const Ice::Byte*> ob(NullBytePtr, NullBytePtr);
                     if(!bytes.empty())
                     {
                         ob.first = &bytes[0];

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/ice.git



More information about the asterisk-scf-commits mailing list