"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "contrib/champ/champ_module.c" between
pymol-v1.8.6.0.tar.bz2 and pymol-v2.1.0.tar.bz2

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

champ_module.c  (pymol-v1.8.6.0.tar.bz2):champ_module.c  (pymol-v2.1.0.tar.bz2)
skipping to change at line 58 skipping to change at line 58
return(ret); return(ret);
} }
static PyObject *RetInt(int ok,int result) /* status/integer return */ static PyObject *RetInt(int ok,int result) /* status/integer return */
{ {
return(Py_BuildValue("(ii)",!ok,result)); return(Py_BuildValue("(ii)",!ok,result));
} }
typedef void(*CObjectDestruct)(void*) ; typedef void(*CObjectDestruct)(void*) ;
#if PY_MAJOR_VERSION >= 3
static void ChampCapsuleFree(PyObject * capsule) {
ChampFree(PyCapsule_GetPointer(capsule, NULL));
}
#endif
static PyObject *_new(PyObject *self, PyObject *args) static PyObject *_new(PyObject *self, PyObject *args)
{ {
#if PY_MAJOR_VERSION >= 3
void * I = ChampNew();
return PyCapsule_New(I, NULL, ChampCapsuleFree);
#else
return(PyCObject_FromVoidPtr((void*)ChampNew(),(CObjectDestruct)ChampFree)); return(PyCObject_FromVoidPtr((void*)ChampNew(),(CObjectDestruct)ChampFree));
#endif
} }
static PyObject *_memory_dump(PyObject *self, PyObject *args) static PyObject *_memory_dump(PyObject *self, PyObject *args)
{ {
int ok=true; int ok=true;
PyObject *O; PyObject *O;
CChamp *I; CChamp *I;
ok = PyArg_ParseTuple(args,"O",&O); ok = PyArg_ParseTuple(args,"O",&O);
ok = PyCObject_Check(O); ok = PyCObject_Check(O);
if(ok) { if(ok) {
 End of changes. 3 change blocks. 
0 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)