Commit 2ac8537d authored by SVN-Git Migration's avatar SVN-Git Migration

Imported Upstream version 1.6.0

parent 0f942191
......@@ -19,7 +19,7 @@ for line in file( version_details ):
key, value = [s.strip() for s in line.split('=',1)]
branding_info[ key ] = value
svnversion_image = os.environ.get( 'PYSVN_SVNVERSION', 'svnversion' )
svnversion_image = os.environ.get( 'WC_SVNVERSION', 'svnversion' )
if ' ' in svnversion_image:
cmd = ('"%s" -c "%s" 2>&1' %
(svnversion_image
......
......@@ -4,21 +4,28 @@ for %%I in ( %0\..\.. ) do set WORKDIR=%%~fI
set PY_MAJ=2
if not "%1" == "" set PY_MAJ=%1
set PY_MIN=4
set PY_MIN=5
if not "%2" == "" set PY_MIN=%2
set BUILD_TYPE=Release
if not "%3" == "" set BUILD_TYPE=%3
if not "%4" == "" set SVN_VER_MAJ_MIN=%4
if "%SVN_VER_MAJ_MIN%" == "" set /p SVN_VER_MAJ_MIN=Build Version:
if "%SVN_VER_MAJ_MIN%" == "" goto :eof
rem Save CWD
pushd .
rem in development the version info can be found
rem otherwise the builder will have run it already
set COMPILER=msvc60
if "%PY_MIN%" == "4" set COMPILER=msvc71
if "%PY_MIN%" == "5" set COMPILER=msvc71
if "%PY_MIN%" == "6" set COMPILER=msvc71
if exist ..\..\ReleaseEngineering\win32-%COMPILER%\software-versions.cmd call ..\..\ReleaseEngineering\win32-%COMPILER%\software-versions.cmd off
if exist ..\..\ReleaseEngineering\win32-%COMPILER%\software-versions-%SVN_VER_MAJ_MIN%.cmd (
pushd ..\..\ReleaseEngineering\win32-%COMPILER%
call software-versions-%SVN_VER_MAJ_MIN%.cmd off
popd
)
set PYCXX=%WORKDIR%\Import\pycxx-%PYCXX_VER%
set OPENSSL=%TARGET%\openssl-%OPENSSL_VER%
......@@ -28,9 +35,10 @@ set PY=c:\python%PY_MAJ%%PY_MIN%
set PYLIB=python%PY_MAJ%%PY_MIN%
set PYTHONPATH=%WORKDIR%\Source
set PYTHON=%PY%\python.exe
set wc_SVNVERSION=L:\BuildRoot\Win32-MSVC71-1.4.6\subversion-1.4.6\Release\bin\svnversion.exe
rem Need python and DB4 on the path
PATH %PY%;%SUBVERSION%\db4-win\bin;%SUBVERSION%\db4-win\lib;%SUBVERSION%\svn-win32-libintl\bin;%SUBVERSION%\%BUILD_TYPE%\subversion\svnadmin;%SUBVERSION%\%BUILD_TYPE%\subversion\svnversion;%SUBVERSION%\%BUILD_TYPE%\subversion\clients\cmdline;%APR%\apr\%BUILD_TYPE%;%APR%\apr-util\%BUILD_TYPE%;%APR%\apr-iconv\%BUILD_TYPE%;%PATH%
rem Need python and SVN on the path
PATH %PY%;%SUBVERSION%\%BUILD_TYPE%\bin;%PATH%
rem prove the python version selected
python -c "import sys;print 'Info: Python Version',sys.version"
......
MAJOR=1
MINOR=5
PATCH=3
MINOR=6
PATCH=0
BUILD=0
BUILD_TYPE=Release
build: all test kit
all:
cd ..\Source && msdev /useenv pysvn.dsw /make "pysvn - Win32 $(BUILD_TYPE)"
clean:
cd ..\Source && msdev /useenv pysvn.dsw /make "pysvn - Win32 $(BUILD_TYPE)" /clean
cd ..\Source && del sept
cd ..\Tests && $(MAKE) -f win32.mak clean
cd ..\kit\Win32 && $(MAKE) clean
kit:
cd ..\kit\Win32 && $(MAKE) all_msvc60
install:
..\kit\Win32\tmp\output\setup.exe
test:
cd ..\Tests && $(MAKE) -f win32.mak
BUILD_TYPE=Release
SVN_VER_MAJ_MIN=1.5
build: all test kit
all:
cd ..\Source && devenv pysvn.sln /useenv /build "$(BUILD_TYPE)" /project "pysvn"
all: all-$(SVN_VER_MAJ_MIN)
clean:
cd ..\Source && devenv pysvn.sln /useenv /clean "$(BUILD_TYPE)" /project "pysvn"
all-1.4:
cd ..\Source && devenv pysvn-for-svn-1-4.sln /useenv /build "$(BUILD_TYPE)" /project "pysvn"
all-1.5:
cd ..\Source && devenv pysvn-for-svn-1-5.sln /useenv /build "$(BUILD_TYPE)" /project "pysvn"
clean: clean-$(SVN_VER_MAJ_MIN)
clean-1.4:
cd ..\Source && devenv pysvn-for-svn-1-4.sln /useenv /clean "$(BUILD_TYPE)" /project "pysvn"
cd ..\Source && del sept
cd ..\Tests && $(MAKE) -f win32.mak clean
cd ..\kit\Win32 && $(MAKE) clean
cd ..\Tests && $(MAKE) -f win32.mak SVN_VER_MAJ_MIN=1.4 clean
cd ..\kit\Win32-1.4 && $(MAKE) clean
clean-1.5:
cd ..\Source && devenv pysvn-for-svn-1-5.sln /useenv /clean "$(BUILD_TYPE)" /project "pysvn"
cd ..\Source && del sept
cd ..\Tests && $(MAKE) -f win32.mak SVN_VER_MAJ_MIN=1.5 clean
cd ..\kit\Win32-1.5 && $(MAKE) clean
kit: kit-$(SVN_VER_MAJ_MIN)
kit:
cd ..\kit\Win32 && $(MAKE) all_msvc71
kit-1.4:
cd ..\kit\Win32-1.4 && $(MAKE) all_msvc71
install:
kit-1.5:
cd ..\kit\Win32-1.5 && $(MAKE) all_msvc71
install: install-$(SVN_VER_MAJ_MIN)
install-1.4:
..\kit\Win32\tmp\output\setup.exe
install-1.5:
..\kit\Win32\tmp\output\setup.exe
test:
cd ..\Tests && $(MAKE) -f win32.mak
test: test-$(SVN_VER_MAJ_MIN)
test-1.4:
cd ..\Tests && $(MAKE) -f win32.mak SVN_VER_MAJ_MIN=1.4
test-1.5:
cd ..\Tests && $(MAKE) -f win32.mak SVN_VER_MAJ_MIN=1.5
......@@ -128,6 +128,7 @@ class XhtmlParser:
self.__extractText( None, docs, node )
debug( 'docsFromNode adding %s' % name )
self.all_docs[ name ] = docs
def __extractText( self, parent, docs, node ):
......
This diff is collapsed.
......@@ -7,9 +7,9 @@
//
// ====================================================================
//
all_versions = new Array( 1001000, 1002000, 1003000, 1004000 )
all_versions = new Array( 1001000, 1002000, 1003000, 1004000, 1005000 )
current_version = 1004000;
current_version = 1005000;
change_style = "hilite";
function changeDisplay( version )
......
......@@ -107,12 +107,24 @@ pysvn.wc_notify_action.update_external: 'X',
pysvn.wc_notify_action.update_update: 'U',
pysvn.wc_notify_action.annotate_revision: 'A',
}
# new in svn 1.4?
if hasattr( pysvn.wc_notify_action, 'locked' ):
wc_notify_action_map[ pysvn.wc_notify_action.locked ] = 'locked'
wc_notify_action_map[ pysvn.wc_notify_action.unlocked ] = 'unlocked'
wc_notify_action_map[ pysvn.wc_notify_action.failed_lock ] = 'failed_lock'
wc_notify_action_map[ pysvn.wc_notify_action.failed_unlock ] = 'failed_unlock'
# new in svn 1.5
if hasattr( pysvn.wc_notify_action, 'exists' ):
wc_notify_action_map[ pysvn.wc_notify_action.exists ] = 'exists'
wc_notify_action_map[ pysvn.wc_notify_action.changelist_set ] = 'changelist_set'
wc_notify_action_map[ pysvn.wc_notify_action.changelist_clear ] = 'changelist_clear'
wc_notify_action_map[ pysvn.wc_notify_action.changelist_moved ] = 'changelist_moved'
wc_notify_action_map[ pysvn.wc_notify_action.foreign_merge_begin ] = 'foreign_merge_begin'
wc_notify_action_map[ pysvn.wc_notify_action.merge_begin ] = 'merge_begin'
wc_notify_action_map[ pysvn.wc_notify_action.update_replace ] = 'update_replace'
class SvnCommand:
def __init__( self, progname ):
......@@ -223,6 +235,7 @@ class SvnCommand:
self.printNotifyMessages()
print e.args[0]
return 1
except CommandError, e:
self.printNotifyMessages()
print e.reason()
......@@ -261,6 +274,14 @@ class SvnCommand:
self.client.add( args.getPositionalArgs( 1 ), recurse=recurse, force=force )
def cmd_add_to_changelist( self, args ):
if not hasattr( self.client, add_to_changelist ):
print 'Error: add_to_changelist is not supported by this version of Subversion'
return
path, changelist = args.getPositionalArgs( 2, 2 )
self.client.add_to_changelist( path, changelist )
def cmd_annotate( self, args ):
start_revision, end_revision = args.getOptionalRevisionPair( '--revision', '0', 'head' )
positional_args = args.getPositionalArgs( 1, 1 )
......@@ -270,12 +291,12 @@ class SvnCommand:
self.printNotifyMessages()
for line in all_lines:
print '%d| r%d | %s | %s | %s' % \
(line['number'],
line['revision'].number,
line['author'],
line['date'],
line['line'])
print ('%d| r%d | %s | %s | %s' %
(line['number']
,line['revision'].number
,line['author']
,line['date']
,line['line']))
cmd_ann = cmd_annotate
def cmd_cat( self, args ):
......@@ -522,25 +543,29 @@ class SvnCommand:
verbose = args.getBooleanOption( '--verbose', True )
positional_args = args.getPositionalArgs( 1, 1 )
all_logs = self.client.log( positional_args[0],
revision_start=start_revision,
revision_end=end_revision,
discover_changed_paths=verbose )
revision_start=start_revision,
revision_end=end_revision,
discover_changed_paths=verbose )
for log in all_logs:
print '-'*60
print 'rev %d: %s | %s | %d lines' % \
(log.revision.number, log.author, fmtDateTime( log.date ),
len(log.message.split('\n')))
print ('rev %d: %s | %s | %d lines' %
(log.revision.number
,log.author
,fmtDateTime( log.date )
,len( log.message.split('\n') )))
if len(log.changed_paths) > 0:
if len( log.changed_paths ) > 0:
print 'Changed paths:'
for change_info in log.changed_paths:
if change_info.copyfrom_path is None:
print ' %s %s' % (change_info.action, change_info.path)
else:
print ' %s %s (from %s:%d)' % \
(change_info.action, change_info.path,
change_info.copyfrom_path, change_info.copyfrom_revision.number)
print (' %s %s (from %s:%d)' %
(change_info.action
,change_info.path
,change_info.copyfrom_path
,change_info.copyfrom_revision.number))
print log.message
......@@ -739,6 +764,14 @@ class SvnCommand:
self.client.remove( positional_args, force=force )
cmd_rm = cmd_remove
def cmd_remove_from_changelists( self, args ):
if not hasattr( self.client, remove_from_changelists ):
print 'Error: remove_from_changelists is not supported by this version of Subversion'
return
path = args.getPositionalArgs( 1, 1 )[0]
self.client.remove_from_changelists( path )
def cmd_resolved( self, args ):
recurse = args.getBooleanOption( '--recursive', True )
positional_args = args.getPositionalArgs( 1, 1 )
......@@ -795,7 +828,9 @@ class SvnCommand:
lock_state = 'O'
if file.entry is not None and detailed:
print '%s%s %s %6d %6d %-14s %s' % (state, lock_state,
print '%s%s %s %6d %6d %-14s %s' % (
state,
lock_state,
odd_status,
file.entry.revision.number,
file.entry.commit_revision.number,
......
......@@ -24,13 +24,13 @@ code {background-color: #dddddd; }
<li>Python pyexpat package
</ul>
</li>
<li><a href="http://subversion.tigris.org">subversion</a> 1.2.x, 1.3.x or 1.4.x with these options:
<li><a href="http://subversion.tigris.org">subversion</a> 1.2.x, 1.3.x 1.4.x or 1.5.x with these options:
<ul>
<li>Subversion client package
<li>Subversion development package
</ul>
</li>
<li><a href="http://sourceforge.net/project/showfiles.php?group_id=3180">PyCXX V5.3.6</a> which is included in the pysvn source kit.</li>
<li><a href="http://sourceforge.net/project/showfiles.php?group_id=3180">PyCXX V5.4.1</a> which is included in the pysvn source kit.</li>
</ul>
<p>Some distributions will split python and subversion into more the one package.</p>
<p>You will need to find all the packages that give you the options listed above.</p>
......@@ -42,9 +42,9 @@ and <a href="http://www.jrsoftware.org/">INNO</a> 4.0.10 to create the installat
<p>Note: You must build with MSVC 2003.NET for python 2.4, Python 2.5 or later.</p>
<ol>
<li>build subversion (tested with SVN 1.3.2 and svn 1.4.0)</li>
<li>build subversion (tested with SVN 1.4.6 and svn 1.5.0)</li>
<li>fetch and expand the pysvn source code into <em>extdir</em></li>
<li>Expand pycxx-5.3.6.tar.gz into <em>extdir</em>\Import if not using a source kit</li>
<li>Expand pycxx-5.4.1.tar.gz into <em>extdir</em>\Import if not using a source kit</li>
<li>edit Builder\builder_custom_init.cmd to match the locations of the sources.</li>
<li><code>cd Builder</code></li>
<li><code>builder_custom_init.cmd</code></li>
......@@ -63,7 +63,7 @@ and <a href="http://www.jrsoftware.org/">INNO</a> 4.0.10 to create the installat
<ol>
<li>Install subversion</li>
<li>get the pysvn source code</li>
<li><code>tar xzf pycxx-5.3.6.tar.gz</code> into <em>extdir</em>/Import if not using a source kit</li>
<li><code>tar xzf pycxx-5.4.1.tar.gz</code> into <em>extdir</em>/Import if not using a source kit</li>
<li><code>cd Source</code></li>
<li>Create the Makefile using <code>python setup.py configure</code></li>
<li><code>make</code></li>
......@@ -76,7 +76,7 @@ to python site-specific directory.</p>
<ul>
<li><code>mkdir <em>python-libdir</em>/site-packages/pysvn</code></li>
<li><code>cp pysvn/__init__.py <em>python-libdir</em>/site-packages/pysvn</code></li>
<li><code>cp pysvn/_pysvn.so <em>python-libdir</em>/site-packages/pysvn</code></li>
<li><code>cp pysvn/_pysvn*.so <em>python-libdir</em>/site-packages/pysvn</code></li>
</ul>
</body>
</html>
./example_common.mak
./example_freebsd_py15.mak
./example_freebsd_py20.mak
./example_freebsd_py21.mak
./example_freebsd_py22.mak
./example_linux_py15.mak
./example_linux_py20.mak
./example_linux_py21.mak
./example_linux_py22.mak
./example_py15.dsp
./example_py15.dsw
./example_py20.dsp
./example_py20.dsw
./example_py21.dsp
./example_py21.dsw
./Legal.html
./m
./MANIFEST
./README.html
./setup.py
./CXX/Config.hxx
./CXX/Exception.hxx
./CXX/Extensions.hxx
./CXX/IndirectPythonInterface.hxx
./CXX/Objects.hxx
./Demo/example.cxx
./Demo/example.def
./Demo/python.cxx
./Demo/range.cxx
./Demo/range.hxx
./Demo/rangetest.cxx
./Demo/setup.py
./Doc/PyCXX.html
./Src/cxxextensions.c
./Src/cxx_extensions.cxx
./Src/cxxsupport.cxx
./Src/IndirectPythonInterface.cxx
./Lib/__init__.py
......@@ -115,4 +115,20 @@
typedef int Py_ssize_t;
#endif
// hash_map container usage selection
// 1) if PYCXX_USING_STD_MAP is defined PyCXX will be using std::map<> container
// implementation only.
// 2) if compilers are used other than MS Visual Studio (7.1+) or GCC 3.x
// STANDARD_LIBRARY_HAS_HASH_MAP must be defined before compilation to
// make PyCXX using hash_map container.
#if !defined( PYCXX_USING_STD_MAP )
#if defined( _MSC_VER ) || defined( __INTEL_COMPILER ) || defined ( __ICC ) || (defined( __GNUC__ ) && ( __GNUC__ > 3 ))
# define PYCXX_USING_HASH_MAP
#else
# if defined( STANDARD_LIBRARY_HAS_HASH_MAP ) && !defined( PYCXX_USING_HASH_MAP )
# define PYCXX_USING_HASH_MAP
# endif
#endif
#endif
#endif // __PyCXX_config_hh__
......@@ -56,8 +56,108 @@ extern "C"
}
#include <vector>
// std::map / hash_map selection and declarations ----------------------------
#if !defined( PYCXX_USING_HASH_MAP )
#include <map>
#else
#if defined( __GNUC__) && !defined( _STLPORT_VERSION )
#include <ext/hash_map>
#else
#include <hash_map>
#endif
#if defined( _STLPORT_VERSION )
#define __PYCXX_HASHMAP_NAMESPACE std
using namespace std;
#elif defined ( _MSC_VER ) && !defined( __INTEL_COMPILER ) && !defined( __ICC ) && !defined( __ICL ) && !defined( __ECC )
#define __PYCXX_HASHMAP_NAMESPACE stdext
using namespace stdext;
#elif defined( __INTEL_COMPILER ) || defined( __ICC ) || defined( __ICL ) || defined( __ECC )
#define __PYCXX_HASHMAP_NAMESPACE stdext
using namespace stdext;
#elif defined( __GNUC__ )
#define __PYCXX_HASHMAP_NAMESPACE __gnu_cxx
using namespace __gnu_cxx;
#else
#define __PYCXX_HASHMAP_NAMESPACE std
using namespace std;
#endif
class __pycxx_str_hash_func
{
public:
enum
{
// parameters for hash table
bucket_size = 4, // 0 < bucket_size
min_buckets = 8 // min_buckets = 2 ^^ N, 0 < N
};
// http://www.azillionmonkeys.com/qed/hash.html
size_t operator()( const std::string &str ) const
{
const unsigned char * data = reinterpret_cast<const unsigned char *>( str.c_str() );
int len = (int)str.length();
unsigned int hash = len;
unsigned int tmp;
int rem;
if (len <= 0 || data == NULL)
return 0;
rem = len & 3;
len >>= 2;
/* Main loop */
for (;len > 0; len--)
{
hash += (data[1] << 8) | data[0];
tmp = (((data[3] << 8) | data[2]) << 11) ^ hash;
hash = (hash << 16) ^ tmp;
data += 2*sizeof (unsigned short);
hash += hash >> 11;
}
/* Handle end cases */
switch (rem)
{
case 3: hash += (data[1] << 8) | data[0];
hash ^= hash << 16;
hash ^= data[sizeof (unsigned short)] << 18;
hash += hash >> 11;
break;
case 2: hash += (data[1] << 8) | data[0];
hash ^= hash << 11;
hash += hash >> 17;
break;
case 1: hash += *data;
hash ^= hash << 10;
hash += hash >> 1;
}
/* Force "avalanching" of final 127 bits */
hash ^= hash << 3;
hash += hash >> 5;
hash ^= hash << 4;
hash += hash >> 17;
hash ^= hash << 25;
hash += hash >> 6;
return hash;
}
bool operator()(const std::string &str_1, const std::string &str_2) const
{
// test if str_1 ordered before str_2
return str_1 < str_2;
}
};
#endif // PYCXX_USING_HASH_MAP
// ----------------------------------------------------------------------
namespace Py
{
class ExtensionModuleBase;
......@@ -205,7 +305,12 @@ namespace Py
protected:
typedef Object (T::*method_varargs_function_t)( const Tuple &args );
typedef Object (T::*method_keyword_function_t)( const Tuple &args, const Dict &kws );
typedef std::map<std::string,MethodDefExt<T> *> method_map_t;
#if defined( PYCXX_USING_HASH_MAP )
typedef __PYCXX_HASHMAP_NAMESPACE::hash_map<std::string, MethodDefExt<T> *, __pycxx_str_hash_func> method_map_t;
#else
typedef std::map<std::string, MethodDefExt<T> *> method_map_t;
#endif
static void add_varargs_method( const char *name, method_varargs_function_t function, const char *doc="" )
{
......@@ -247,7 +352,7 @@ namespace Py
// so that we get called back at the function in T.
//
method_map_t &mm = methods();
EXPLICIT_TYPENAME method_map_t::iterator i;
EXPLICIT_TYPENAME method_map_t::const_iterator i;
for( i=mm.begin(); i != mm.end(); ++i )
{
......@@ -539,7 +644,12 @@ namespace Py
typedef Object (T::*method_varargs_function_t)( const Tuple &args );
typedef Object (T::*method_keyword_function_t)( const Tuple &args, const Dict &kws );
typedef std::map<std::string,MethodDefExt<T> *> method_map_t;
#if defined( PYCXX_USING_HASH_MAP )
typedef __PYCXX_HASHMAP_NAMESPACE::hash_map<std::string, MethodDefExt<T> *, __pycxx_str_hash_func> method_map_t;
#else
typedef std::map<std::string, MethodDefExt<T> *> method_map_t;
#endif
// support the default attributes, __name__, __doc__ and methods
virtual Object getattr_default( const char *_name )
......@@ -578,19 +688,22 @@ namespace Py
std::string name( _name );
method_map_t &mm = methods();
EXPLICIT_TYPENAME method_map_t::const_iterator i;
if( name == "__methods__" )
{
List methods;
for( EXPLICIT_TYPENAME method_map_t::iterator i = mm.begin(); i != mm.end(); ++i )
for( i = mm.begin(); i != mm.end(); ++i )
methods.append( String( (*i).first ) );
return methods;
}
// see if name exists
if( mm.find( name ) == mm.end() )
// see if name exists and get entry with method
i = mm.find( name );
if( i == mm.end() )
throw AttributeError( name );
Tuple self( 2 );
......@@ -598,7 +711,7 @@ namespace Py
self[0] = Object( this );
self[1] = String( name );
MethodDefExt<T> *method_definition = mm[ name ];
MethodDefExt<T> *method_definition = i->second;
PyObject *func = PyCFunction_New( &method_definition->ext_meth_def, self.ptr() );
......@@ -608,6 +721,12 @@ namespace Py
static void add_varargs_method( const char *name, method_varargs_function_t function, const char *doc="" )
{
method_map_t &mm = methods();
// check that all methods added are unique
EXPLICIT_TYPENAME method_map_t::const_iterator i;
i = mm.find( name );
if( i != mm.end() )
throw AttributeError( name );
MethodDefExt<T> *method_definition = new MethodDefExt<T>
(
......@@ -623,6 +742,12 @@ namespace Py
static void add_keyword_method( const char *name, method_keyword_function_t function, const char *doc="" )
{
method_map_t &mm = methods();
// check that all methods added are unique
EXPLICIT_TYPENAME method_map_t::const_iterator i;
i = mm.find( name );
if( i != mm.end() )
throw AttributeError( name );
MethodDefExt<T> *method_definition = new MethodDefExt<T>
(
......@@ -657,9 +782,13 @@ namespace Py
String name( self_and_name_tuple[1] );
method_map_t &mm = methods();
MethodDefExt<T> *meth_def = mm[ name ];
if( meth_def == NULL )
EXPLICIT_TYPENAME method_map_t::const_iterator i;
i = mm.find( name );
if( i == mm.end() )
return 0;
MethodDefExt<T> *meth_def = i->second;
Tuple args( _args );
......@@ -690,9 +819,13 @@ namespace Py
String name( self_and_name_tuple[1] );
method_map_t &mm = methods();
MethodDefExt<T> *meth_def = mm[ name ];
if( meth_def == NULL )
EXPLICIT_TYPENAME method_map_t::const_iterator i;
i = mm.find( name );
if( i == mm.end() )
return 0;
MethodDefExt<T> *meth_def = i->second;
Tuple args( _args );
......
......@@ -92,6 +92,8 @@ PyObject * _Exc_UnicodeError();
//
PyObject * _None();
PyObject * _False();
PyObject * _True();
//
// Wrap Type variables as function calls
......@@ -132,6 +134,9 @@ bool _Frame_Check( PyObject *op );
PyTypeObject * _Function_Type();
bool _Function_Check( PyObject *op );
PyTypeObject * _Bool_Type();
bool _Boolean_Check( PyObject *op );
PyTypeObject * _Int_Type();
bool _Int_Check( PyObject *op );
......