isolating the pure 'runtime' code in pyrun.swg, the API declarations are now in pyapi.swg
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6289 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
983d4abe42
commit
2c962d36f2
4 changed files with 135 additions and 139 deletions
|
|
@ -14,65 +14,6 @@
|
|||
#define SWIGSTATIC(a) static a
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
Alloc. memory flags
|
||||
*/
|
||||
#define SWIG_OLDOBJ 1
|
||||
#define SWIG_NEWOBJ SWIG_OLDOBJ + 1
|
||||
#define SWIG_PYSTR SWIG_NEWOBJ + 1
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* SWIG API.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
/* Common SWIG API */
|
||||
#define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Python_ConvertPtr(obj, pp, type, flags)
|
||||
#define SWIG_NewPointerObj(p, type, flags) SWIG_Python_NewPointerObj(p, type, flags)
|
||||
#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
|
||||
|
||||
/* Python-specific SWIG API */
|
||||
#define SWIG_newvarlink() SWIG_Python_newvarlink()
|
||||
#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
|
||||
#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)
|
||||
#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
|
||||
#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
|
||||
|
||||
/* Internal C/C++ API */
|
||||
#ifdef __cplusplus
|
||||
#define SWIG_new_array(size,Type) (new Type[(size)])
|
||||
#define SWIG_delete(cptr) delete cptr
|
||||
#define SWIG_delete_array(cptr) delete[] cptr
|
||||
#define SWIG_const_cast(a,Type) const_cast<Type >(a)
|
||||
#define SWIG_static_cast(a,Type) static_cast<Type >(a)
|
||||
#define SWIG_reinterpret_cast(a,Type) reinterpret_cast<Type >(a)
|
||||
#define SWIG_new_copy(ptr,Type) (new Type(*ptr))
|
||||
#define SWIG_numeric_cast(a,Type) static_cast<Type >(a)
|
||||
#else /* C case */
|
||||
#define SWIG_new_array(size,Type) ((Type*) malloc((size)*sizeof(Type)))
|
||||
#define SWIG_delete(cptr) free((char*)cptr)
|
||||
#define SWIG_delete_array(cptr) free((char*)cptr)
|
||||
#define SWIG_const_cast(a,Type) (Type)(a)
|
||||
#define SWIG_static_cast(a,Type) (Type)(a)
|
||||
#define SWIG_reinterpret_cast(a,Type) (Type)(a)
|
||||
#define SWIG_numeric_cast(a,Type) (Type)(a)
|
||||
#define SWIG_new_copy(ptr,Type) ((Type*)memcpy(malloc(sizeof(Type)),ptr,sizeof(Type)))
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
Exception handling in wrappers
|
||||
*/
|
||||
#define SWIG_fail goto fail
|
||||
#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
|
||||
#define SWIG_append_errmsg(msg) SWIG_Python_AddErrMesg(msg,0)
|
||||
#define SWIG_preppend_errmsg(msg) SWIG_Python_AddErrMesg(msg,1)
|
||||
#define SWIG_type_error(type,obj) SWIG_Python_TypeError(type,obj)
|
||||
#define SWIG_null_ref(type) SWIG_Python_NullRef(type)
|
||||
|
||||
/*
|
||||
Contract support
|
||||
*/
|
||||
#define SWIG_contract_assert(expr, msg) \
|
||||
if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else
|
||||
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue