sharedfuncs.cpp
/* Unboxes an object, returning a borrowed reference */
Unboxes an object, returning a borrowed reference
Unboxes an object returning a borrowed reference
PyObject *unbox (const mxArray *mxobj) {  
  if (!mxobj) return PyErr_Format(MATLABError, "Can't unbox from null pointer");
  if (mxIsPyNull(mxobj)) {
    PYMEX_DEBUG("Unboxed a null object.");
    return PyErr_Format(MATLABError, "Unboxed pointer is null.");
  }
  else {
    void **ptr = (void **) mxGetData(mxGetProperty(mxobj, 0, "pointer"));
    return (PyObject *) *ptr;
  }
}
PyObject * unbox ( const mxArray * mxobj ) { if ( ! mxobj ) return PyErr_Format ( MATLABError , " " ) ; if ( mxIsPyNull ( mxobj ) ) { PYMEX_DEBUG ( " " ) ; return PyErr_Format ( MATLABError , " " ) ; } else { void * * ptr = ( void * * ) mxGetData ( mxGetProperty ( mxobj , 0 , " " ) ) ; return ( PyObject * ) * ptr ; } }
Unboxes an object, returning a borrowed reference
Unboxes an object returning a borrowed reference