add -proxydel/-noproxydel plus minor improvements

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7972 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-12-11 10:44:57 +00:00
commit 72b1667a58
4 changed files with 44 additions and 9 deletions

View file

@ -369,7 +369,7 @@ PySwigObject_own(PyObject *v, PyObject *args)
}
SWIGRUNTIME PyTypeObject*
PySwigObject_type(void) {
_PySwigObject_type(void) {
static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
static PyMethodDef
swigobject_methods[] = {
@ -479,6 +479,12 @@ PySwigObject_type(void) {
return &pyswigobject_type;
}
SWIGRUNTIME PyTypeObject*
PySwigObject_type(void) {
static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
return type;
}
SWIGRUNTIME PyObject *
PySwigObject_New(void *ptr, swig_type_info *ty, int own)
{
@ -706,8 +712,8 @@ SWIG_Python_GetSwigThis(PyObject *pyobj)
obj = PyObject_GetAttr(pyobj,SWIG_This());
Py_XDECREF(obj);
#endif
if (!obj || PyErr_Occurred()) {
PyErr_Clear();
if (!obj) {
if (PyErr_Occurred()) PyErr_Clear();
return 0;
}
if (!PySwigObject_Check(obj)) {
@ -839,7 +845,12 @@ SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
{
PyObject *inst = 0;
if (data->newraw) {
#if 1
PyCFunctionWithKeywords meth = (PyCFunctionWithKeywords) PyCFunction_GET_FUNCTION(data->newraw);
inst = (*meth)(PyCFunction_GET_SELF(data->newraw), data->newargs, NULL);
#else
inst = PyObject_Call(data->newraw, data->newargs, NULL);
#endif
if (inst) {
#ifndef SWIG_PYTHON_SLOW_GETSET_THIS
PyObject **dictptr = _PyObject_GetDictPtr(inst);

View file

@ -29,7 +29,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
*alloc = SWIG_NEWOBJ;
}
else {
*cptr = PyString_AsString(obj);
*cptr = cstr;
*alloc = SWIG_OLDOBJ;
}
} else {