Changeset 102389 in vbox
- Timestamp:
- Nov 30, 2023 7:25:27 AM (12 months ago)
- Location:
- trunk/src/libs/xpcom18a4/python/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/python/src/PyIID.cpp
r102380 r102389 237 237 { Py_tp_str, (void *)(uintptr_t)&Py_nsIID::PyTypeMethod_str }, 238 238 { Py_tp_richcompare, (void *)(uintptr_t)&Py_nsIID::PyTypeMethod_richcompare }, 239 { Py_tp_is_gc, (void *)(uintptr_t)&Py_nsIID::PyTypeMethod_is_gc },240 239 { 0, NULL } /* terminator */ 241 240 }; … … 321 320 Py_nsIID::PyTypeMethod_richcompare(PyObject *self, PyObject *other, int op) 322 321 { 323 if (self->ob_type != other->ob_type) /* Different types can't be compared. */324 {325 if (op == Py_EQ)326 Py_RETURN_FALSE;327 else if (op == Py_NE)328 Py_RETURN_TRUE;329 330 /* different are not comparable. */331 PyErr_SetString(PyExc_TypeError, "Comparison between different object types is not defined");332 return NULL;333 }334 335 322 PyObject *result = NULL; 336 323 Py_nsIID *s_iid = (Py_nsIID *)self; … … 422 409 delete (Py_nsIID *)ob; 423 410 } 424 425 #ifdef Py_LIMITED_API426 /* static */ int427 Py_nsIID::PyTypeMethod_is_gc(PyObject *self)428 {429 return 1;430 }431 #endif -
trunk/src/libs/xpcom18a4/python/src/PyXPCOM.h
r102380 r102389 586 586 static NS_EXPORT_STATIC_MEMBER_(PyTypeObject *) s_pType; 587 587 static PyTypeObject *GetTypeObject(void); 588 static int PyTypeMethod_is_gc(PyObject *self);589 588 #endif 590 589 static NS_EXPORT_STATIC_MEMBER_(PyMethodDef) methods[];
Note:
See TracChangeset
for help on using the changeset viewer.