Changeset 32229 in vbox for trunk/src/libs/xpcom18a4/python
- Timestamp:
- Sep 3, 2010 7:38:52 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 65538
- Location:
- trunk/src/libs/xpcom18a4/python/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/python/src/PyXPCOM.h
r16903 r32229 79 79 // unfortunatelly, if SOLARIS is defined Python porting layer 80 80 // defines gethostname() in invalid fashion what kills compilation 81 #ifdef SOLARIS 82 #undef SOLARIS 83 #define SOLARIS_WAS_DEFINED 84 #endif 81 # ifdef SOLARIS 82 # undef SOLARIS 83 # define SOLARIS_WAS_DEFINED 84 # endif 85 86 // Python.h/pyconfig.h redefines _XOPEN_SOURCE on some hosts 87 # ifdef _XOPEN_SOURCE 88 # define VBOX_XOPEN_SOURCE_DEFINED _XOPEN_SOURCE 89 # undef _XOPEN_SOURCE 90 # endif 91 92 #endif /* VBOX_PYXPCOM */ 85 93 86 94 #include <Python.h> 87 95 88 #ifdef SOLARIS_WAS_DEFINED89 #define SOLARIS90 #undef SOLARIS_WAS_DEFINED91 #endif92 93 96 #ifdef VBOX_PYXPCOM 94 #if (PY_VERSION_HEX <= 0x02040000) 95 // although in more recent versions of Python this type is ssize_t, earlier 97 98 # ifdef SOLARIS_WAS_DEFINED 99 # define SOLARIS 100 # undef SOLARIS_WAS_DEFINED 101 # endif 102 103 // restore the old value of _XOPEN_SOURCE if not defined by Python.h/pyconfig.h 104 # if !defined(_XOPEN_SOURCE) && defined(VBOX_XOPEN_SOURCE_DEFINED) 105 # define _XOPEN_SOURCE VBOX_XOPEN_SOURCE_DEFINED 106 # endif 107 # undef VBOX_XOPEN_SOURCE_DEFINED 108 109 # if (PY_VERSION_HEX <= 0x02040000) 110 // although in more recent versions of Python this type is ssize_t, earlier 96 111 // it was used as int 97 112 typedef int Py_ssize_t; 98 #endif 99 100 #else 101 102 #include <Python.h> 103 104 #endif 105 106 #if (PY_VERSION_HEX <= 0x02030000) 113 # endif 114 115 # if (PY_VERSION_HEX <= 0x02030000) 107 116 // this one not defined before 108 117 inline PyObject *PyBool_FromLong(long ok) … … 116 125 return result; 117 126 } 118 # endif119 120 #endif 127 # endif 128 129 #endif /* VBOX_PYXPCOM */ 121 130 122 131 #ifdef BUILD_PYXPCOM -
trunk/src/libs/xpcom18a4/python/src/VariantUtils.cpp
r28953 r32229 366 366 memcpy(pthis, PyString_AS_STRING(sequence_ob), sequence_size); 367 367 if (release_seq) 368 { 368 369 Py_DECREF(sequence_ob); 370 } 369 371 return PR_TRUE; 370 372 }
Note:
See TracChangeset
for help on using the changeset viewer.