ctypes-commit Mailing List for ctypes (Page 31)
Brought to you by:
theller
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
(90) |
Jun
(143) |
Jul
(106) |
Aug
(94) |
Sep
(84) |
Oct
(163) |
Nov
(60) |
Dec
(58) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(128) |
Feb
(79) |
Mar
(227) |
Apr
(192) |
May
(179) |
Jun
(41) |
Jul
(53) |
Aug
(103) |
Sep
(28) |
Oct
(38) |
Nov
(81) |
Dec
(17) |
2006 |
Jan
(184) |
Feb
(111) |
Mar
(188) |
Apr
(67) |
May
(58) |
Jun
(123) |
Jul
(73) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Thomas H. <th...@us...> - 2006-01-26 07:14:30
|
Update of /cvsroot/ctypes/ctypes/ctypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8156 Modified Files: Tag: branch_1_0 _loader.py Log Message: Remove register_library_alias. It doesn't belong here. IMO. Index: _loader.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/Attic/_loader.py,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** _loader.py 25 Jan 2006 21:19:44 -0000 1.1.2.6 --- _loader.py 26 Jan 2006 07:14:21 -0000 1.1.2.7 *************** *** 2,8 **** import sys, os import ctypes - from itertools import chain ! __all__ = ["register_library_alias", "LibraryLoader"] if os.name in ("nt", "ce"): --- 2,7 ---- import sys, os import ctypes ! __all__ = ["LibraryLoader", "RTLD_LOCAL", "RTLD_GLOBAL"] if os.name in ("nt", "ce"): *************** *** 12,38 **** from _ctypes import dlopen, RTLD_LOCAL, RTLD_GLOBAL - def register_library_alias(alias, libname, osname, platform=None): - """XXX document me""" - global _library_map - if osname is not None and osname != os.name: - return - if platform is not None and platform != sys.platform: - return - _library_map[alias] = libname - - _library_map = {} - - # XXX Find a better way to determine whether "msvcrt" or "msvcr71" - # should be used - if sys.version_info < (2, 4): - register_library_alias("c", "msvcrt", "nt") - register_library_alias("m", "msvcrt", "nt") - else: - register_library_alias("c", "msvcr71", "nt") - register_library_alias("m", "msvcr71", "nt") - - register_library_alias("c", "coredll", "ce") - register_library_alias("m", "coredll", "ce") - # _findLib(name) returns an iterable of possible names for a library. if os.name in ("nt", "ce"): --- 11,14 ---- *************** *** 193,197 **** .load_version() instead. """ ! for libname in chain(_findLib(name), [_library_map.get(name)]): try: return self.load(libname, mode) --- 169,173 ---- .load_version() instead. """ ! for libname in _findLib(name): try: return self.load(libname, mode) *************** *** 230,256 **** print cdll.load_version("crypto", "0.9.7") ! ! ## print cdll.m ! ## print cdll.find("m") ! ! ## if os.name == "nt": ! ## print cdll.load("user32") ! ## print cdll.user32 ! ## print cdll.find("user32") ! ## # does this make sense? not really... ! ## print cdll.load_version("msvcr", "71") ! ## print cdll.load_version("msvcr", "t") ! ## elif (os.name, sys.platform) == ("posix", "darwin"): ! ## print cdll.find("AGL") ! ## print cdll.find("OpenGL") ! ## print cdll.find("GLUT") ! ## elif os.name == "posix": ! ## print cdll.load("libc.so.6") ! ## print cdll.load("libGL.so", RTLD_GLOBAL) ! ## print cdll.load_version("m", "6") ! ## print cdll.m ! ## print cdll.png ! ## print cdll._a_b_c_ ! ## print cdll.xyz --- 206,223 ---- print cdll.load_version("crypto", "0.9.7") ! if os.name == "posix" and sys.platform == "darwin": ! print cdll.load("libm.dylib") ! print cdll.load("libcrypt.dylib") ! else: ! print cdll.load("libm.so") ! print cdll.load("libcrypt.so") ! if os.name == "nt": ! ## load(filename) ! print cdll.load("msvcrt") ! print cdll.find("m") ! print cdll.load_version("msvcr", "71") ! ! ## load_version(name, version) ! ## find(name) |
From: Thomas H. <th...@us...> - 2006-01-25 21:19:52
|
Update of /cvsroot/ctypes/ctypes/ctypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3577 Modified Files: Tag: branch_1_0 _loader.py Log Message: Work in progress. Index: _loader.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/Attic/_loader.py,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** _loader.py 25 Jan 2006 21:07:45 -0000 1.1.2.5 --- _loader.py 25 Jan 2006 21:19:44 -0000 1.1.2.6 *************** *** 224,238 **** cdll = LibraryLoader(CDLL) - ##logging.basicConfig() - ##logging.getLogger().setLevel(logging.DEBUG) - if __name__ == "__main__": ! ## load(filename) ! print cdll.load("msvcrt") print cdll.find("m") ! print cdll.load_version("msvcr", "71") ! ## load_version(name, version) ! ## find(name) ! --- 224,232 ---- cdll = LibraryLoader(CDLL) if __name__ == "__main__": ! # platform independend tests print cdll.find("m") ! print cdll.find("c") ! print cdll.load_version("crypto", "0.9.7") |
From: Thomas H. <th...@us...> - 2006-01-25 21:07:55
|
Update of /cvsroot/ctypes/ctypes/ctypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32330 Modified Files: Tag: branch_1_0 _loader.py Log Message: Work in progress. Index: _loader.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/Attic/_loader.py,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** _loader.py 25 Jan 2006 20:22:14 -0000 1.1.2.4 --- _loader.py 25 Jan 2006 21:07:45 -0000 1.1.2.5 *************** *** 1,8 **** # WORK IN PROGRESS! DO NOT (yet) USE! import sys, os - import logging import ctypes ! ! logger = logging.getLogger(__name__) __all__ = ["register_library_alias", "LibraryLoader"] --- 1,6 ---- # WORK IN PROGRESS! DO NOT (yet) USE! import sys, os import ctypes ! from itertools import chain __all__ = ["register_library_alias", "LibraryLoader"] *************** *** 25,29 **** _library_map = {} ! # XXX Find a way to determine whether "msvcrt" or "msvcr71" should be used if sys.version_info < (2, 4): register_library_alias("c", "msvcrt", "nt") --- 23,28 ---- _library_map = {} ! # XXX Find a better way to determine whether "msvcrt" or "msvcr71" ! # should be used if sys.version_info < (2, 4): register_library_alias("c", "msvcrt", "nt") *************** *** 36,40 **** register_library_alias("m", "coredll", "ce") ! # _findLib(name) returns a sequence of possible names for a library. if os.name in ("nt", "ce"): def _findLib(name): --- 35,39 ---- register_library_alias("m", "coredll", "ce") ! # _findLib(name) returns an iterable of possible names for a library. if os.name in ("nt", "ce"): def _findLib(name): *************** *** 138,142 **** return self._dlltype(libname, mode) ! def load_version(self, name, version, mode=None): """Build a (system dependend) filename from 'name' and 'version', then load and return it. 'name' is the library --- 137,168 ---- return self._dlltype(libname, mode) ! # Helper for load_version - assembles a filename from name and filename ! if os.name in ("nt", "ce"): ! # Windows (XXX what about cygwin?) ! def _plat_load_version(self, name, version, mode=None): ! # not sure if this makes sense ! if version is not None: ! return self.load(name + version, mode) ! return self.load(name, mode) ! ! elif os.name == "posix" and sys.platform == "darwin": ! # Mac OS X ! def _plat_load_version(self, name, version, mode=None): ! if version: ! return self.load("lib%s.%s.dylib" % (name, version), mode) ! return self.load("lib%s.dylib" % name, mode) ! ! elif os.name == "posix": ! # Posix ! def _plat_load_version(self, name, version, mode=None): ! if version: ! return self.load("lib%s.so.%s" % (name, version), mode) ! return self.load("lib%s.so" % name, mode) ! else: ! # Others, TBD ! def _plat_load_version(self, name, version, mode=None): ! return self.load(name, mode) ! ! def load_version(self, name, version=None, mode=None): """Build a (system dependend) filename from 'name' and 'version', then load and return it. 'name' is the library *************** *** 149,159 **** constructor, it is ignored on Windows. """ ! # XXX Should call ??? on posix ! if os.name in ("nt", "ce"): ! # does this make sense (on Windows), or should 'version' ! # be ignored (like 'mode' is)? ! return self.load("%s%s.dll" % (name, version)) ! else: ! return self.load("lib%s.so.%s" % (name, version), mode) def find(self, name, mode=None): --- 175,179 ---- constructor, it is ignored on Windows. """ ! return self._plat_load_version(name, version, mode) def find(self, name, mode=None): *************** *** 173,185 **** .load_version() instead. """ - from itertools import chain for libname in chain(_findLib(name), [_library_map.get(name)]): try: ! result = self.load(libname, mode) except OSError: continue - else: - logger.info("_findLib(%s) -> %s", name, libname) - return result raise OSError("Library %r not found" % name) --- 193,201 ---- .load_version() instead. """ for libname in chain(_findLib(name), [_library_map.get(name)]): try: ! return self.load(libname, mode) except OSError: continue raise OSError("Library %r not found" % name) *************** *** 211,236 **** ##logging.getLogger().setLevel(logging.DEBUG) ! print cdll.m ! print cdll.find("m") ! ! if os.name == "nt": ! print cdll.load("user32") ! print cdll.user32 ! print cdll.find("user32") ! # does this make sense? not really... print cdll.load_version("msvcr", "71") ! print cdll.load_version("msvcr", "t") ! elif (os.name, sys.platform) == ("posix", "darwin"): ! print cdll.find("AGL") ! print cdll.find("OpenGL") ! print cdll.find("GLUT") ! elif os.name == "posix": ! print cdll.load("libc.so.6") ! print cdll.load("libGL.so", RTLD_GLOBAL) - print cdll.load_version("m", "6") ! print cdll.m ! print cdll.png ! print cdll._a_b_c_ ! print cdll.xyz --- 227,262 ---- ##logging.getLogger().setLevel(logging.DEBUG) ! if __name__ == "__main__": ! ## load(filename) ! print cdll.load("msvcrt") ! print cdll.find("m") print cdll.load_version("msvcr", "71") ! ## load_version(name, version) ! ## find(name) ! ! ## print cdll.m ! ## print cdll.find("m") ! ! ## if os.name == "nt": ! ## print cdll.load("user32") ! ## print cdll.user32 ! ## print cdll.find("user32") ! ## # does this make sense? not really... ! ## print cdll.load_version("msvcr", "71") ! ## print cdll.load_version("msvcr", "t") ! ## elif (os.name, sys.platform) == ("posix", "darwin"): ! ## print cdll.find("AGL") ! ## print cdll.find("OpenGL") ! ## print cdll.find("GLUT") ! ## elif os.name == "posix": ! ## print cdll.load("libc.so.6") ! ## print cdll.load("libGL.so", RTLD_GLOBAL) ! ! ## print cdll.load_version("m", "6") ! ! ## print cdll.m ! ## print cdll.png ! ## print cdll._a_b_c_ ! ## print cdll.xyz |
From: Thomas H. <th...@us...> - 2006-01-25 20:22:37
|
Update of /cvsroot/ctypes/ctypes/ctypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17148 Modified Files: Tag: branch_1_0 _loader.py Log Message: Add the register_library_alias function. Add __all__. Tweaks for Windows. Index: _loader.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/Attic/_loader.py,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** _loader.py 25 Jan 2006 19:48:57 -0000 1.1.2.3 --- _loader.py 25 Jan 2006 20:22:14 -0000 1.1.2.4 *************** *** 6,9 **** --- 6,11 ---- logger = logging.getLogger(__name__) + __all__ = ["register_library_alias", "LibraryLoader"] + if os.name in ("nt", "ce"): from _ctypes import LoadLibrary as dlopen *************** *** 12,15 **** --- 14,44 ---- from _ctypes import dlopen, RTLD_LOCAL, RTLD_GLOBAL + def register_library_alias(alias, libname, osname, platform=None): + """XXX document me""" + global _library_map + if osname is not None and osname != os.name: + return + if platform is not None and platform != sys.platform: + return + _library_map[alias] = libname + + _library_map = {} + + # XXX Find a way to determine whether "msvcrt" or "msvcr71" should be used + if sys.version_info < (2, 4): + register_library_alias("c", "msvcrt", "nt") + register_library_alias("m", "msvcrt", "nt") + else: + register_library_alias("c", "msvcr71", "nt") + register_library_alias("m", "msvcr71", "nt") + + register_library_alias("c", "coredll", "ce") + register_library_alias("m", "coredll", "ce") + + # _findLib(name) returns a sequence of possible names for a library. + if os.name in ("nt", "ce"): + def _findLib(name): + return [name] + if os.name == "posix" and sys.platform == "darwin": from ctypes.macholib.dyld import dyld_find as _dyld_find *************** *** 104,107 **** --- 133,137 ---- constructor, it is ignored on Windows. """ + # XXX Should call dyld_find on OS X (?) if mode is None: mode = self._mode *************** *** 119,122 **** --- 149,153 ---- constructor, it is ignored on Windows. """ + # XXX Should call ??? on posix if os.name in ("nt", "ce"): # does this make sense (on Windows), or should 'version' *************** *** 142,146 **** .load_version() instead. """ ! for libname in _findLib(name): try: result = self.load(libname, mode) --- 173,178 ---- .load_version() instead. """ ! from itertools import chain ! for libname in chain(_findLib(name), [_library_map.get(name)]): try: result = self.load(libname, mode) *************** *** 150,154 **** logger.info("_findLib(%s) -> %s", name, libname) return result ! raise OSError("Library %r not found") def __getattr__(self, name): --- 182,186 ---- logger.info("_findLib(%s) -> %s", name, libname) return result ! raise OSError("Library %r not found" % name) def __getattr__(self, name): *************** *** 160,163 **** --- 192,198 ---- return dll + ################################################################ + # test code + class CDLL(object): def __init__(self, name, mode): *************** *** 173,192 **** cdll = LibraryLoader(CDLL) - ################################################################ - # test code - ##logging.basicConfig() ##logging.getLogger().setLevel(logging.DEBUG) if os.name == "nt": ! print cdll.load("msvcrt", 42) ! print cdll.msvcrt ! print cdll.find("msvcr71") ! # does this make sense? print cdll.load_version("msvcr", "71") print cdll.load_version("msvcr", "t") elif (os.name, sys.platform) == ("posix", "darwin"): - print cdll.find("c") - print cdll.m print cdll.find("AGL") print cdll.find("OpenGL") --- 208,225 ---- cdll = LibraryLoader(CDLL) ##logging.basicConfig() ##logging.getLogger().setLevel(logging.DEBUG) + print cdll.m + print cdll.find("m") + if os.name == "nt": ! print cdll.load("user32") ! print cdll.user32 ! print cdll.find("user32") ! # does this make sense? not really... print cdll.load_version("msvcr", "71") print cdll.load_version("msvcr", "t") elif (os.name, sys.platform) == ("posix", "darwin"): print cdll.find("AGL") print cdll.find("OpenGL") |
From: Thomas H. <th...@us...> - 2006-01-25 19:49:11
|
Update of /cvsroot/ctypes/ctypes/ctypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5952 Modified Files: Tag: branch_1_0 _loader.py Log Message: Implemented the new library loading API on OS X. Index: _loader.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/Attic/_loader.py,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** _loader.py 11 Jan 2006 07:49:00 -0000 1.1.2.2 --- _loader.py 25 Jan 2006 19:48:57 -0000 1.1.2.3 *************** *** 1,6 **** --- 1,9 ---- # WORK IN PROGRESS! DO NOT (yet) USE! import sys, os + import logging import ctypes + logger = logging.getLogger(__name__) + if os.name in ("nt", "ce"): from _ctypes import LoadLibrary as dlopen *************** *** 9,12 **** --- 12,74 ---- from _ctypes import dlopen, RTLD_LOCAL, RTLD_GLOBAL + if os.name == "posix" and sys.platform == "darwin": + from ctypes.macholib.dyld import dyld_find as _dyld_find + def _findLib(name): + possible = ['lib%s.dylib' % name, + '%s.dylib' % name, + '%s.framework/%s' % (name, name)] + for name in possible: + try: + return [_dyld_find(name)] + except ValueError: + continue + return [] + + elif os.name == "posix": + # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump + import re, tempfile + + def _findLib_gcc(name): + expr = '[^\(\)\s]*lib%s\.[^\(\)\s]*' % name + cmd = 'if type gcc &>/dev/null; then CC=gcc; else CC=cc; fi;' \ + '$CC -Wl,-t -o /dev/null 2>&1 -l' + name + try: + fdout, outfile = tempfile.mkstemp() + fd = os.popen(cmd) + trace = fd.read() + err = fd.close() + finally: + try: + os.unlink(outfile) + except OSError, e: + if e.errno != errno.ENOENT: + raise + res = re.search(expr, trace) + if not res: + return None + return res.group(0) + + def _findLib_ld(name): + expr = '/[^\(\)\s]*lib%s\.[^\(\)\s]*' % name + res = re.search(expr, os.popen('/sbin/ldconfig -p 2>/dev/null').read()) + if not res: + return None + return res.group(0) + + def _get_soname(f): + cmd = "objdump -p -j .dynamic 2>/dev/null " + f + res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read()) + if not res: + return f + return res.group(1) + + def _findLib(name): + lib = _findLib_ld(name) + if not lib: + lib = _findLib_gcc(name) + if not lib: + return [name] + return [_get_soname(lib)] + class LibraryLoader(object): """Loader for shared libraries. *************** *** 80,94 **** .load_version() instead. """ ! if os.name in ("nt", "ce"): ! return self.load(name) ! else: ! from ctypes.util import findLib ! for libname in findLib(name): try: ! return self.load(libname, mode) ! except OSError, error: continue ! else: ! raise OSError, error def __getattr__(self, name): --- 142,154 ---- .load_version() instead. """ ! for libname in _findLib(name): try: ! result = self.load(libname, mode) ! except OSError: continue ! else: ! logger.info("_findLib(%s) -> %s", name, libname) ! return result ! raise OSError("Library %r not found") def __getattr__(self, name): *************** *** 116,119 **** --- 176,182 ---- # test code + ##logging.basicConfig() + ##logging.getLogger().setLevel(logging.DEBUG) + if os.name == "nt": print cdll.load("msvcrt", 42) *************** *** 123,127 **** print cdll.load_version("msvcr", "71") print cdll.load_version("msvcr", "t") ! else: print cdll.load("libc.so.6") print cdll.load("libGL.so", RTLD_GLOBAL) --- 186,196 ---- print cdll.load_version("msvcr", "71") print cdll.load_version("msvcr", "t") ! elif (os.name, sys.platform) == ("posix", "darwin"): ! print cdll.find("c") ! print cdll.m ! print cdll.find("AGL") ! print cdll.find("OpenGL") ! print cdll.find("GLUT") ! elif os.name == "posix": print cdll.load("libc.so.6") print cdll.load("libGL.so", RTLD_GLOBAL) |
From: Thomas H. <th...@us...> - 2006-01-25 19:47:58
|
Update of /cvsroot/ctypes/ctypes/ctypes/macholib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5637 Modified Files: Tag: branch_1_0 README.ctypes __init__.py dyld.py Log Message: Updated the macholib files to SVN revision 789. Index: README.ctypes =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/macholib/README.ctypes,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** README.ctypes 15 Apr 2005 17:23:12 -0000 1.1.2.1 --- README.ctypes 25 Jan 2006 19:47:46 -0000 1.1.2.2 *************** *** 4,6 **** the MIT or PSF open source licenses. ! This is version 0.7, SVN revision 452, from 2005/04/15. \ No newline at end of file --- 4,7 ---- the MIT or PSF open source licenses. ! This is version 1.0, SVN revision 789, from 2006/01/25. ! The main repository is http://svn.red-bean.com/bob/macholib/trunk/macholib/ \ No newline at end of file Index: __init__.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/macholib/__init__.py,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** __init__.py 15 Apr 2005 17:23:12 -0000 1.1.2.1 --- __init__.py 25 Jan 2006 19:47:46 -0000 1.1.2.2 *************** *** 7,9 **** """ ! __version__ = '0.7' --- 7,9 ---- """ ! __version__ = '1.0' Index: dyld.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/macholib/dyld.py,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** dyld.py 22 Dec 2005 20:45:20 -0000 1.1.2.2 --- dyld.py 25 Jan 2006 19:47:46 -0000 1.1.2.3 *************** *** 6,10 **** from framework import framework_info from dylib import dylib_info ! from itertools import chain __all__ = [ --- 6,10 ---- from framework import framework_info from dylib import dylib_info ! from itertools import * __all__ = [ *************** *** 62,69 **** def dyld_image_suffix_search(iterator, env=None): """For a potential path iterator, add DYLD_IMAGE_SUFFIX semantics""" ! suffix = dyld_image_suffix() if suffix is None: return iterator ! def _inject(iterator=iterator,suffix=suffix): for path in iterator: if path.endswith('.dylib'): --- 62,69 ---- def dyld_image_suffix_search(iterator, env=None): """For a potential path iterator, add DYLD_IMAGE_SUFFIX semantics""" ! suffix = dyld_image_suffix(env) if suffix is None: return iterator ! def _inject(iterator=iterator, suffix=suffix): for path in iterator: if path.endswith('.dylib'): *************** *** 81,94 **** framework = framework_info(name) ! if framework is not None: ! for path in dyld_framework_path(): yield os.path.join(path, framework['name']) # If DYLD_LIBRARY_PATH is set then use the first file that exists ! # in the path. If none use the original name. ! for path in dyld_library_path(): ! yield os.path.join(path, os.path.dirname(name)) ! def dyld_executable_path_search(name, executable_path=None): # If we haven't done any searching and found a library and the --- 81,94 ---- framework = framework_info(name) ! if framework is not None: ! for path in dyld_framework_path(env): yield os.path.join(path, framework['name']) # If DYLD_LIBRARY_PATH is set then use the first file that exists ! # in the path. If none use the original name. ! for path in dyld_library_path(env): ! yield os.path.join(path, os.path.basename(name)) ! def dyld_executable_path_search(name, executable_path=None): # If we haven't done any searching and found a library and the *************** *** 104,112 **** if framework is not None: ! fallback_framework_path = dyld_fallback_framework_path() for path in fallback_framework_path: yield os.path.join(path, framework['name']) ! fallback_library_path = dyld_fallback_library_path() for path in fallback_library_path: yield os.path.join(path, os.path.basename(name)) --- 104,112 ---- if framework is not None: ! fallback_framework_path = dyld_fallback_framework_path(env) for path in fallback_framework_path: yield os.path.join(path, framework['name']) ! fallback_library_path = dyld_fallback_library_path(env) for path in fallback_library_path: yield os.path.join(path, os.path.basename(name)) *************** *** 159,164 **** def test_dyld_find(): ! print dyld_find('libSystem') ! print dyld_find('System.framework/System') if __name__ == '__main__': --- 159,165 ---- def test_dyld_find(): ! env = {} ! assert dyld_find('libSystem.dylib') == '/usr/lib/libSystem.dylib' ! assert dyld_find('System.framework/System') == '/System/Library/Frameworks/System.framework/System' if __name__ == '__main__': |
From: Thomas H. <th...@us...> - 2006-01-23 12:25:57
|
Update of /cvsroot/ctypes/ctypes/ctypes/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7458 Modified Files: Tag: branch_1_0 test_loading.py Log Message: Changes for windows CE. Index: test_loading.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/test/Attic/test_loading.py,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** test_loading.py 2 Jan 2006 15:09:01 -0000 1.1.2.2 --- test_loading.py 23 Jan 2006 12:25:49 -0000 1.1.2.3 *************** *** 10,13 **** --- 10,15 ---- if os.name == "nt": name = "msvcrt" + elif os.name == "ce": + name = "coredll" elif sys.platform == "darwin": name = "libc.dylib" |
From: Thomas H. <th...@us...> - 2006-01-23 12:25:41
|
Update of /cvsroot/ctypes/ctypes/ctypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7404 Modified Files: Tag: branch_1_0 __init__.py Log Message: Changes for windows CE. Index: __init__.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/__init__.py,v retrieving revision 1.61.2.23 retrieving revision 1.61.2.24 diff -C2 -d -r1.61.2.23 -r1.61.2.24 *** __init__.py 5 Jan 2006 20:52:01 -0000 1.61.2.23 --- __init__.py 23 Jan 2006 12:25:34 -0000 1.61.2.24 *************** *** 104,107 **** --- 104,109 ---- _FUNCFLAG_STDCALL = _FUNCFLAG_CDECL + if _os.name == "nt": + # 'ce' doesn't have the stdcall calling convention _win_functype_cache = {} def WINFUNCTYPE(restype, *argtypes): *************** *** 392,395 **** --- 394,400 ---- register_library_alias("m", "msvcrt", "nt") + register_library_alias("c", "coredll", "ce") + register_library_alias("m", "coredll", "ce") + class _DLLS(object): def __init__(self, dlltype): |
From: Thomas H. <th...@us...> - 2006-01-23 12:19:41
|
Update of /cvsroot/ctypes/ctypes/ctypes/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5358 Modified Files: Tag: branch_1_0 test_bitfields.py Log Message: Make test work on windows ce. Index: test_bitfields.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/test/Attic/test_bitfields.py,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** test_bitfields.py 3 Nov 2005 19:49:19 -0000 1.1.2.1 --- test_bitfields.py 23 Jan 2006 12:19:20 -0000 1.1.2.2 *************** *** 1,5 **** from ctypes import * import unittest ! import sys import ctypes --- 1,5 ---- from ctypes import * import unittest ! import os import ctypes *************** *** 199,203 **** _fields_ = [("a", c_byte, 4), ("b", c_int, 4)] ! if sys.platform == "win32": self.failUnlessEqual(sizeof(X), sizeof(c_int)*2) else: --- 199,203 ---- _fields_ = [("a", c_byte, 4), ("b", c_int, 4)] ! if os.name in ("nt", "ce"): self.failUnlessEqual(sizeof(X), sizeof(c_int)*2) else: |
From: Thomas H. <th...@us...> - 2006-01-23 12:16:58
|
Update of /cvsroot/ctypes/ctypes/ctypes/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4487 Modified Files: Tag: branch_1_0 test_checkretval.py Log Message: Windows CE has CreateTypeLib2, but not CreateTypeLib. Index: test_checkretval.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/test/Attic/test_checkretval.py,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** test_checkretval.py 2 Jan 2006 19:12:01 -0000 1.1.2.2 --- test_checkretval.py 23 Jan 2006 12:16:44 -0000 1.1.2.3 *************** *** 34,38 **** def test_oledll(self): self.failUnlessRaises(WindowsError, ! oledll.oleaut32.CreateTypeLib, 0, 0, 0) --- 34,38 ---- def test_oledll(self): self.failUnlessRaises(WindowsError, ! oledll.oleaut32.CreateTypeLib2, 0, 0, 0) |
From: Thomas H. <th...@us...> - 2006-01-20 21:35:09
|
Update of /cvsroot/ctypes/ctypes/ctypes/macholib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30959 Added Files: Tag: branch_1_0 fetch_macholib Log Message: script to fetch macholib from snv --- NEW FILE: fetch_macholib --- #!/bin/sh svn export --force http://svn.red-bean.com/bob/macholib/trunk/macholib/ . |
From: Thomas H. <th...@us...> - 2006-01-20 21:32:18
|
Update of /cvsroot/ctypes/ctypes/ctypes/macholib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30143 Added Files: Tag: branch_1_0 fetch_macholib.bat Log Message: Batchfile to fetch a new macholib version. --- NEW FILE: fetch_macholib.bat --- svn export --force http://svn.red-bean.com/bob/macholib/trunk/macholib/ . |
From: Thomas H. <th...@us...> - 2006-01-17 14:56:10
|
Update of /cvsroot/ctypes/ctypes/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10583 Modified Files: Tag: branch_1_0 _ctypes.c Log Message: Fill in the tp_basicsize fields of some types. Python 2.5 complains with an assert (in a debug build) if these are zero. Index: _ctypes.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/_ctypes.c,v retrieving revision 1.226.2.43 retrieving revision 1.226.2.44 diff -C2 -d -r1.226.2.43 -r1.226.2.44 *** _ctypes.c 4 Jan 2006 18:28:26 -0000 1.226.2.43 --- _ctypes.c 17 Jan 2006 14:55:59 -0000 1.226.2.44 *************** *** 3318,3322 **** 0, "_ctypes.Structure", ! 0, /* tp_basicsize */ 0, /* tp_itemsize */ 0, /* tp_dealloc */ --- 3318,3322 ---- 0, "_ctypes.Structure", ! sizeof(CDataObject), /* tp_basicsize */ 0, /* tp_itemsize */ 0, /* tp_dealloc */ *************** *** 3361,3365 **** 0, "_ctypes.Union", ! 0, /* tp_basicsize */ 0, /* tp_itemsize */ 0, /* tp_dealloc */ --- 3361,3365 ---- 0, "_ctypes.Union", ! sizeof(CDataObject), /* tp_basicsize */ 0, /* tp_itemsize */ 0, /* tp_dealloc */ |
From: Thomas H. <th...@us...> - 2006-01-16 08:40:08
|
Update of /cvsroot/ctypes/ctypes/ctypes/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2169 Modified Files: Tag: branch_1_0 __init__.py Log Message: Allow tests to be loaded from the __loader__, if ctypes is imported with zipimport. Index: __init__.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/test/Attic/__init__.py,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** __init__.py 2 Jan 2006 19:12:01 -0000 1.1.2.3 --- __init__.py 16 Jan 2006 08:40:01 -0000 1.1.2.4 *************** *** 36,56 **** raise ResourceDenied(msg) def get_tests(package, mask, verbosity): """Return a list of skipped test modules, and a list of test cases.""" - test_dir = package.__path__[0] - import fnmatch tests = [] skipped = [] ! for fname in fnmatch.filter(os.listdir(test_dir), mask): ! ## for fname in glob.glob(mask): try: ! mod = __import__("%s.%s" % (package.__name__, fname[:-3]), globals(), locals(), ['*']) except ResourceDenied, detail: ! skipped.append(fname) if verbosity > 1: ! print >> sys.stderr, "Skipped %s: %s" % (fname, detail) continue except Exception, detail: ! print >> sys.stderr, "Warning: could not import %s: %s" % (fname, detail) continue for name in dir(mod): --- 36,67 ---- raise ResourceDenied(msg) + def find_package_modules(package, mask): + import fnmatch + if hasattr(package, "__loader__"): + path = package.__name__.replace(".", os.path.sep) + mask = os.path.join(path, mask) + for fnm in package.__loader__._files.iterkeys(): + if fnmatch.fnmatchcase(fnm, mask): + yield os.path.splitext(fnm)[0].replace(os.path.sep, ".") + else: + path = package.__path__[0] + for fnm in os.listdir(path): + if fnmatch.fnmatchcase(fnm, mask): + yield "%s.%s" % (package.__name__, os.path.splitext(fnm)[0]) + def get_tests(package, mask, verbosity): """Return a list of skipped test modules, and a list of test cases.""" tests = [] skipped = [] ! for modname in find_package_modules(package, mask): try: ! mod = __import__(modname, globals(), locals(), ['*']) except ResourceDenied, detail: ! skipped.append(modname) if verbosity > 1: ! print >> sys.stderr, "Skipped %s: %s" % (modname, detail) continue except Exception, detail: ! print >> sys.stderr, "Warning: could not import %s: %s" % (modname, detail) continue for name in dir(mod): |
From: Thomas H. <th...@us...> - 2006-01-13 09:20:16
|
Update of /cvsroot/ctypes/ctypes/comtypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5623 Modified Files: Tag: branch_1_0 typeinfo.py Log Message: Fix a really silly error. Index: typeinfo.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/comtypes/typeinfo.py,v retrieving revision 1.3.2.12 retrieving revision 1.3.2.13 diff -C2 -d -r1.3.2.12 -r1.3.2.13 *** typeinfo.py 12 Jan 2006 20:25:59 -0000 1.3.2.12 --- typeinfo.py 13 Jan 2006 09:20:08 -0000 1.3.2.13 *************** *** 387,403 **** return ptl else: ! # Win CE: emulate ! if regkind == REGKIND_NONE: ! if not "\\" in szFile and not "/" in szFile: ! szFile = ".\\" + szFile ! return LoadTypeLib(szFile) ! elif regkind == REGKIND_REGISTER: ! result = LoadTypeLib(szFile) ! RegisterTypeLib(szFile) ! return result ! elif regkind == REGKIND_DEFAULT: ! return LoadTypeLib(szFile) ! else: ! raise ValueError("unknown regkind %s" % regkind) def LoadTypeLib(szFile): --- 387,404 ---- return ptl else: ! def LoadTypeLibEx(szFile, regkind=REGKIND_NONE): ! # Win CE: emulate ! if regkind == REGKIND_NONE: ! if not "\\" in szFile and not "/" in szFile: ! szFile = ".\\" + szFile ! return LoadTypeLib(szFile) ! elif regkind == REGKIND_REGISTER: ! result = LoadTypeLib(szFile) ! RegisterTypeLib(szFile) ! return result ! elif regkind == REGKIND_DEFAULT: ! return LoadTypeLib(szFile) ! else: ! raise ValueError("unknown regkind %s" % regkind) def LoadTypeLib(szFile): |
From: Thomas H. <th...@us...> - 2006-01-12 20:26:09
|
Update of /cvsroot/ctypes/ctypes/comtypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13647 Modified Files: Tag: branch_1_0 typeinfo.py Log Message: Try to emulate LoadTypeLibEx on CE. Index: typeinfo.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/comtypes/typeinfo.py,v retrieving revision 1.3.2.11 retrieving revision 1.3.2.12 diff -C2 -d -r1.3.2.11 -r1.3.2.12 *** typeinfo.py 4 Jan 2006 19:43:56 -0000 1.3.2.11 --- typeinfo.py 12 Jan 2006 20:25:59 -0000 1.3.2.12 *************** *** 380,388 **** return tlib ! def LoadTypeLibEx(szFile, regkind=REGKIND_NONE): ! "Load, and optionally register a type library file" ! ptl = POINTER(ITypeLib)() ! _oleaut32.LoadTypeLibEx(c_wchar_p(szFile), regkind, byref(ptl)) ! return ptl def LoadTypeLib(szFile): --- 380,403 ---- return tlib ! if hasattr(_oleaut32, "LoadTypeLibEx"): ! def LoadTypeLibEx(szFile, regkind=REGKIND_NONE): ! "Load, and optionally register a type library file" ! ptl = POINTER(ITypeLib)() ! _oleaut32.LoadTypeLibEx(c_wchar_p(szFile), regkind, byref(ptl)) ! return ptl ! else: ! # Win CE: emulate ! if regkind == REGKIND_NONE: ! if not "\\" in szFile and not "/" in szFile: ! szFile = ".\\" + szFile ! return LoadTypeLib(szFile) ! elif regkind == REGKIND_REGISTER: ! result = LoadTypeLib(szFile) ! RegisterTypeLib(szFile) ! return result ! elif regkind == REGKIND_DEFAULT: ! return LoadTypeLib(szFile) ! else: ! raise ValueError("unknown regkind %s" % regkind) def LoadTypeLib(szFile): |
From: Thomas H. <th...@us...> - 2006-01-12 18:33:07
|
Update of /cvsroot/ctypes/ctypes/comtypes/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19810 Modified Files: Tag: branch_1_0 tlbparser.py Log Message: Windows CE doesn't have QueryPathOfRegTypeLib. Index: tlbparser.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/comtypes/tools/tlbparser.py,v retrieving revision 1.4.2.23 retrieving revision 1.4.2.24 diff -C2 -d -r1.4.2.23 -r1.4.2.24 *** tlbparser.py 2 Jan 2006 19:11:49 -0000 1.4.2.23 --- tlbparser.py 12 Jan 2006 18:32:58 -0000 1.4.2.24 *************** *** 619,622 **** --- 619,627 ---- la = tlib.GetLibAttr() name = BSTR() + try: + windll.oleaut32.QueryPathOfRegTypeLib + except AttributeError: + # Windows CE doesn't have this function + return None if 0 == windll.oleaut32.QueryPathOfRegTypeLib(byref(la.guid), la.wMajorVerNum, |
From: Thomas H. <th...@us...> - 2006-01-12 12:32:13
|
Update of /cvsroot/ctypes/ctypes/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26896 Modified Files: Tag: branch_1_0 callproc.c Log Message: Make GetComError work in Windows CE. Index: callproc.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/callproc.c,v retrieving revision 1.127.2.19 retrieving revision 1.127.2.20 diff -C2 -d -r1.127.2.19 -r1.127.2.20 *** callproc.c 4 Jan 2006 19:43:15 -0000 1.127.2.19 --- callproc.c 12 Jan 2006 12:32:04 -0000 1.127.2.20 *************** *** 780,786 **** GUID guid; DWORD helpcontext=0; - TCHAR *text; LPOLESTR progid; PyObject *obj; hr = pIunk->lpVtbl->QueryInterface(pIunk, &IID_ISupportErrorInfo, (void **)&psei); --- 780,786 ---- GUID guid; DWORD helpcontext=0; LPOLESTR progid; PyObject *obj; + TCHAR *text; hr = pIunk->lpVtbl->QueryInterface(pIunk, &IID_ISupportErrorInfo, (void **)&psei); *************** *** 811,817 **** /* XXX Is COMError derived from WindowsError or not? */ text = FormatError(errcode); obj = Py_BuildValue("iu(uuuiu)", errcode, ! FormatError(errcode), descr, source, helpfile, helpcontext, progid); --- 811,821 ---- /* XXX Is COMError derived from WindowsError or not? */ text = FormatError(errcode); + #ifdef _UNICODE obj = Py_BuildValue("iu(uuuiu)", + #else + obj = Py_BuildValue("is(uuuiu)", + #endif errcode, ! text, descr, source, helpfile, helpcontext, progid); |
From: Thomas H. <th...@us...> - 2006-01-12 12:22:31
|
Update of /cvsroot/ctypes/ctypes/wince In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24507 Modified Files: Tag: branch_1_0 _ctypes.vcw .cvsignore Added Files: Tag: branch_1_0 _ctypes_test.vcp Log Message: I forgot to commit the _ctypes_test.vcp project file. Pointed out by Luke Dunstan. Index: .cvsignore =================================================================== RCS file: /cvsroot/ctypes/ctypes/wince/Attic/.cvsignore,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** .cvsignore 30 Dec 2005 17:26:13 -0000 1.1.2.1 --- .cvsignore 12 Jan 2006 12:22:09 -0000 1.1.2.2 *************** *** 1,4 **** --- 1,6 ---- + ARMV4Dbg ARMV4Rel _ctypes.vcb _ctypes.vcl _ctypes.vco + _ctypes_test.vcl Index: _ctypes.vcw =================================================================== RCS file: /cvsroot/ctypes/ctypes/wince/Attic/_ctypes.vcw,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** _ctypes.vcw 30 Dec 2005 17:26:13 -0000 1.1.2.1 --- _ctypes.vcw 12 Jan 2006 12:22:09 -0000 1.1.2.2 *************** *** 4,8 **** ############################################################################### ! Project: "_ctypes"=".\_ctypes.vcp" - Package Owner=<4> Package=<5> --- 4,8 ---- ############################################################################### ! Project: "_ctypes"=.\_ctypes.vcp - Package Owner=<4> Package=<5> *************** *** 16,20 **** ############################################################################### ! Project: "_ctypes_test"=".\_ctypes_test\_ctypes_test.vcp" - Package Owner=<4> Package=<5> --- 16,20 ---- ############################################################################### ! Project: "_ctypes_test"=.\_ctypes_test.vcp - Package Owner=<4> Package=<5> --- NEW FILE: _ctypes_test.vcp --- # Microsoft eMbedded Visual Tools Project File - Name="_ctypes_test" - Package Owner=<4> # Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02 # ** DO NOT EDIT ** # TARGTYPE "Win32 (WCE ARMV4T) Dynamic-Link Library" 0xa402 # TARGTYPE "Win32 (WCE x86) Dynamic-Link Library" 0x8302 # TARGTYPE "Win32 (WCE ARMV4) Dynamic-Link Library" 0xa302 # TARGTYPE "Win32 (WCE ARMV4I) Dynamic-Link Library" 0xa502 CFG=_CTYPES_TEST - WIN32 (WCE ARMV4) DEBUG !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "_ctypes_test.vcn". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "_ctypes_test.vcn" CFG="_CTYPES_TEST - WIN32 (WCE ARMV4) DEBUG" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "_ctypes_test - Win32 (WCE ARMV4I) Release" (based on "Win32 (WCE ARMV4I) Dynamic-Link Library") !MESSAGE "_ctypes_test - Win32 (WCE ARMV4I) Debug" (based on "Win32 (WCE ARMV4I) Dynamic-Link Library") !MESSAGE "_ctypes_test - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Dynamic-Link Library") !MESSAGE "_ctypes_test - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Dynamic-Link Library") !MESSAGE "_ctypes_test - Win32 (WCE ARMV4T) Release" (based on "Win32 (WCE ARMV4T) Dynamic-Link Library") !MESSAGE "_ctypes_test - Win32 (WCE ARMV4T) Debug" (based on "Win32 (WCE ARMV4T) Dynamic-Link Library") !MESSAGE "_ctypes_test - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Dynamic-Link Library") !MESSAGE "_ctypes_test - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Dynamic-Link Library") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" # PROP ATL_Project 2 !IF "$(CFG)" == "_ctypes_test - Win32 (WCE ARMV4I) Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "ARMV4IRel" # PROP BASE Intermediate_Dir "ARMV4IRel" # PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "ARMV4IRel" # PROP Intermediate_Dir "ARMV4IRel" # PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" RSC=rc.exe # ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4I" /r # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4I" /r CPP=clarm.exe # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c # ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB # ADD LINK32 commctrl.lib coredll.lib oleaut32.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE ARMV4I) Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "ARMV4IDbg" # PROP BASE Intermediate_Dir "ARMV4IDbg" # PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "ARMV4IDbg" # PROP Intermediate_Dir "ARMV4IDbg" # PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" RSC=rc.exe # ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4I" /r # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4I" /r CPP=clarm.exe # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c # ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB # ADD LINK32 commctrl.lib coredll.lib oleaut32.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE ARMV4) Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "ARMV4Rel" # PROP BASE Intermediate_Dir "ARMV4Rel" # PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "ARMV4Rel" # PROP Intermediate_Dir "ARMV4Rel" # PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" RSC=rc.exe # ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r CPP=clarm.exe # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /O2 /M$(CECrtMT) /c # ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /O2 /M$(CECrtMT) /c MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM # ADD LINK32 commctrl.lib coredll.lib oleaut32.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /out:"ARMV4Rel/_ctypes_test.pyd" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE ARMV4) Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "ARMV4Dbg" # PROP BASE Intermediate_Dir "ARMV4Dbg" # PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "ARMV4Dbg" # PROP Intermediate_Dir "ARMV4Dbg" # PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" RSC=rc.exe # ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r CPP=clarm.exe # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /M$(CECrtMTDebug) /c # ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /M$(CECrtMTDebug) /c MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM # ADD LINK32 commctrl.lib coredll.lib oleaut32.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /out:"ARMV4Dbg/_ctypes_test.pyd" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE ARMV4T) Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "ARMV4TRel" # PROP BASE Intermediate_Dir "ARMV4TRel" # PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "ARMV4TRel" # PROP Intermediate_Dir "ARMV4TRel" # PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" RSC=rc.exe # ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4T" /r # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4T" /r CPP=clthumb.exe # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c # ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB # ADD LINK32 commctrl.lib coredll.lib oleaut32.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE ARMV4T) Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "ARMV4TDbg" # PROP BASE Intermediate_Dir "ARMV4TDbg" # PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "ARMV4TDbg" # PROP Intermediate_Dir "ARMV4TDbg" # PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" RSC=rc.exe # ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4T" /r # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4T" /r CPP=clthumb.exe # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c # ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB # ADD LINK32 commctrl.lib coredll.lib oleaut32.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE x86) Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "X86Rel" # PROP BASE Intermediate_Dir "X86Rel" # PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "X86Rel" # PROP Intermediate_Dir "X86Rel" # PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" RSC=rc.exe # ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r CPP=cl.exe # ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /Gs8192 /GF /O2 /c # ADD CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /Gs8192 /GF /O2 /c MTL=midl.exe # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86 # ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib oleaut32.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86 !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE x86) Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "X86Dbg" # PROP BASE Intermediate_Dir "X86Dbg" # PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}" # PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "X86Dbg" # PROP Intermediate_Dir "X86Dbg" # PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}" # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" RSC=rc.exe # ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r # ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r CPP=cl.exe # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /Gs8192 /GF /c # ADD CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_USRDLL" /D "_CTYPES_TEST_EXPORTS" /YX /Gs8192 /GF /c MTL=midl.exe # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86 # ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib oleaut32.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86 !ENDIF # Begin Target # Name "_ctypes_test - Win32 (WCE ARMV4I) Release" # Name "_ctypes_test - Win32 (WCE ARMV4I) Debug" # Name "_ctypes_test - Win32 (WCE ARMV4) Release" # Name "_ctypes_test - Win32 (WCE ARMV4) Debug" # Name "_ctypes_test - Win32 (WCE ARMV4T) Release" # Name "_ctypes_test - Win32 (WCE ARMV4T) Debug" # Name "_ctypes_test - Win32 (WCE x86) Release" # Name "_ctypes_test - Win32 (WCE x86) Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\source\_ctypes_test.c !IF "$(CFG)" == "_ctypes_test - Win32 (WCE ARMV4I) Release" !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE ARMV4I) Debug" !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE ARMV4) Release" DEP_CPP__CTYP=\ {$(INCLUDE)}"abstract.h"\ {$(INCLUDE)}"basetsd.h"\ {$(INCLUDE)}"boolobject.h"\ {$(INCLUDE)}"bufferobject.h"\ {$(INCLUDE)}"cellobject.h"\ {$(INCLUDE)}"ceval.h"\ {$(INCLUDE)}"classobject.h"\ {$(INCLUDE)}"cobject.h"\ {$(INCLUDE)}"complexobject.h"\ {$(INCLUDE)}"descrobject.h"\ {$(INCLUDE)}"dictobject.h"\ {$(INCLUDE)}"enumobject.h"\ {$(INCLUDE)}"fileobject.h"\ {$(INCLUDE)}"floatobject.h"\ {$(INCLUDE)}"funcobject.h"\ {$(INCLUDE)}"import.h"\ {$(INCLUDE)}"intobject.h"\ {$(INCLUDE)}"intrcheck.h"\ {$(INCLUDE)}"iterobject.h"\ {$(INCLUDE)}"listobject.h"\ {$(INCLUDE)}"longobject.h"\ {$(INCLUDE)}"methodobject.h"\ {$(INCLUDE)}"modsupport.h"\ {$(INCLUDE)}"moduleobject.h"\ {$(INCLUDE)}"object.h"\ {$(INCLUDE)}"objimpl.h"\ {$(INCLUDE)}"patchlevel.h"\ {$(INCLUDE)}"pyconfig.h"\ {$(INCLUDE)}"pydebug.h"\ {$(INCLUDE)}"pyerrors.h"\ {$(INCLUDE)}"pyfpe.h"\ {$(INCLUDE)}"pymem.h"\ {$(INCLUDE)}"pyport.h"\ {$(INCLUDE)}"pystate.h"\ {$(INCLUDE)}"Python.h"\ {$(INCLUDE)}"pythonrun.h"\ {$(INCLUDE)}"rangeobject.h"\ {$(INCLUDE)}"sliceobject.h"\ {$(INCLUDE)}"stringobject.h"\ {$(INCLUDE)}"sysmodule.h"\ {$(INCLUDE)}"traceback.h"\ {$(INCLUDE)}"tupleobject.h"\ {$(INCLUDE)}"unicodeobject.h"\ {$(INCLUDE)}"weakrefobject.h"\ {$(INCLUDE)}"wince-compatibility.h"\ NODEP_CPP__CTYP=\ "..\..\..\PYTHON-2.3.5-WINCE\INCLUDE\unixstuff.h"\ !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE ARMV4) Debug" DEP_CPP__CTYP=\ {$(INCLUDE)}"abstract.h"\ {$(INCLUDE)}"basetsd.h"\ {$(INCLUDE)}"boolobject.h"\ {$(INCLUDE)}"bufferobject.h"\ {$(INCLUDE)}"cellobject.h"\ {$(INCLUDE)}"ceval.h"\ {$(INCLUDE)}"classobject.h"\ {$(INCLUDE)}"cobject.h"\ {$(INCLUDE)}"complexobject.h"\ {$(INCLUDE)}"descrobject.h"\ {$(INCLUDE)}"dictobject.h"\ {$(INCLUDE)}"enumobject.h"\ {$(INCLUDE)}"fileobject.h"\ {$(INCLUDE)}"floatobject.h"\ {$(INCLUDE)}"funcobject.h"\ {$(INCLUDE)}"import.h"\ {$(INCLUDE)}"intobject.h"\ {$(INCLUDE)}"intrcheck.h"\ {$(INCLUDE)}"iterobject.h"\ {$(INCLUDE)}"listobject.h"\ {$(INCLUDE)}"longobject.h"\ {$(INCLUDE)}"methodobject.h"\ {$(INCLUDE)}"modsupport.h"\ {$(INCLUDE)}"moduleobject.h"\ {$(INCLUDE)}"object.h"\ {$(INCLUDE)}"objimpl.h"\ {$(INCLUDE)}"patchlevel.h"\ {$(INCLUDE)}"pyconfig.h"\ {$(INCLUDE)}"pydebug.h"\ {$(INCLUDE)}"pyerrors.h"\ {$(INCLUDE)}"pyfpe.h"\ {$(INCLUDE)}"pymem.h"\ {$(INCLUDE)}"pyport.h"\ {$(INCLUDE)}"pystate.h"\ {$(INCLUDE)}"Python.h"\ {$(INCLUDE)}"pythonrun.h"\ {$(INCLUDE)}"rangeobject.h"\ {$(INCLUDE)}"sliceobject.h"\ {$(INCLUDE)}"stringobject.h"\ {$(INCLUDE)}"sysmodule.h"\ {$(INCLUDE)}"traceback.h"\ {$(INCLUDE)}"tupleobject.h"\ {$(INCLUDE)}"unicodeobject.h"\ {$(INCLUDE)}"weakrefobject.h"\ {$(INCLUDE)}"wince-compatibility.h"\ NODEP_CPP__CTYP=\ "..\..\..\PYTHON-2.3.5-WINCE\INCLUDE\unixstuff.h"\ !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE ARMV4T) Release" !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE ARMV4T) Debug" !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE x86) Release" !ELSEIF "$(CFG)" == "_ctypes_test - Win32 (WCE x86) Debug" !ENDIF # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project |
From: Thomas H. <th...@us...> - 2006-01-11 07:49:09
|
Update of /cvsroot/ctypes/ctypes/ctypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28675 Modified Files: Tag: branch_1_0 _loader.py Log Message: Add docstrings. Implementations for Windows. Index: _loader.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/Attic/_loader.py,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** _loader.py 10 Jan 2006 21:08:31 -0000 1.1.2.1 --- _loader.py 11 Jan 2006 07:49:00 -0000 1.1.2.2 *************** *** 1,14 **** # WORK IN PROGRESS! DO NOT (yet) USE! ! import sys import ctypes ! from _ctypes import dlopen, RTLD_LOCAL, RTLD_GLOBAL class LibraryLoader(object): def __init__(self, dlltype, mode=RTLD_LOCAL): self._dlltype = dlltype self._mode = mode def load(self, libname, mode=None): if mode is None: mode = self._mode --- 1,45 ---- # WORK IN PROGRESS! DO NOT (yet) USE! ! import sys, os import ctypes ! ! if os.name in ("nt", "ce"): ! from _ctypes import LoadLibrary as dlopen ! RTLD_LOCAL = RTLD_GLOBAL = None ! else: ! from _ctypes import dlopen, RTLD_LOCAL, RTLD_GLOBAL class LibraryLoader(object): + """Loader for shared libraries. + + Shared libraries are accessed when compiling/linking a program, + and when the program is run. The purpose of the 'find' method is + to locate a library similar to what the compiler does (on machines + with several versions of a shared library the most recent should + be loaded), while 'load' acts like when the program is run, and + uses the runtime loader directly. 'load_version' works like + 'load' but tries to be platform independend (for cases where this + makes sense). Loading via attribute access is a shorthand + notation especially useful for interactive use.""" + def __init__(self, dlltype, mode=RTLD_LOCAL): + """Create a library loader instance which loads libraries by + creating an instance of 'dlltype'. 'mode' can be RTLD_LOCAL + or RTLD_GLOBAL, it is ignored on Windows. + """ self._dlltype = dlltype self._mode = mode def load(self, libname, mode=None): + """Load and return the library with the given libname. On + most systems 'libname' is the filename of the shared library; + when it's not a pathname it will be searched in a system + dependend list of locations (on many systems additional search + paths can be specified by an environment variable). Sometimes + the extension (like '.dll' on Windows) can be omitted. + + 'mode' allows to override the default flags specified in the + constructor, it is ignored on Windows. + """ if mode is None: mode = self._mode *************** *** 16,23 **** def load_version(self, name, version, mode=None): ! return self.load("lib%s.so.%s" % (name, version), mode) def find(self, name, mode=None): ! from ctypes.util import findLib for libname in findLib(name): try: --- 47,87 ---- def load_version(self, name, version, mode=None): ! """Build a (system dependend) filename from 'name' and ! 'version', then load and return it. 'name' is the library ! name without any prefix like 'lib' and suffix like '.so' or ! '.dylib'. This method should be used if a library is ! available on different platforms, using the particular naming ! convention of each platform. ! ! 'mode' allows to override the default flags specified in the ! constructor, it is ignored on Windows. ! """ ! if os.name in ("nt", "ce"): ! # does this make sense (on Windows), or should 'version' ! # be ignored (like 'mode' is)? ! return self.load("%s%s.dll" % (name, version)) ! else: ! return self.load("lib%s.so.%s" % (name, version), mode) def find(self, name, mode=None): ! """Try to find a library, load and return it. 'name' is the ! library name without any prefix like 'lib', suffix like '.so', ! '.dylib' or version number (this is the form used for the ! posix linker option '-l'). ! ! 'mode' allows to override the default flags specified in the ! constructor, it is ignored on Windows. ! ! On windows, this method does the same as the 'load' method. ! ! On other platforms, this function might call other programs ! like the compiler to find the library. When using ctypes to ! write a shared library wrapping, consider using .load() or ! .load_version() instead. ! """ ! if os.name in ("nt", "ce"): ! return self.load(name) ! else: ! from ctypes.util import findLib for libname in findLib(name): try: *************** *** 29,35 **** def __getattr__(self, name): if name.startswith("_"): raise AttributeError(name) ! return self.find(name) class CDLL(object): --- 93,102 ---- def __getattr__(self, name): + """Load a library via attribute access. The result is cached.""" if name.startswith("_"): raise AttributeError(name) ! dll = self.find(name) ! setattr(self, name, dll) ! return dll class CDLL(object): *************** *** 49,59 **** # test code ! print cdll.load("libc.so.6") ! print cdll.load("libGL.so", RTLD_GLOBAL) ! print cdll.load_version("m", "6") ! print cdll.m ! print cdll.png ! print cdll._a_b_c_ ! print cdll.xyz --- 116,134 ---- # test code ! if os.name == "nt": ! print cdll.load("msvcrt", 42) ! print cdll.msvcrt ! print cdll.find("msvcr71") ! # does this make sense? ! print cdll.load_version("msvcr", "71") ! print cdll.load_version("msvcr", "t") ! else: ! print cdll.load("libc.so.6") ! print cdll.load("libGL.so", RTLD_GLOBAL) ! print cdll.load_version("m", "6") ! print cdll.m ! print cdll.png ! print cdll._a_b_c_ ! print cdll.xyz |
From: Thomas H. <th...@us...> - 2006-01-10 21:08:42
|
Update of /cvsroot/ctypes/ctypes/ctypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3862 Added Files: Tag: branch_1_0 _loader.py Log Message: Work in progress. --- NEW FILE: _loader.py --- # WORK IN PROGRESS! DO NOT (yet) USE! import sys import ctypes from _ctypes import dlopen, RTLD_LOCAL, RTLD_GLOBAL class LibraryLoader(object): def __init__(self, dlltype, mode=RTLD_LOCAL): self._dlltype = dlltype self._mode = mode def load(self, libname, mode=None): if mode is None: mode = self._mode return self._dlltype(libname, mode) def load_version(self, name, version, mode=None): return self.load("lib%s.so.%s" % (name, version), mode) def find(self, name, mode=None): from ctypes.util import findLib for libname in findLib(name): try: return self.load(libname, mode) except OSError, error: continue else: raise OSError, error def __getattr__(self, name): if name.startswith("_"): raise AttributeError(name) return self.find(name) class CDLL(object): def __init__(self, name, mode): self._handle = dlopen(name, mode) self._name = name def __repr__(self): return "<%s '%s', handle %x at %x>" % \ (self.__class__.__name__, self._name, (self._handle & (sys.maxint*2 + 1)), id(self)) cdll = LibraryLoader(CDLL) ################################################################ # test code print cdll.load("libc.so.6") print cdll.load("libGL.so", RTLD_GLOBAL) print cdll.load_version("m", "6") print cdll.m print cdll.png print cdll._a_b_c_ print cdll.xyz |
From: Thomas H. <th...@us...> - 2006-01-05 20:52:14
|
Update of /cvsroot/ctypes/ctypes/ctypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30160 Modified Files: Tag: branch_1_0 __init__.py Log Message: Document and simplify the various DLL types. Index: __init__.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/__init__.py,v retrieving revision 1.61.2.22 retrieving revision 1.61.2.23 diff -C2 -d -r1.61.2.22 -r1.61.2.23 *** __init__.py 4 Jan 2006 19:18:26 -0000 1.61.2.22 --- __init__.py 5 Jan 2006 20:52:01 -0000 1.61.2.23 *************** *** 277,280 **** --- 277,293 ---- class CDLL(object): + """An instance of this class represents a loaded dll/shared + library, exporting functions using the standard C calling + convention (named 'cdecl' on Windows). + + The exported functions can be accessed as attributes, or by + indexing with the function name. Examples: + + <obj>.qsort -> callable object + <obj>['qsort'] -> callable object + + Calling the functions releases the Python GIL during the call and + reaquires it afterwards. + """ class _FuncPtr(_CFuncPtr): _flags_ = _FUNCFLAG_CDECL *************** *** 298,301 **** --- 311,317 ---- if name.startswith('__') and name.endswith('__'): raise AttributeError, name + return self.__getitem__(name) + + def __getitem__(self, name): func = self._FuncPtr(name, self) func.__name__ = name *************** *** 303,309 **** return func - def __getitem__(self, name): - return getattr(self, name) - # This creates problems in gc. See # https://sourceforge.net/tracker/index.php?func=detail&aid=1042541&group_id=71702&atid=532154 --- 319,322 ---- *************** *** 318,322 **** class PyDLL(CDLL): ! class _CdeclFuncPtr(_CFuncPtr): _flags_ = _FUNCFLAG_CDECL | _FUNCFLAG_PYTHONAPI _restype_ = c_int # default, can be overridden in instances --- 331,339 ---- class PyDLL(CDLL): ! """This class represents the Python library itself. It allows to ! access Python API functions. The GIL is not released, and ! Python exceptions are handled correctly. ! """ ! class _FuncPtr(_CFuncPtr): _flags_ = _FUNCFLAG_CDECL | _FUNCFLAG_PYTHONAPI _restype_ = c_int # default, can be overridden in instances *************** *** 325,328 **** --- 342,348 ---- class WinDLL(CDLL): + """This class represents a dll exporting functions using the + Windows stdcall calling convention. + """ class _FuncPtr(_CFuncPtr): _flags_ = _FUNCFLAG_STDCALL *************** *** 346,350 **** class OleDLL(CDLL): ! class _OlecallFuncPtr(_CFuncPtr): # It would be possible to remove the _FUNCFLAG_HRESULT # code, and use HRESULT as _restype_. But --- 366,375 ---- class OleDLL(CDLL): ! """This class represents a dll exporting functions using the ! Windows stdcall calling convention, and returning HRESULT. ! HRESULT error values are automatically raised as WindowsError ! exceptions. ! """ ! class _FuncPtr(_CFuncPtr): # It would be possible to remove the _FUNCFLAG_HRESULT # code, and use HRESULT as _restype_. But *************** *** 353,363 **** _flags_ = _FUNCFLAG_STDCALL | _FUNCFLAG_HRESULT _restype_ = c_int # needed, but unused (see _FUNCFLAG_HRESULT flag) - def __getattr__(self, name): - if name[:2] == '__' and name[-2:] == '__': - raise AttributeError, name - func = self._OlecallFuncPtr(name, self) - func.__name__ = name - setattr(self, name, func) - return func def register_library_alias(alias, libname, osname, platform=None): --- 378,381 ---- |
From: Thomas H. <th...@us...> - 2006-01-04 19:44:06
|
Update of /cvsroot/ctypes/ctypes/comtypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18434 Modified Files: Tag: branch_1_0 typeinfo.py Log Message: Don't use the decorators. Index: typeinfo.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/comtypes/typeinfo.py,v retrieving revision 1.3.2.10 retrieving revision 1.3.2.11 diff -C2 -d -r1.3.2.10 -r1.3.2.11 *** typeinfo.py 2 Jan 2006 19:11:25 -0000 1.3.2.10 --- typeinfo.py 4 Jan 2006 19:43:56 -0000 1.3.2.11 *************** *** 372,425 **** ################################################################ # functions ! def LoadRegTypeLib(guid, wVerMajor, wVerMinor, lcid=0): "Load a registered type library" tlib = POINTER(ITypeLib)() ! LoadRegTypeLib._api_(byref(GUID(guid)), wVerMajor, wVerMinor, lcid, byref(tlib)) return tlib - LoadRegTypeLib = stdcall(HRESULT, 'oleaut32', - [POINTER(GUID), c_ushort, c_ushort, c_ulong, POINTER(POINTER(ITypeLib))]) (LoadRegTypeLib) def LoadTypeLibEx(szFile, regkind=REGKIND_NONE): "Load, and optionally register a type library file" ptl = POINTER(ITypeLib)() ! LoadTypeLibEx._api_(szFile, regkind, byref(ptl)) return ptl - LoadTypeLibEx = stdcall(HRESULT, 'oleaut32', [POINTER(OLECHAR), tagREGKIND, POINTER(POINTER(ITypeLib))]) (LoadTypeLibEx) def LoadTypeLib(szFile): "Load and register a type library file" tlib = POINTER(ITypeLib)() ! LoadTypeLib._api_(szFile, byref(tlib)) return tlib - LoadTypeLib = stdcall(HRESULT, 'oleaut32', [POINTER(OLECHAR), POINTER(POINTER(ITypeLib))]) (LoadTypeLib) def UnRegisterTypeLib(libID, wVerMajor, wVerMinor, lcid=0, syskind=SYS_WIN32): "Unregister a registered type library" ! return UnRegisterTypeLib._api_(byref(GUID(libID)), wVerMajor, wVerMinor, lcid, syskind) ! UnRegisterTypeLib = stdcall(HRESULT, 'oleaut32', ! [POINTER(GUID), c_ushort, c_ushort, c_ulong, tagSYSKIND]) (UnRegisterTypeLib) def RegisterTypeLib(tlib, fullpath, helpdir=None): "Register a type library in the registry" ! return RegisterTypeLib._api_(tlib, fullpath, helpdir) ! RegisterTypeLib = stdcall(HRESULT, 'oleaut32', [POINTER(ITypeLib), POINTER(OLECHAR), POINTER(OLECHAR)]) (RegisterTypeLib) ! def CreateTypeLib(filename, syskind=SYS_WIN32): "Return a ICreateTypeLib pointer" ctlib = POINTER(ICreateTypeLib)() ! CreateTypeLib._api_(syskind, filename, byref(ctlib)) return ctlib - CreateTypeLib = stdcall(HRESULT, 'oleaut32', - [tagSYSKIND, POINTER(OLECHAR), POINTER(POINTER(ICreateTypeLib))]) (CreateTypeLib) def QueryPathOfRegTypeLib(libid, wVerMajor, wVerMinor, lcid=0): "Return the path of a registered type library" pathname = BSTR() ! QueryPathOfRegTypeLib._api_(byref(GUID(libid)), wVerMajor, wVerMinor, lcid, byref(pathname)) return pathname.value - QueryPathOfRegTypeLib = stdcall(HRESULT, 'oleaut32', - [POINTER(GUID), c_ushort, c_ushort, c_ulong, POINTER(BSTR)]) (QueryPathOfRegTypeLib) ################################################################ --- 372,414 ---- ################################################################ # functions + _oleaut32 = oledll.oleaut32 ! def LoadRegTypeLib(guid, wMajorVerNum, wMinorVerNum, lcid=0): "Load a registered type library" tlib = POINTER(ITypeLib)() ! _oleaut32.LoadRegTypeLib(byref(GUID(guid)), wMajorVerNum, wMinorVerNum, lcid, byref(tlib)) return tlib def LoadTypeLibEx(szFile, regkind=REGKIND_NONE): "Load, and optionally register a type library file" ptl = POINTER(ITypeLib)() ! _oleaut32.LoadTypeLibEx(c_wchar_p(szFile), regkind, byref(ptl)) return ptl def LoadTypeLib(szFile): "Load and register a type library file" tlib = POINTER(ITypeLib)() ! _oleaut32.LoadTypeLib(c_wchar_p(szFile), byref(tlib)) return tlib def UnRegisterTypeLib(libID, wVerMajor, wVerMinor, lcid=0, syskind=SYS_WIN32): "Unregister a registered type library" ! return _oleaut32.UnRegisterTypeLib(byref(GUID(libID)), wVerMajor, wVerMinor, lcid, syskind) def RegisterTypeLib(tlib, fullpath, helpdir=None): "Register a type library in the registry" ! return _oleaut32.RegisterTypeLib(tlib, c_wchar_p(fullpath), c_wchar_p(helpdir)) def CreateTypeLib(filename, syskind=SYS_WIN32): "Return a ICreateTypeLib pointer" ctlib = POINTER(ICreateTypeLib)() ! _oleaut32.CreateTypeLib(syskind, c_wchar_p(filename), byref(ctlib)) return ctlib def QueryPathOfRegTypeLib(libid, wVerMajor, wVerMinor, lcid=0): "Return the path of a registered type library" pathname = BSTR() ! _oleaut32.QueryPathOfRegTypeLib(byref(GUID(libid)), wVerMajor, wVerMinor, lcid, byref(pathname)) return pathname.value ################################################################ |
From: Thomas H. <th...@us...> - 2006-01-04 19:43:26
|
Update of /cvsroot/ctypes/ctypes/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18228 Modified Files: Tag: branch_1_0 callproc.c Log Message: Fix another bug introduced by making FormatError() return TCHAR. Index: callproc.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/callproc.c,v retrieving revision 1.127.2.18 retrieving revision 1.127.2.19 diff -C2 -d -r1.127.2.18 -r1.127.2.19 *** callproc.c 3 Jan 2006 19:51:31 -0000 1.127.2.18 --- callproc.c 4 Jan 2006 19:43:15 -0000 1.127.2.19 *************** *** 811,815 **** /* XXX Is COMError derived from WindowsError or not? */ text = FormatError(errcode); ! obj = Py_BuildValue("is(uuuiu)", errcode, FormatError(errcode), --- 811,815 ---- /* XXX Is COMError derived from WindowsError or not? */ text = FormatError(errcode); ! obj = Py_BuildValue("iu(uuuiu)", errcode, FormatError(errcode), *************** *** 1385,1389 **** static char set_conversion_mode_doc[] = ! "FormatError(encoding, errors) -> (previous-encoding, previous-errors)\n\ \n\ Set the encoding and error handling ctypes uses when converting\n\ --- 1385,1389 ---- static char set_conversion_mode_doc[] = ! "set_conversion_mode(encoding, errors) -> (previous-encoding, previous-errors)\n\ \n\ Set the encoding and error handling ctypes uses when converting\n\ |
From: Thomas H. <th...@us...> - 2006-01-04 19:22:16
|
Update of /cvsroot/ctypes/ctypes/ctypes/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11192 Modified Files: Tag: branch_1_0 test_cfuncs.py Log Message: Adapt to recent changes. Index: test_cfuncs.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/ctypes/test/Attic/test_cfuncs.py,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** test_cfuncs.py 3 Nov 2005 19:49:19 -0000 1.1.2.1 --- test_cfuncs.py 4 Jan 2006 19:22:03 -0000 1.1.2.2 *************** *** 178,182 **** if name[:2] == '__' and name[-2:] == '__': raise AttributeError, name ! func = self._StdcallFuncPtr("s_" + name, self) setattr(self, name, func) return func --- 178,182 ---- if name[:2] == '__' and name[-2:] == '__': raise AttributeError, name ! func = self._FuncPtr("s_" + name, self) setattr(self, name, func) return func |