Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 100999 Details for
Bug 148277
dev-python/sip doesn't compile against Python 2.5
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
sip 4.4.3 patch for python 2.5
sip-4.4.3-python-2.5-compat.diff (text/plain), 5.90 KB, created by
Jimmy.Jazz
on 2006-11-01 13:16:32 UTC
(
hide
)
Description:
sip 4.4.3 patch for python 2.5
Filename:
MIME Type:
Creator:
Jimmy.Jazz
Created:
2006-11-01 13:16:32 UTC
Size:
5.90 KB
patch
obsolete
>Index: branches/py25/lib/sip/siplib/siplib.c >=================================================================== >--- branches/py25/lib/sip/siplib/siplib.c (revision 6441) >+++ branches/py25/lib/sip/siplib/siplib.c (revision 6442) >@@ -377,7 +377,7 @@ > if (PyType_Ready(&sipWrapperType_Type) < 0) > Py_FatalError("sip: Failed to initialise sip.wrappertype type"); > >- if (PyType_Ready(&sipWrapper_Type.super.type) < 0) >+ if (PyType_Ready(&sipWrapper_Type.super.ht_type) < 0) > Py_FatalError("sip: Failed to initialise sip.wrapper type"); > > if (PyType_Ready(&sipVoidPtr_Type) < 0) >@@ -811,7 +811,7 @@ > { > sipWrapperType *wt; > >- if ((wt = *mw++) != NULL && addInstances(wt->super.type.tp_dict, &wt->type->td_instances) < 0) >+ if ((wt = *mw++) != NULL && addInstances(wt->super.ht_type.tp_dict, &wt->type->td_instances) < 0) > return -1; > } > >@@ -3165,7 +3165,7 @@ > if (type->td_scope.sc_flag) > dict = mod_dict; > else >- dict = getClassType(&type->td_scope, client)->super.type.tp_dict; >+ dict = getClassType(&type->td_scope, client)->super.ht_type.tp_dict; > > /* Add the type to the "parent" dictionary. */ > if (PyDict_SetItem(dict,name,(PyObject *)wt) < 0) >@@ -3215,7 +3215,7 @@ > if (ed->e_scope < 0) > dict = mod_dict; > else >- dict = client->em_types[ed->e_scope]->super.type.tp_dict; >+ dict = client->em_types[ed->e_scope]->super.ht_type.tp_dict; > > /* Create the base type tuple if it hasn't already been done. */ > if (bases == NULL && (bases = Py_BuildValue("(O)",&PyInt_Type)) == NULL) >@@ -3401,7 +3401,7 @@ > > self = PyTuple_GET_ITEM(args,argnr); > >- if (!PyObject_TypeCheck(self,&type -> super.type)) >+ if (!PyObject_TypeCheck(self,&type -> super.ht_type)) > return PARSE_UNBOUND; > > *selfp = (sipWrapper *)self; >@@ -4273,7 +4273,7 @@ > { > /* If this is a wrapped type then get the type dictionary. */ > if (sipWrapperType_Check(dict)) >- dict = ((sipWrapperType *)dict)->super.type.tp_dict; >+ dict = ((sipWrapperType *)dict)->super.ht_type.tp_dict; > > return addSingleEnumInstance(dict, name, value, type); > } >@@ -4323,7 +4323,7 @@ > { > /* If this is a wrapped type then get the type dictionary. */ > if (sipWrapperType_Check(dict)) >- dict = ((sipWrapperType *)dict) -> super.type.tp_dict; >+ dict = ((sipWrapperType *)dict) -> super.ht_type.tp_dict; > > return addSingleClassInstance(dict,name,cppPtr,wt,0); > } >@@ -4340,7 +4340,7 @@ > > /* If this is a wrapped type then get the type dictionary. */ > if (sipWrapperType_Check(dict)) >- dict = ((sipWrapperType *)dict)->super.type.tp_dict; >+ dict = ((sipWrapperType *)dict)->super.ht_type.tp_dict; > > if ((w = mt->mt_cfrom(cppPtr, NULL)) == NULL) > return -1; >@@ -4521,7 +4521,7 @@ > if (pyObj == Py_None) > ok = ((flags & SIP_NOT_NONE) == 0); > else if (cto == NULL || (flags & SIP_NO_CONVERTORS) != 0) >- ok = PyObject_TypeCheck(pyObj, &type->super.type); >+ ok = PyObject_TypeCheck(pyObj, &type->super.ht_type); > else > ok = cto(pyObj, NULL, NULL, NULL); > >@@ -4941,7 +4941,7 @@ > * convertor might be able to convert the target type > * to something more specific. > */ >- if (PyType_IsSubtype(&type -> super.type,&scc -> scc_basetype -> super.type)) >+ if (PyType_IsSubtype(&type -> super.ht_type,&scc -> scc_basetype -> super.ht_type)) > { > sipWrapperType *subtype; > >@@ -5495,7 +5495,7 @@ > * We check by comparing the actual type name with the name used to > * create the original wrapped type. > */ >- if ((name = PyString_AsString(wt->super.name)) == NULL) >+ if ((name = PyString_AsString(wt->super.ht_name)) == NULL) > return FALSE; > > return (strcmp(name, getBaseName(wt->type->td_name)) == 0); >@@ -5551,7 +5551,7 @@ > */ > if (self -> type == NULL) > { >- PyObject *sc = self->super.type.tp_base; >+ PyObject *sc = self->super.ht_type.tp_base; > > /* > * Make sure that the type is derived from sip.wrapper. It >@@ -5560,7 +5560,7 @@ > */ > if (sc == NULL || !sipWrapperType_Check(sc)) > { >- PyErr_Format(PyExc_TypeError, "type %s must be derived from sip.wrapper", self->super.type.tp_name); >+ PyErr_Format(PyExc_TypeError, "type %s must be derived from sip.wrapper", self->super.ht_type.tp_name); > return -1; > } > >@@ -5595,7 +5595,7 @@ > PyObject *dict; > PyMethodDef *pmd; > >- dict = wt -> super.type.tp_dict; >+ dict = wt -> super.ht_type.tp_dict; > > /* The base type doesn't have any type information. */ > if ((td = wt->type) == NULL || !isExactWrappedType(wt)) >@@ -5813,7 +5813,7 @@ > } > > /* See if it is an abstract type. */ >- if (sipTypeIsAbstract(wt) && strcmp(strchr(wt->type->td_name, '.') + 1, wt->super.type.tp_name) == 0) >+ if (sipTypeIsAbstract(wt) && strcmp(strchr(wt->type->td_name, '.') + 1, wt->super.ht_type.tp_name) == 0) > { > PyErr_Format(PyExc_TypeError, "%s represents a C++ abstract class and cannot be instantiated", wt->type->td_name); > >@@ -5822,7 +5822,7 @@ > } > > /* Call the standard super-type new. */ >- return PyBaseObject_Type.tp_new(&wt -> super.type,args,kwds); >+ return PyBaseObject_Type.tp_new(&wt -> super.ht_type,args,kwds); > } > > >@@ -6389,7 +6389,7 @@ > > /* Add the slots for this type. */ > if (td -> td_pyslots != NULL) >- initSlots(&wt->super.type, &wt->super.as_number, &wt->super.as_sequence, &wt->super.as_mapping, td->td_pyslots, FALSE); >+ initSlots(&wt->super.ht_type, &wt->super.as_number, &wt->super.as_sequence, &wt->super.as_mapping, td->td_pyslots, FALSE); > > /* Recurse through any super-types. */ > if ((sup = td -> td_supers) != NULL) >Index: branches/py25/lib/sip/siplib/objmap.c >=================================================================== >--- branches/py25/lib/sip/siplib/objmap.c (revision 6441) >+++ branches/py25/lib/sip/siplib/objmap.c (revision 6442) >@@ -114,8 +114,8 @@ > * of it, or vice versa, then we assume it is the same C++ > * object. > */ >- if (PyObject_TypeCheck(w,&type -> super.type) || >- PyType_IsSubtype(&type -> super.type,w -> ob_type)) >+ if (PyObject_TypeCheck(w,&type -> super.ht_type) || >+ PyType_IsSubtype(&type -> super.ht_type,w -> ob_type)) > return w; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 148277
:
97529
|
97537
|
99271
| 100999 |
101002