cosmetic and docs changes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7422 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-09-10 23:28:36 +00:00
commit 31a8148e51
3 changed files with 83 additions and 49 deletions

View file

@ -1,3 +1,67 @@
/********************************************************************************
*
* User interfaces: include these ones as needed
*
********************************************************************************/
/* -----------------------------------------------------------------------------
* Special types and user helpers
* ----------------------------------------------------------------------------- */
argcargv.i Handler for (int argc, char **argv)
attribute.i Convert a pair of set/get methods into a "native" python attribute
ccomplex.i C99 complex type
complex.i C99 or C++ complex type
cstring.i Various forms of C character string handling
cwstring.i Various forms of C wchar_t string handling
embed.i embedding the Python interpreter in something else
embed15.i embedding the Python interpreter in something else
file.i FILE C type
implicit.i Allow the use of implicit C++ constructors
wchar.i wchar_t C type
/* -----------------------------------------------------------------------------
* C++ STD + STL
* ----------------------------------------------------------------------------- */
std_alloc.i allocator
std_basic_string.i basic string
std_char_traits.i char traits
std_complex.i complex
std_deque.i deque
std_except.i exceptions
std_ios.i ios
std_iostream.i istream/ostream
std_list.i list
std_map.i map
std_multimap.i multimap
std_multiset.i multiset
std_pair.i pair
std_set.i set
std_sstream.i string stream
std_streambuf.i streambuf
std_string.i string
std_vector.i vector
std_wios.i wios
std_wiostream.i wistream/wostream
std_wsstream.i wstring stream
std_wstreambuf.i wstreambuf
std_wstring.i wstring
/*-----------------------------------------------------------------------------
* Backward compatibility
* ----------------------------------------------------------------------------- */
std_vectora.i vector + allocator (allocators are now supported in STD/STL)
typemaps.i old in/out typemaps (doen't need to be included)
/********************************************************************************
/*
* Implementation files: don't look at them unless you are realy drunk
*
********************************************************************************/
/* -----------------------------------------------------------------------------
* Basic files
* ----------------------------------------------------------------------------- */
@ -21,6 +85,7 @@ pyrun.swg Python run-time code
/* -----------------------------------------------------------------------------
* Internal typemap specializations
* ----------------------------------------------------------------------------- */
pyswigtype.swg SWIGTYPE
pyvoid.swg void *
pyobject.swg PyObject
@ -33,48 +98,17 @@ pyenum.swg enum especializations
pycomplex.swg PyComplex and helper for C/C++ complex types
pydocs.swg Typemaps documentation
/* -----------------------------------------------------------------------------
* Special types or user helpers
* ----------------------------------------------------------------------------- */
file.i FILE C type
wchar.i wchar_t C type
ccomplex.i complex C type
cstring.i Various forms of C character string handling
argcargv.i Handler for (int argc, char **argv)
attribute.i Convert a pair of set/get methods into a "native" python attribute
implicit.i Allow the use of implicit C++ constructors
/* -----------------------------------------------------------------------------
* C++ STD + STL
* ----------------------------------------------------------------------------- */
pycontainer.swg python container iterators
std_common.i general common code
std_container.i general container code
std_basic_string.i basic string
std_char_traits.i char traits
std_complex.i complex
std_deque.i deque
std_except.i exceptions
std_ios.i ios
std_iostream.i istream/ostream
std_list.i list
std_map.i map
std_multimap.i multimap
std_multiset.i multiset
std_pair.i pair
std_set.i set
std_streambuf.i streambuf
std_string.i string
std_vector.i vector
std_vectora.i vector + allocator
std_wstring.i wstring
std_common.i general common code for the STD/STL implementation
std_container.i general common code for the STD/STL containers
/* -----------------------------------------------------------------------------
* Backward compatibility
* deprecated
* ----------------------------------------------------------------------------- */
embed15.i embedding the Python interpreter in something else
embed.i embedding the Python interpreter in something else
defarg.swg for processing default arguments with shadow classes
typemaps.i old in/out typemaps

View file

@ -84,7 +84,7 @@
{
$&ltype resultptr;
resultptr = ($&ltype) malloc(sizeof($type));
if (resultptr) memmove(resultptr, &$1, sizeof($type));
if (resultptr) memcpy(resultptr, &$1, sizeof($type));
$result = SWIG_NewPointerObj((void *)(resultptr), $&descriptor, 1);
}
#endif

View file

@ -167,22 +167,22 @@ phased out in future releases.
Apply the INPUT/OUTPUT typemaps to all the C types (int, double, ...) if
not already defined.
*/
%define %typemap_inout(Code,AsMeth, CheckMeth, FromMeth, AsFrag, CheckFrag, FromFrag, ...)
%define %typemap_inout(Code,AsMeth, CheckMeth, FromMeth, AsFrag, CheckFrag, FromFrag, Type...)
_PYVAL_INPUT_TYPEMAP(SWIG_arg(Code), SWIG_arg(AsMeth), SWIG_arg(CheckMeth),
SWIG_arg(AsFrag), SWIG_arg(CheckFrag), SWIG_arg(__VA_ARGS__));
_PYVAL_OUTPUT_TYPEMAP(SWIG_arg(FromMeth), SWIG_arg(FromFrag), SWIG_arg(__VA_ARGS__));
_PYVAL_INOUT_TYPEMAP(SWIG_arg(__VA_ARGS__));
SWIG_arg(AsFrag), SWIG_arg(CheckFrag), SWIG_arg(Type));
_PYVAL_OUTPUT_TYPEMAP(SWIG_arg(FromMeth), SWIG_arg(FromFrag), SWIG_arg(Type));
_PYVAL_INOUT_TYPEMAP(SWIG_arg(Type));
%enddef
%define %typemap_inoutn(Code,...)
%define %typemap_inoutn(Code,Type...)
%typemap_inout(SWIG_arg(Code),
SWIG_arg(SWIG_As(__VA_ARGS__)),
SWIG_arg(SWIG_Check(__VA_ARGS__)),
SWIG_arg(SWIG_From(__VA_ARGS__)),
SWIG_arg(SWIG_As_frag(__VA_ARGS__)),
SWIG_arg(SWIG_Check_frag(__VA_ARGS__)),
SWIG_arg(SWIG_From_frag(__VA_ARGS__)),
SWIG_arg(__VA_ARGS__));
SWIG_arg(SWIG_As(Type)),
SWIG_arg(SWIG_Check(Type)),
SWIG_arg(SWIG_From(Type)),
SWIG_arg(SWIG_As_frag(Type)),
SWIG_arg(SWIG_Check_frag(Type)),
SWIG_arg(SWIG_From_frag(Type)),
SWIG_arg(Type));
%enddef
%apply_checkctypes(%typemap_inoutn)