diff --git a/.nuget/NuGet.Config b/.nuget/NuGet.Config
deleted file mode 100644
index 6a318ad..0000000
--- a/.nuget/NuGet.Config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.nuget/NuGet.exe b/.nuget/NuGet.exe
deleted file mode 100644
index 8dd7e45..0000000
Binary files a/.nuget/NuGet.exe and /dev/null differ
diff --git a/.nuget/NuGet.targets b/.nuget/NuGet.targets
deleted file mode 100644
index 428c8da..0000000
--- a/.nuget/NuGet.targets
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
-
- $(MSBuildProjectDirectory)\..\
-
-
- false
-
-
- false
-
-
- true
-
-
- false
-
-
-
-
-
-
-
-
-
-
- $([System.IO.Path]::Combine($(SolutionDir), ".nuget"))
-
-
-
-
- $(SolutionDir).nuget
-
-
-
- $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName.Replace(' ', '_')).config
- $(MSBuildProjectDirectory)\packages.$(MSBuildProjectName).config
-
-
-
- $(MSBuildProjectDirectory)\packages.config
- $(PackagesProjectConfig)
-
-
-
-
- $(NuGetToolsPath)\NuGet.exe
- @(PackageSource)
-
- "$(NuGetExePath)"
- mono --runtime=v4.0.30319 "$(NuGetExePath)"
-
- $(TargetDir.Trim('\\'))
-
- -RequireConsent
- -NonInteractive
-
- "$(SolutionDir) "
- "$(SolutionDir)"
-
-
- $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)
- $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols
-
-
-
- RestorePackages;
- $(BuildDependsOn);
-
-
-
-
- $(BuildDependsOn);
- BuildPackage;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.nuget/packages.config b/.nuget/packages.config
deleted file mode 100644
index 2667fb0..0000000
--- a/.nuget/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/kdlibcpp b/kdlibcpp
index b4c87ce..dd9c6bb 160000
--- a/kdlibcpp
+++ b/kdlibcpp
@@ -1 +1 @@
-Subproject commit b4c87cee2d2b6e373c4cc35bde49c60a777d0ecb
+Subproject commit dd9c6bb0f07109b8d4c4c1a8da2652fd2c99e49e
diff --git a/nsis_setup/Include/HasAssembly.nsh b/nsis_setup/Include/HasAssembly.nsh
deleted file mode 100644
index e679643..0000000
--- a/nsis_setup/Include/HasAssembly.nsh
+++ /dev/null
@@ -1,62 +0,0 @@
-!ifndef HASASSEMBLY_INCLUDED
-!define HASASSEMBLY_INCLUDED
-!verbose Push
-!verbose 3
-
-!include LogicLib.nsh
-!include Util.nsh
-
-!macro _WinSxS_HasAssembly
- /*
- push 'msvcr80.dll'
- push 'Microsoft.VC80.CRT,version="8.0.50727.42",type="win32",processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b"'
- Call WinSxS_HasAssembly
- pop $0 ;0 on fail, 1 if it is in WinSxS or 2 if LoadLibrary worked on pre xp (call GetDLLVersion to make sure if you require a minimum version)
- */
- Exch $8
- Exch
- Exch $7
- push $9
- StrCpy $9 0
- push $0
- push $R0
- push $R1
- ${If} ${AtLeastWinXP}
- System::Call "sxs::CreateAssemblyCache(*i.R0,i0)i.r0"
- ${If} $0 == 0
- System::Call '*(i 24,i0,l,i0,i0)i.R1' ;TODO,BUGBUG: check alloc success
- System::Call `$R0->4(i 0,w '$8',i $R1)i.r0` ;IAssemblyCache::QueryAssemblyInfo
- ${If} $0 == 0
- System::Call '*$R1(i,i.r0)'
- IntOp $0 $0 & 1 ;ASSEMBLYINFO_FLAG_INSTALLED=1
- ${IfThen} $0 <> 0 ${|} StrCpy $9 1 ${|}
- ${EndIf}
- System::Free $R1
- System::Call $R0->2() ;IAssemblyCache::Release
- ${EndIf}
- ${Else}
- System::Call kernel32::LoadLibrary(t"$7")i.r0
- ${If} $0 != 0
- StrCpy $9 2
- System::Call 'kernel32::FreeLibrary(i r0)'
- ${EndIf}
- ${EndIf}
- pop $R1
- pop $R0
- pop $0
- Exch 2
- pop $8
- pop $7
- Exch $9
-!macroend
-
-Function WinSxS_HasAssembly
- !insertmacro _WinSxS_HasAssembly
-FunctionEnd
-
-Function un.WinSxS_HasAssembly
- !insertmacro _WinSxS_HasAssembly
-FunctionEnd
-
-!verbose Pop
-!endif
\ No newline at end of file
diff --git a/nsis_setup/MUIOrangeVistaTheme/Clean/header-l-un.bmp b/nsis_setup/MUIOrangeVistaTheme/Clean/header-l-un.bmp
deleted file mode 100644
index d7b8693..0000000
Binary files a/nsis_setup/MUIOrangeVistaTheme/Clean/header-l-un.bmp and /dev/null differ
diff --git a/nsis_setup/MUIOrangeVistaTheme/Clean/header-l.bmp b/nsis_setup/MUIOrangeVistaTheme/Clean/header-l.bmp
deleted file mode 100644
index 11be229..0000000
Binary files a/nsis_setup/MUIOrangeVistaTheme/Clean/header-l.bmp and /dev/null differ
diff --git a/nsis_setup/MUIOrangeVistaTheme/Clean/installer.ico b/nsis_setup/MUIOrangeVistaTheme/Clean/installer.ico
deleted file mode 100644
index 057f86c..0000000
Binary files a/nsis_setup/MUIOrangeVistaTheme/Clean/installer.ico and /dev/null differ
diff --git a/nsis_setup/MUIOrangeVistaTheme/Clean/uninstaller.ico b/nsis_setup/MUIOrangeVistaTheme/Clean/uninstaller.ico
deleted file mode 100644
index 7c1bc35..0000000
Binary files a/nsis_setup/MUIOrangeVistaTheme/Clean/uninstaller.ico and /dev/null differ
diff --git a/nsis_setup/MUIOrangeVistaTheme/Clean/wizard-un.bmp b/nsis_setup/MUIOrangeVistaTheme/Clean/wizard-un.bmp
deleted file mode 100644
index ea666ee..0000000
Binary files a/nsis_setup/MUIOrangeVistaTheme/Clean/wizard-un.bmp and /dev/null differ
diff --git a/nsis_setup/MUIOrangeVistaTheme/Clean/wizard.bmp b/nsis_setup/MUIOrangeVistaTheme/Clean/wizard.bmp
deleted file mode 100644
index 4cccb8f..0000000
Binary files a/nsis_setup/MUIOrangeVistaTheme/Clean/wizard.bmp and /dev/null differ
diff --git a/nsis_setup/MUIOrangeVistaTheme/License.txt b/nsis_setup/MUIOrangeVistaTheme/License.txt
deleted file mode 100644
index 5f775f3..0000000
--- a/nsis_setup/MUIOrangeVistaTheme/License.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-Author: Manuel Lozano - 2007 - monki@monki.es - www.monki.es
-
-===================
-
-Creative Commons Legal Code
-Attribution-NoDerivs 3.0 Unported
-
- CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.
-
-License
-
-THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
-
-BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
-
-1. Definitions
-
- 1. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
- 2. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.
- 3. "Distribute" means to make available to the public the original and copies of the Work through sale or other transfer of ownership.
- 4. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
- 5. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
- 6. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.
- 7. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
- 8. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
- 9. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.
-
-2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.
-
-3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
-
- 1. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; and,
- 2. to Distribute and Publicly Perform the Work including as incorporated in Collections.
- 3.
-
- For the avoidance of doubt:
- 1. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;
- 2. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,
- 3. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.
-
-The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Adaptations. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.
-
-4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
-
- 1. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested.
- 2. If You Distribute, or Publicly Perform the Work or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. The credit required by this Section 4(b) may be implemented in any reasonable manner; provided, however, that in the case of a Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
- 3. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation.
-
-5. Representations, Warranties and Disclaimer
-
-UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
-
-6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
-7. Termination
-
- 1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
- 2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
-
-8. Miscellaneous
-
- 1. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
- 2. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
- 3. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
- 4. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
- 5. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.
-
- Creative Commons Notice
-
- Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.
-
- Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License.
-
- Creative Commons may be contacted at http://creativecommons.org/.
diff --git a/nsis_setup/Plugins/inetc.dll b/nsis_setup/Plugins/inetc.dll
deleted file mode 100644
index 89d989f..0000000
Binary files a/nsis_setup/Plugins/inetc.dll and /dev/null differ
diff --git a/nsis_setup/pykd_license.txt b/nsis_setup/pykd_license.txt
deleted file mode 100644
index 0218f75..0000000
--- a/nsis_setup/pykd_license.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Microsoft Public License (Ms-PL)
-
-This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
-
-1. Definitions
-
-The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
-
-A "contribution" is the original software, or any additions or changes to the software.
-
-A "contributor" is any person that distributes its contribution under this license.
-
-"Licensed patents" are a contributor's patent claims that read directly on its contribution.
-
-2. Grant of Rights
-
-(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
-
-(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
-
-3. Conditions and Limitations
-
-(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
-
-(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
-
-(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
-
-(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
-
-(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
\ No newline at end of file
diff --git a/nsis_setup/pykd_logo.png b/nsis_setup/pykd_logo.png
deleted file mode 100644
index 19c304c..0000000
Binary files a/nsis_setup/pykd_logo.png and /dev/null differ
diff --git a/nsis_setup/pykd_setup_common.nsh b/nsis_setup/pykd_setup_common.nsh
deleted file mode 100644
index 2425355..0000000
--- a/nsis_setup/pykd_setup_common.nsh
+++ /dev/null
@@ -1,483 +0,0 @@
-#
-# This is setup script for pykd project.
-# Author: Maksim K. aka airmax
-#
-
-SetCompressor LZMA
-
-# Modern interface settings
-!include "MUI2.nsh"
-!include "LogicLib.nsh"
-!include "WinVer.nsh"
-!include "FileFunc.nsh"
-!include "x64.nsh"
-!include "Sections.nsh"
-
-!addincludedir .\Include
-!addplugindir .\Plugins
-
-!include "HasAssembly.nsh"
-
-#------------------------------------------------------------------------------
-# General
-#------------------------------------------------------------------------------
-
-!define PRODUCT_SHORT_NAME "pykd"
-!define PRODUCT_FULL_NAME "Python extension for WinDbg"
-!define PRODUCT_VERSION "0.3.0.4"
-!define PRODUCT_URL "http://pykd.codeplex.com/"
-!define PRODUCT_NAME_AND_VERSION "${PRODUCT_FULL_NAME} ${PRODUCT_ARCH} ${PRODUCT_VERSION}"
-!define PRODUCT_MANUFACTURER "PyKd Team"
-
-!if ${PRODUCT_ARCH} == "x64"
- !define ARCH "amd64"
-!else
- !define ARCH "x86"
-!endif
-
-!define BINARIES_DIR "${PRODUCT_SHORT_NAME}-${PRODUCT_VERSION}-python-${PYTHON_VERSION}\${PRODUCT_ARCH}"
-
-# Main Install settings
-Name "${PRODUCT_NAME_AND_VERSION}"
-OutFile "${PRODUCT_SHORT_NAME}-${PRODUCT_VERSION}-${PRODUCT_ARCH}-python-${PYTHON_VERSION}-setup.exe"
-
-BrandingText "${PRODUCT_FULL_NAME}"
-
-#Request application privileges for Windows Vista and 7
-RequestExecutionLevel admin
-
-ShowInstDetails show
-ShowUninstDetails show
-
-#------------------------------------------------------------------------------
-# Variables
-#------------------------------------------------------------------------------
-
-#------------------------------------------------------------------------------
-# Interface Settings
-#------------------------------------------------------------------------------
-!define MUI_ABORTWARNING
-
-!define MUI_ICON "MUIOrangeVistaTheme\Clean\installer.ico"
-!define MUI_UNICON "MUIOrangeVistaTheme\Clean\uninstaller.ico"
-
-!define MUI_HEADERIMAGE
-!define MUI_HEADERIMAGE_BITMAP "MUIOrangeVistaTheme\Clean\header-l.bmp"
-!define MUI_HEADERIMAGE_UNBITMAP "MUIOrangeVistaTheme\Clean\header-l-un.bmp"
-
-!define MUI_WELCOMEPAGE_TITLE_3LINES
-!define MUI_WELCOMEFINISHPAGE_BITMAP "MUIOrangeVistaTheme\Clean\wizard.bmp"
-
-!define MUI_DIRECTORYPAGE_TEXT_TOP "Please specify path to $\"winext$\" subfolder of Debugging Tools for Windows (${PRODUCT_ARCH})."
-!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Debugging Tools for Windows (${PRODUCT_ARCH})\winext folder"
-
-!define MUI_FINISHPAGE_TITLE_3LINES
-!define MUI_FINISHPAGE_TEXT_LARGE
-!define MUI_FINISHPAGE_TEXT "${PRODUCT_NAME_AND_VERSION} was successfully installed.$\n$\n\
- Run WinDbg and type $\".load pykd.pyd$\" to start using it."
-
-!define MUI_FINISHPAGE_NOAUTOCLOSE
-
-!define MUI_COMPONENTSPAGE_SMALLDESC
-
-#------------------------------------------------------------------------------
-# Pages
-#------------------------------------------------------------------------------
-# Installer Pages
-!insertmacro MUI_PAGE_WELCOME
-!insertmacro MUI_PAGE_LICENSE "pykd_license.txt"
-!insertmacro MUI_PAGE_COMPONENTS
-!insertmacro MUI_PAGE_DIRECTORY
-!insertmacro MUI_PAGE_INSTFILES
-!insertmacro MUI_PAGE_FINISH
-
-# Uninstaller Pages
-#!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_COMPONENTS
-!insertmacro MUI_UNPAGE_INSTFILES
-
-#------------------------------------------------------------------------------
-# Languages (first is default language)
-#------------------------------------------------------------------------------
-!insertmacro MUI_LANGUAGE "English"
-!insertmacro MUI_RESERVEFILE_LANGDLL
-
-#------------------------------------------------------------------------------
-# Installer file version information
-#------------------------------------------------------------------------------
-VIProductVersion "${PRODUCT_VERSION}"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${PRODUCT_SHORT_NAME}"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "${PRODUCT_NAME_AND_VERSION}"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${PRODUCT_MANUFACTURER}"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "${PRODUCT_SHORT_NAME} is a trademark of ${PRODUCT_MANUFACTURER}"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© All rights reserved 2010-2014"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${PRODUCT_SHORT_NAME} setup"
-VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${PRODUCT_VERSION}"
-
-#------------------------------------------------------------------------------
-# Some logic-lib like macro
-#------------------------------------------------------------------------------
-!macro SetRegView64
- !if ${PRODUCT_ARCH} == "x64"
- SetRegView 64
- !endif
-!macroend
-!define SetRegView64 "!insertmacro SetRegView64"
-
-!macro SetRegView32
- !if ${PRODUCT_ARCH} == "x64"
- SetRegView 32
- !endif
-!macroend
-!define SetRegView32 "!insertmacro SetRegView32"
-
-!macro _IsVcRuntimeInstalled _a _b _t _f
- !insertmacro _LOGICLIB_TEMP
- Push 'msvcr90.dll'
- Push 'Microsoft.VC90.CRT,version="9.0.21022.8",type="win32",processorArchitecture="${ARCH}",publicKeyToken="1fc8b3b9a1e18e3b"'
- ${WinSxS_HasAssembly}
- Pop $_LOGICLIB_TEMP
- !insertmacro _== $_LOGICLIB_TEMP 1 `${_t}` `${_f}`
-!macroend
-!define IsVcRuntimeInstalled `"" IsVcRuntimeInstalled ""`
-!define un.IsVcRuntimeInstalled `"" IsVcRuntimeInstalled ""`
-
-!macro _IsPythonInstalled _a _b _t _f
- !insertmacro _LOGICLIB_TEMP
- ${SetRegView64}
- # Check Python ${PYTHON_VERSION} ${PRODUCT_ARCH}...
- ReadRegStr $_LOGICLIB_TEMP HKLM "Software\Python\PythonCore\${PYTHON_VERSION}\InstallPath" ""
- ${SetRegView32}
- !insertmacro _!= $_LOGICLIB_TEMP "" `${_t}` `${_f}`
-!macroend
-!define IsPythonInstalled `"" IsPythonInstalled ""`
-!define un.IsPythonInstalled `"" IsPythonInstalled ""`
-
-!macro _IsDiaRegistered _a _b _t _f
- !insertmacro _LOGICLIB_TEMP
- ${SetRegView64}
- ReadRegStr $_LOGICLIB_TEMP HKCR "CLSID\${CLSID_DiaSource}\InprocServer32" ""
- ${SetRegView32}
- !insertmacro _!= $_LOGICLIB_TEMP "" `${_t}` `${_f}`
-!macroend
-!define IsDiaRegistered `"" IsDiaRegistered ""`
-!define un.IsDiaRegistered `"" IsDiaRegistered ""`
-
-#------------------------------------------------------------------------------
-# Check WinDbg executable presence in selected directory
-#------------------------------------------------------------------------------
-Function .onVerifyInstDir
- ${IfNotThen} ${FileExists} "$INSTDIR\..\WinDbg.exe" ${|} Abort ${|}
-
- ${GetFileName} "$INSTDIR" $R0
- ${IfThen} $R0 != "WinExt" ${|} Abort ${|}
-FunctionEnd
-
-#------------------------------------------------------------------------------
-# Installer Sections
-#------------------------------------------------------------------------------
-
-Section "${PRODUCT_SHORT_NAME} ${PRODUCT_ARCH}" sec_pykd
- SectionIn RO
-
- # Set Section properties
- SetOverwrite on
-
- # CURRENT USER
- SetShellVarContext current
-
- DetailPrint "Extracting extension..."
- SetOutPath "$INSTDIR"
-
- File ".\${BINARIES_DIR}\pykd.pyd"
-SectionEnd
-
-Section "Snippets" sec_snippets
- # Set Section properties
- SetOverwrite on
-
- DetailPrint "Extracting snippets..."
- SetOutPath "$DOCUMENTS\${PRODUCT_SHORT_NAME}\Snippets"
- File "..\snippets\*.py"
-SectionEnd
-
-Section "Samples" sec_samples
- # Set Section properties
- SetOverwrite on
-
- DetailPrint "Extracting samples..."
- SetOutPath "$DOCUMENTS\${PRODUCT_SHORT_NAME}\Samples"
- File /r "..\samples\*.py"
-SectionEnd
-
-Section "Python ${PYTHON_VERSION} ${PRODUCT_ARCH}" sec_python
- DetailPrint "Downloading Python..."
- inetc::get /CAPTION "${PRODUCT_SHORT_NAME}" /QUESTION "" /POPUP "" /TIMEOUT=30000 "${PYTHON_URL_BASE}${PYTHON_INSTALLER}" "$TEMP\${PYTHON_INSTALLER}" /END
- Pop $0
- ${If} $0 == "OK"
- DetailPrint "Successfully downloaded."
- DetailPrint "Installing Python..."
- ClearErrors
- ExecWait '"msiexec" /i "$TEMP\${PYTHON_INSTALLER}"'
- IfErrors PythonInstallFailed
- DetailPrint "Successfully installed."
- ${SetRegView64}
- WriteRegDWORD HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallPython" 1
- ${SetRegView32}
- ${Else}
- PythonInstallFailed:
- DetailPrint "Operation failed. Installation will be continued without Python."
- DetailPrint "Please download and install it manually:"
- DetailPrint "${PYTHON_URL_BASE}${PYTHON_INSTALLER}"
- ${EndIf}
-SectionEnd
-
-Section "Visual C++ 2008 SP1 (${PRODUCT_ARCH}) runtime" sec_vcruntime
- DetailPrint "Installing Microsoft Visual C++ 2008 SP1 (${PRODUCT_ARCH}) runtime library..."
-
- SetOutPath "$TEMP"
-
- File ".\${BINARIES_DIR}\vcredist_${PRODUCT_ARCH}.exe"
-
- ExecWait "$TEMP\vcredist_${PRODUCT_ARCH}.exe"
- ${IfNot} ${Errors}
- DetailPrint "Successfully installed."
- ${SetRegView64}
- WriteRegDWORD HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallVcRuntime" 1
- ${SetRegView32}
- ${Else}
- DetailPrint "Operation failed. Installation will be continued without Visual C++ runtime."
- DetailPrint "Please download and install it manually."
- ${EndIf}
-SectionEnd
-
-Section "Debug Interface Access (${PRODUCT_ARCH}) library" sec_msdia
- DetailPrint "Registering Debug Interface Access (${PRODUCT_ARCH}) library..."
-
- !if ${PRODUCT_ARCH} == "x64"
- ${DisableX64FSRedirection}
- ClearErrors
- ExecWait '"$SYSDIR\regsvr32.exe" /s "$COMMONFILES64\Microsoft Shared\VC\${MSDIA_DLL_NAME}"'
- ${EnableX64FSRedirection}
- !else
- RegDLL "$COMMONFILES\Microsoft Shared\VC\${MSDIA_DLL_NAME}"
- !endif
-
- ${IfNot} ${Errors}
- DetailPrint "Successfully registered."
- ${SetRegView64}
- WriteRegDWORD HKLM "Software\${PRODUCT_SHORT_NAME}" "UnregisterDia" 1
- ${SetRegView32}
- ${Else}
- DetailPrint "Operation failed. Please register it manually."
- ${EndIf}
-SectionEnd
-
-Section -FinishSection
- ${SetRegView64}
- DetailPrint "Storing installation folder..."
- WriteRegStr HKLM "Software\${PRODUCT_SHORT_NAME}" "InstallPath" "$INSTDIR"
-
- DetailPrint "Adding extension dir and snippets dir to PYTHONPATH..."
- WriteRegStr HKLM "Software\Python\PythonCore\${PYTHON_VERSION}\PythonPath\${PRODUCT_SHORT_NAME}" "" "$INSTDIR;$DOCUMENTS\${PRODUCT_SHORT_NAME}\Snippets;$DOCUMENTS\${PRODUCT_SHORT_NAME}\Samples"
-
- DetailPrint "Registering uninstaller..."
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_SHORT_NAME}" "DisplayName" "${PRODUCT_FULL_NAME} (${PRODUCT_ARCH})"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_SHORT_NAME}" "UninstallString" "$LOCALAPPDATA\${PRODUCT_SHORT_NAME}\uninstall_${PRODUCT_ARCH}.exe"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_SHORT_NAME}" "Publisher" "${PRODUCT_MANUFACTURER}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_SHORT_NAME}" "URLInfoAbout" "${PRODUCT_URL}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_SHORT_NAME}" "DisplayVersion" "${PRODUCT_VERSION}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_SHORT_NAME}" "DisplayIcon" "$LOCALAPPDATA\${PRODUCT_SHORT_NAME}\uninstall_${PRODUCT_ARCH}.exe"
- ${SetRegView32}
-
- DetailPrint "Writing uninstaller..."
- CreateDirectory "$LOCALAPPDATA\${PRODUCT_SHORT_NAME}"
- WriteUninstaller "$LOCALAPPDATA\${PRODUCT_SHORT_NAME}\uninstall_${PRODUCT_ARCH}.exe"
-SectionEnd
-
-#------------------------------------------------------------------------------
-# Before first page displayed
-#------------------------------------------------------------------------------
-
-# Workaround to allow ${IsVcRuntimeInstalled} work properly
-!define WinSxS_HasAssembly `Call WinSxS_HasAssembly`
-
-Function .onInit
- System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${PRODUCT_SHORT_NAME}_${PRODUCT_ARCH}_setup") i .r1 ?e'
- Pop $R0
- ${If} $R0 != 0
- MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
- Abort
- ${EndIf}
-
- !if ${PRODUCT_ARCH} == "x64"
- ${IfNot} ${RunningX64}
- MessageBox MB_OK|MB_ICONEXCLAMATION "This installation requires 64-bit OS."
- Abort
- ${EndIf}
- !endif
-
- ${SetRegView64}
- # Get installation folder from registry if available
- ReadRegStr $INSTDIR HKLM "Software\${PRODUCT_SHORT_NAME}" "InstallPath"
- ${SetRegView32}
-
- ${If} ${IsPythonInstalled}
- !insertmacro UnselectSection ${sec_python}
- SectionSetText ${sec_python} ""
- ${EndIf}
-
- ${If} ${IsVcRuntimeInstalled}
- !insertmacro UnselectSection ${sec_vcruntime}
- SectionSetText ${sec_vcruntime} ""
- ${EndIf}
-
- ${If} ${IsDiaRegistered}
- !insertmacro UnselectSection ${sec_msdia}
- SectionSetText ${sec_msdia} ""
- ${EndIf}
-FunctionEnd
-
-#------------------------------------------------------------------------------
-# Installer sections descriptions
-#------------------------------------------------------------------------------
-
-LangString DESC_sec_pykd ${LANG_ENGLISH} "${PRODUCT_FULL_NAME}"
-LangString DESC_sec_snippets ${LANG_ENGLISH} "Useful code snippets. Will be installed in $DOCUMENTS\${PRODUCT_SHORT_NAME}\Snippets"
-LangString DESC_sec_samples ${LANG_ENGLISH} "Code samples. Will be installed in $DOCUMENTS\${PRODUCT_SHORT_NAME}\Samples"
-LangString DESC_sec_python ${LANG_ENGLISH} "Let installer download and setup Python ${PYTHON_VERSION} ${PRODUCT_ARCH}"
-LangString DESC_sec_vcruntime ${LANG_ENGLISH} "Let installer download and setup Microsoft Visual C++ 2008 SP1 (${PRODUCT_ARCH}) runtime library"
-LangString DESC_sec_msdia ${LANG_ENGLISH} "Let installer register Debug Interface Access (${PRODUCT_ARCH}) library"
-
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${sec_pykd} $(DESC_sec_pykd)
- !insertmacro MUI_DESCRIPTION_TEXT ${sec_snippets} $(DESC_sec_snippets)
- !insertmacro MUI_DESCRIPTION_TEXT ${sec_samples} $(DESC_sec_samples)
- !insertmacro MUI_DESCRIPTION_TEXT ${sec_python} $(DESC_sec_python)
- !insertmacro MUI_DESCRIPTION_TEXT ${sec_vcruntime} $(DESC_sec_vcruntime)
- !insertmacro MUI_DESCRIPTION_TEXT ${sec_msdia} $(DESC_sec_msdia)
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-#------------------------------------------------------------------------------
-# Uninstaller sections
-#------------------------------------------------------------------------------
-Section "un.${PRODUCT_SHORT_NAME} ${PRODUCT_ARCH}" unsec_pykd
- SectionIn RO
-
- ${SetRegView64}
- DetailPrint "Retriving installation folder from registry..."
- ReadRegStr $INSTDIR HKLM "Software\${PRODUCT_SHORT_NAME}" "InstallPath"
-
- DetailPrint "Deleting extension dir and snippets dir from PYTHONPATH..."
- DeleteRegKey HKLM "Software\Python\PythonCore\${PYTHON_VERSION}\PythonPath\${PRODUCT_SHORT_NAME}"
-
- DetailPrint "Unregistering uninstaller..."
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_SHORT_NAME}"
- ${SetRegView32}
-
- DetailPrint "Deleting extension..."
- Delete "$INSTDIR\pykd.pyd"
-
- # Let user delete snippets himself
- #RMDir "$DOCUMENTS\${PRODUCT_SHORT_NAME}"
-
- DetailPrint "Deleting uninstaller..."
- Delete "$LOCALAPPDATA\${PRODUCT_SHORT_NAME}\uninstall_${PRODUCT_ARCH}.exe"
- RMDir "$LOCALAPPDATA\${PRODUCT_SHORT_NAME}"
-SectionEnd
-
-Section /o "un.Python ${PYTHON_VERSION} ${PRODUCT_ARCH}" unsec_python
- DetailPrint "Uninstalling Python..."
- ExecWait '"msiexec" /x ${PYTHON_PRODUCT_CODE}'
-SectionEnd
-
-Section /o "un.Debug Interface Access (${PRODUCT_ARCH}) library" unsec_msdia
- DetailPrint "Unregistering Debug Interface Access (${PRODUCT_ARCH}) library..."
- ${SetRegView64}
- ReadRegStr $R0 HKCR "CLSID\${CLSID_DiaSource}\InprocServer32" ""
- ${SetRegView32}
-
- !if ${PRODUCT_ARCH} == "x64"
- ${DisableX64FSRedirection}
- ClearErrors
- ExecWait '"$SYSDIR\regsvr32.exe" /s /u "$R0"'
- ${EnableX64FSRedirection}
- !else
- UnRegDLL $R0
- !endif
-SectionEnd
-
-Section /o "un.Visual C++ 2008 SP1 (${PRODUCT_ARCH}) runtime" unsec_vcruntime
- DetailPrint "Uninstalling Microsoft Visual C++ 2008 SP1 (${PRODUCT_ARCH}) runtime library..."
- ExecWait '"msiexec" /x ${VCRUNTIME_PRODUCT_CODE}'
-SectionEnd
-
-Section -un.FinishSection
- ${SetRegView64}
- WriteRegDWORD HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallPython" 0
- WriteRegDWORD HKLM "Software\${PRODUCT_SHORT_NAME}" "UnregisterDia" 0
- WriteRegDWORD HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallVcRuntime" 0
-# DeleteRegValue HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallPython"
-# DeleteRegValue HKLM "Software\${PRODUCT_SHORT_NAME}" "UnregisterDia"
-# DeleteRegValue HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallVcRuntime"
- ${SetRegView32}
-SectionEnd
-
-#------------------------------------------------------------------------------
-# Before first page displayed
-#------------------------------------------------------------------------------
-
-# Workaround to allow ${IsVcRuntimeInstalled} work properly
-!undef WinSxS_HasAssembly
-!define WinSxS_HasAssembly `Call un.WinSxS_HasAssembly`
-
-Function un.onInit
- ${SetRegView64}
- ReadRegDWORD $R0 HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallPython"
- ${SetRegView32}
-
- ${If} ${Errors}
- ${OrIf} $R0 == 0
- #${OrIfNot} ${IsPythonInstalled}
- !insertmacro UnselectSection ${unsec_python}
- SectionSetText ${unsec_python} ""
- ${EndIf}
-
- ${SetRegView64}
- ReadRegDWORD $R0 HKLM "Software\${PRODUCT_SHORT_NAME}" "UnregisterDia"
- ${SetRegView32}
-
- ${If} ${Errors}
- ${OrIf} $R0 == 0
- #${OrIfNot} ${IsDiaRegistered}
- !insertmacro UnselectSection ${unsec_msdia}
- SectionSetText ${unsec_msdia} ""
- ${EndIf}
-
- ${SetRegView64}
- ReadRegDWORD $R0 HKLM "Software\${PRODUCT_SHORT_NAME}" "UninstallVcRuntime"
- ${SetRegView32}
-
- ${If} ${Errors}
- ${OrIf} $R0 == 0
- #${OrIfNot} ${IsVcRuntimeInstalled}
- !insertmacro UnselectSection ${unsec_vcruntime}
- SectionSetText ${unsec_vcruntime} ""
- ${EndIf}
-FunctionEnd
-
-#------------------------------------------------------------------------------
-# Uninstaller sections descriptions
-#------------------------------------------------------------------------------
-
-LangString DESC_unsec_pykd ${LANG_ENGLISH} "${PRODUCT_FULL_NAME}"
-LangString DESC_unsec_python ${LANG_ENGLISH} "Uninstall Python ${PYTHON_VERSION} ${PRODUCT_ARCH}"
-LangString DESC_unsec_msdia ${LANG_ENGLISH} "Unregister Debug Interface Access (${PRODUCT_ARCH}) library"
-LangString DESC_unsec_vcruntime ${LANG_ENGLISH} "Uninstall Microsoft Visual C++ 2008 SP1 (${PRODUCT_ARCH}) runtime library"
-
-!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${unsec_pykd} $(DESC_unsec_pykd)
- !insertmacro MUI_DESCRIPTION_TEXT ${unsec_python} $(DESC_unsec_python)
- !insertmacro MUI_DESCRIPTION_TEXT ${unsec_msdia} $(DESC_unsec_msdia)
- !insertmacro MUI_DESCRIPTION_TEXT ${unsec_vcruntime} $(DESC_unsec_vcruntime)
-!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
diff --git a/nsis_setup/pykd_setup_x64.nsi b/nsis_setup/pykd_setup_x64.nsi
deleted file mode 100644
index fa09e10..0000000
--- a/nsis_setup/pykd_setup_x64.nsi
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# This is setup script for pykd project.
-# Author: Maksim K. aka airmax
-#
-
-!define PRODUCT_ARCH "x64"
-
-# When changing Python vesion don't forget to update ProductCode appropriately
-!define PYTHON_VERSION "2.6"
-!define PYTHON_URL_BASE "http://python.org/ftp/python/2.6.6/"
-!define PYTHON_INSTALLER "python-2.6.6.amd64.msi"
-!define PYTHON_PRODUCT_CODE "{6151CF20-0BD8-4023-A4A0-6A86DCFE58E6}"
-
-# When changing VC runtime vesion don't forget to update ProductCode appropriately
-# VC9 (VS2008) SP1 + MFC Security Update
-!define VCRUNTIME_PRODUCT_CODE "{5FCE6D76-F5DC-37AB-B2B8-22AB8CEDB1D4}"
-
-!define MSDIA_DLL_NAME "msdia90.dll"
-!define CLSID_DiaSource "{4C41678E-887B-4365-A09E-925D28DB33C2}"
-
-!include "pykd_setup_common.nsh"
diff --git a/nsis_setup/pykd_setup_x64_python27.nsi b/nsis_setup/pykd_setup_x64_python27.nsi
deleted file mode 100644
index 7d41046..0000000
--- a/nsis_setup/pykd_setup_x64_python27.nsi
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# This is setup script for pykd project.
-# Author: Maksim K. aka airmax
-#
-
-!define PRODUCT_ARCH "x64"
-
-# When changing Python vesion don't forget to update ProductCode appropriately
-!define PYTHON_VERSION "2.7"
-!define PYTHON_URL_BASE "http://python.org/ftp/python/2.7.3/"
-!define PYTHON_INSTALLER "python-2.7.3.amd64.msi"
-!define PYTHON_PRODUCT_CODE "{C0C31BCC-56FB-42A7-8766-D29E1BD74C7D}"
-
-# When changing VC runtime vesion don't forget to update ProductCode appropriately
-# VC9 (VS2008) SP1 + MFC Security Update
-!define VCRUNTIME_PRODUCT_CODE "{5FCE6D76-F5DC-37AB-B2B8-22AB8CEDB1D4}"
-
-!define MSDIA_DLL_NAME "msdia90.dll"
-!define CLSID_DiaSource "{4C41678E-887B-4365-A09E-925D28DB33C2}"
-
-!include "pykd_setup_common.nsh"
diff --git a/nsis_setup/pykd_setup_x86.nsi b/nsis_setup/pykd_setup_x86.nsi
deleted file mode 100644
index 9261416..0000000
--- a/nsis_setup/pykd_setup_x86.nsi
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# This is setup script for pykd project.
-# Author: Maksim K. aka airmax
-#
-
-!define PRODUCT_ARCH "x86"
-
-# When changing Python vesion don't forget to update ProductCode appropriately
-!define PYTHON_VERSION "2.6"
-!define PYTHON_URL_BASE "http://python.org/ftp/python/2.6.6/"
-!define PYTHON_INSTALLER "python-2.6.6.msi"
-!define PYTHON_PRODUCT_CODE "{6151CF20-0BD8-4023-A4A0-6A86DCFE58E5}"
-
-# When changing VC runtime vesion don't forget to update ProductCode appropriately
-# VC9 (VS2008) SP1 + MFC Security Update
-!define VCRUNTIME_PRODUCT_CODE "{9BE518E6-ECC6-35A9-88E4-87755C07200F}"
-
-!define MSDIA_DLL_NAME "msdia90.dll"
-!define CLSID_DiaSource "{4C41678E-887B-4365-A09E-925D28DB33C2}"
-
-!include "pykd_setup_common.nsh"
diff --git a/nsis_setup/pykd_setup_x86_python27.nsi b/nsis_setup/pykd_setup_x86_python27.nsi
deleted file mode 100644
index 77ab6fd..0000000
--- a/nsis_setup/pykd_setup_x86_python27.nsi
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# This is setup script for pykd project.
-# Author: Maksim K. aka airmax
-#
-
-!define PRODUCT_ARCH "x86"
-
-# When changing Python vesion don't forget to update ProductCode appropriately
-!define PYTHON_VERSION "2.7"
-!define PYTHON_URL_BASE "http://python.org/ftp/python/2.7.3/"
-!define PYTHON_INSTALLER "python-2.7.3.msi"
-!define PYTHON_PRODUCT_CODE "{C0C31BCC-56FB-42A7-8766-D29E1BD74C7C}"
-
-# When changing VC runtime vesion don't forget to update ProductCode appropriately
-# VC9 (VS2008) SP1 + MFC Security Update
-!define VCRUNTIME_PRODUCT_CODE "{9BE518E6-ECC6-35A9-88E4-87755C07200F}"
-
-!define MSDIA_DLL_NAME "msdia90.dll"
-!define CLSID_DiaSource "{4C41678E-887B-4365-A09E-925D28DB33C2}"
-
-!include "pykd_setup_common.nsh"
diff --git a/pykd-0.3-2010.sln b/pykd-0.3-2010.sln
deleted file mode 100644
index 9db6b13..0000000
--- a/pykd-0.3-2010.sln
+++ /dev/null
@@ -1,119 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pykd", "pykd\pykd.vcxproj", "{C4C45791-0201-4406-BC5C-A384B01E3BF5}"
- ProjectSection(ProjectDependencies) = postProject
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF} = {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kdlib", "kdlibcpp\source\kdlib.vcxproj", "{3E9C538F-F060-4E86-AB7D-D44439615B63}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{5A3C2DA6-AE91-4025-AC03-A58BD03CEBCD}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{FE246107-1CB8-404F-97BD-E901E4B5E972}"
- ProjectSection(SolutionItems) = preProject
- test\scripts\_run_pykdtest.cmd = test\scripts\_run_pykdtest.cmd
- test\scripts\basetest.py = test\scripts\basetest.py
- test\scripts\breakpoint.py = test\scripts\breakpoint.py
- test\scripts\clienttest.py = test\scripts\clienttest.py
- test\scripts\customtypestest.py = test\scripts\customtypestest.py
- test\scripts\dbgcmd.py = test\scripts\dbgcmd.py
- test\scripts\ehexcepttest.py = test\scripts\ehexcepttest.py
- test\scripts\ehloadtest.py = test\scripts\ehloadtest.py
- test\scripts\ehstatustest.py = test\scripts\ehstatustest.py
- test\scripts\ehsymbolstest.py = test\scripts\ehsymbolstest.py
- test\scripts\eventtest.py = test\scripts\eventtest.py
- test\scripts\intbase.py = test\scripts\intbase.py
- test\scripts\localstest.py = test\scripts\localstest.py
- test\scripts\memtest.py = test\scripts\memtest.py
- test\scripts\moduletest.py = test\scripts\moduletest.py
- test\scripts\mspdbtest.py = test\scripts\mspdbtest.py
- test\scripts\pykdtest.py = test\scripts\pykdtest.py
- test\scripts\regtest.py = test\scripts\regtest.py
- test\scripts\stacktest.py = test\scripts\stacktest.py
- test\scripts\synsymtest.py = test\scripts\synsymtest.py
- test\scripts\target.py = test\scripts\target.py
- test\scripts\testutils.py = test\scripts\testutils.py
- test\scripts\thrdctxtest.py = test\scripts\thrdctxtest.py
- test\scripts\typedvar.py = test\scripts\typedvar.py
- test\scripts\typeinfo.py = test\scripts\typeinfo.py
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "targetapp", "kdlibcpp\tests\targetapp\targetapp.vcxproj", "{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{A7AF87D2-983B-4B3A-823F-5A2C6989672E}"
- ProjectSection(SolutionItems) = preProject
- samples\samples.py = samples\samples.py
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "snippets", "snippets", "{AAB21DD2-B0EE-493E-8415-5195F18879EB}"
- ProjectSection(SolutionItems) = preProject
- snippets\accessmask.py = snippets\accessmask.py
- snippets\avl.py = snippets\avl.py
- snippets\cr0.py = snippets\cr0.py
- snippets\cr4.py = snippets\cr4.py
- snippets\ctlcode.py = snippets\ctlcode.py
- snippets\export.py = snippets\export.py
- snippets\findhandle.py = snippets\findhandle.py
- snippets\findtag.py = snippets\findtag.py
- snippets\gdt.py = snippets\gdt.py
- snippets\help.py = snippets\help.py
- snippets\iat.py = snippets\iat.py
- snippets\nbl.py = snippets\nbl.py
- snippets\ndis.py = snippets\ndis.py
- snippets\ntobj.py = snippets\ntobj.py
- snippets\pytowiki.py = snippets\pytowiki.py
- snippets\ssdt.py = snippets\ssdt.py
- snippets\stkdelta.py = snippets\stkdelta.py
- snippets\stkwalk.py = snippets\stkwalk.py
- snippets\wfp.py = snippets\wfp.py
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "um", "um", "{EEFC9510-DFA7-439E-801E-48FCE72766AD}"
- ProjectSection(SolutionItems) = preProject
- samples\um\critlist.py = samples\um\critlist.py
- samples\um\ldr.py = samples\um\ldr.py
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_2.7|Win32 = Debug_2.7|Win32
- Debug_2.7|x64 = Debug_2.7|x64
- Release_2.7|Win32 = Release_2.7|Win32
- Release_2.7|x64 = Release_2.7|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Win32.ActiveCfg = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Win32.Build.0 = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|x64.ActiveCfg = Debug_2.7|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|x64.Build.0 = Debug_2.7|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Win32.ActiveCfg = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Win32.Build.0 = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|x64.ActiveCfg = Release_2.7|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|x64.Build.0 = Release_2.7|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.ActiveCfg = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.Build.0 = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|x64.ActiveCfg = Debug|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|x64.Build.0 = Debug|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Win32.ActiveCfg = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Win32.Build.0 = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|x64.ActiveCfg = Release|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|x64.Build.0 = Release|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.ActiveCfg = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.Build.0 = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|x64.ActiveCfg = Debug|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|x64.Build.0 = Debug|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.ActiveCfg = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.Build.0 = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.ActiveCfg = Release|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {FE246107-1CB8-404F-97BD-E901E4B5E972} = {5A3C2DA6-AE91-4025-AC03-A58BD03CEBCD}
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF} = {5A3C2DA6-AE91-4025-AC03-A58BD03CEBCD}
- {EEFC9510-DFA7-439E-801E-48FCE72766AD} = {A7AF87D2-983B-4B3A-823F-5A2C6989672E}
- EndGlobalSection
-EndGlobal
diff --git a/pykd-0.3-2012.sln b/pykd-0.3-2012.sln
deleted file mode 100644
index c372868..0000000
--- a/pykd-0.3-2012.sln
+++ /dev/null
@@ -1,256 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{5A3C2DA6-AE91-4025-AC03-A58BD03CEBCD}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{A7AF87D2-983B-4B3A-823F-5A2C6989672E}"
- ProjectSection(SolutionItems) = preProject
- samples\samples.py = samples\samples.py
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "snippets", "snippets", "{AAB21DD2-B0EE-493E-8415-5195F18879EB}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "um", "um", "{EEFC9510-DFA7-439E-801E-48FCE72766AD}"
- ProjectSection(SolutionItems) = preProject
- samples\um\critlist.py = samples\um\critlist.py
- samples\um\ldr.py = samples\um\ldr.py
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "targetapp", "kdlibcpp\tests\targetapp\targetapp_vc110.vcxproj", "{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kdlib", "kdlibcpp\source\kdlib_vc110.vcxproj", "{3E9C538F-F060-4E86-AB7D-D44439615B63}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pykd", "pykd\pykd_vc110.vcxproj", "{C4C45791-0201-4406-BC5C-A384B01E3BF5}"
- ProjectSection(ProjectDependencies) = postProject
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF} = {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}
- EndProjectSection
-EndProject
-Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "pykdtest", "test\scripts\pykdtest.pyproj", "{3F0BE77E-19B0-4192-B432-44A25805BCB8}"
- ProjectSection(ProjectDependencies) = postProject
- {C4C45791-0201-4406-BC5C-A384B01E3BF5} = {C4C45791-0201-4406-BC5C-A384B01E3BF5}
- EndProjectSection
-EndProject
-Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "snippets", "snippets\snippets.pyproj", "{6471FEDC-3129-410F-BFFC-4BC89707E5EC}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EFB54DEF-ABE9-48E0-8EFB-73CB55B18893}"
-EndProject
-Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "setup", "setup\setup.pyproj", "{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_2.7|Any CPU = Debug_2.7|Any CPU
- Debug_2.7|Mixed Platforms = Debug_2.7|Mixed Platforms
- Debug_2.7|Win32 = Debug_2.7|Win32
- Debug_2.7|x64 = Debug_2.7|x64
- Debug|Any CPU = Debug|Any CPU
- Debug|Mixed Platforms = Debug|Mixed Platforms
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- Release_2.7|Any CPU = Release_2.7|Any CPU
- Release_2.7|Mixed Platforms = Release_2.7|Mixed Platforms
- Release_2.7|Win32 = Release_2.7|Win32
- Release_2.7|x64 = Release_2.7|x64
- Release|Any CPU = Release|Any CPU
- Release|Mixed Platforms = Release|Mixed Platforms
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Any CPU.ActiveCfg = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Mixed Platforms.ActiveCfg = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Mixed Platforms.Build.0 = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Mixed Platforms.Deploy.0 = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.ActiveCfg = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.Build.0 = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.Deploy.0 = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|x64.ActiveCfg = Debug|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|x64.Build.0 = Debug|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|x64.Deploy.0 = Debug|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug|Any CPU.ActiveCfg = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug|Mixed Platforms.Build.0 = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug|Mixed Platforms.Deploy.0 = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug|Win32.ActiveCfg = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug|Win32.Build.0 = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug|Win32.Deploy.0 = Debug|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug|x64.ActiveCfg = Debug|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug|x64.Build.0 = Debug|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Any CPU.ActiveCfg = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Mixed Platforms.ActiveCfg = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Mixed Platforms.Build.0 = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Mixed Platforms.Deploy.0 = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.ActiveCfg = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.Build.0 = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|Win32.Deploy.0 = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.ActiveCfg = Release|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.Build.0 = Release|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_2.7|x64.Deploy.0 = Release|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release|Any CPU.ActiveCfg = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release|Mixed Platforms.ActiveCfg = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release|Mixed Platforms.Build.0 = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release|Mixed Platforms.Deploy.0 = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release|Win32.ActiveCfg = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release|Win32.Build.0 = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release|Win32.Deploy.0 = Release|Win32
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release|x64.ActiveCfg = Release|x64
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release|x64.Build.0 = Release|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Any CPU.ActiveCfg = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Mixed Platforms.ActiveCfg = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Mixed Platforms.Build.0 = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Mixed Platforms.Deploy.0 = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.ActiveCfg = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.Build.0 = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.Deploy.0 = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|x64.ActiveCfg = Debug|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|x64.Build.0 = Debug|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|x64.Deploy.0 = Debug|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug|Any CPU.ActiveCfg = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug|Mixed Platforms.Build.0 = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug|Mixed Platforms.Deploy.0 = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug|Win32.ActiveCfg = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug|Win32.Build.0 = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug|Win32.Deploy.0 = Debug|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug|x64.ActiveCfg = Debug|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug|x64.Build.0 = Debug|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Any CPU.ActiveCfg = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Mixed Platforms.ActiveCfg = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Mixed Platforms.Build.0 = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Mixed Platforms.Deploy.0 = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Win32.ActiveCfg = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Win32.Build.0 = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|Win32.Deploy.0 = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|x64.ActiveCfg = Release|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|x64.Build.0 = Release|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_2.7|x64.Deploy.0 = Release|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|Any CPU.ActiveCfg = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|Mixed Platforms.ActiveCfg = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|Mixed Platforms.Build.0 = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|Mixed Platforms.Deploy.0 = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|Win32.ActiveCfg = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|Win32.Build.0 = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|Win32.Deploy.0 = Release|Win32
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|x64.ActiveCfg = Release|x64
- {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release|x64.Build.0 = Release|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Any CPU.ActiveCfg = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Mixed Platforms.ActiveCfg = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Mixed Platforms.Build.0 = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Mixed Platforms.Deploy.0 = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Win32.ActiveCfg = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Win32.Build.0 = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Win32.Deploy.0 = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|x64.ActiveCfg = Debug_2.7|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|x64.Build.0 = Debug_2.7|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|x64.Deploy.0 = Debug_2.7|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug|Any CPU.ActiveCfg = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug|Mixed Platforms.ActiveCfg = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug|Mixed Platforms.Build.0 = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug|Mixed Platforms.Deploy.0 = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug|Win32.ActiveCfg = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug|Win32.Build.0 = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug|Win32.Deploy.0 = Debug_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug|x64.ActiveCfg = Debug_2.7|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug|x64.Build.0 = Debug_2.7|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Any CPU.ActiveCfg = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Mixed Platforms.ActiveCfg = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Mixed Platforms.Build.0 = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Mixed Platforms.Deploy.0 = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Win32.ActiveCfg = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Win32.Build.0 = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|Win32.Deploy.0 = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|x64.ActiveCfg = Release_2.7|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|x64.Build.0 = Release_2.7|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_2.7|x64.Deploy.0 = Release_2.7|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release|Any CPU.ActiveCfg = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release|Mixed Platforms.ActiveCfg = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release|Mixed Platforms.Build.0 = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release|Mixed Platforms.Deploy.0 = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release|Win32.ActiveCfg = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release|Win32.Build.0 = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release|Win32.Deploy.0 = Release_2.7|Win32
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release|x64.ActiveCfg = Release_2.7|x64
- {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release|x64.Build.0 = Release_2.7|x64
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|Any CPU.ActiveCfg = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|Any CPU.Build.0 = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|Mixed Platforms.Build.0 = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|Win32.ActiveCfg = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|Win32.Build.0 = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|x64.ActiveCfg = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug|Win32.ActiveCfg = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug|x64.ActiveCfg = Debug|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_2.7|Any CPU.ActiveCfg = Release|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_2.7|Any CPU.Build.0 = Release|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_2.7|Mixed Platforms.ActiveCfg = Release|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_2.7|Mixed Platforms.Build.0 = Release|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_2.7|Win32.ActiveCfg = Release|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_2.7|x64.ActiveCfg = Release|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release|Any CPU.Build.0 = Release|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release|Win32.ActiveCfg = Release|Any CPU
- {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release|x64.ActiveCfg = Release|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_2.7|Any CPU.ActiveCfg = Debug|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_2.7|Any CPU.Build.0 = Debug|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_2.7|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_2.7|Mixed Platforms.Build.0 = Debug|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_2.7|Win32.ActiveCfg = Debug|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_2.7|x64.ActiveCfg = Debug|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug|Win32.ActiveCfg = Debug|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug|x64.ActiveCfg = Debug|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_2.7|Any CPU.ActiveCfg = Release|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_2.7|Any CPU.Build.0 = Release|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_2.7|Mixed Platforms.ActiveCfg = Release|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_2.7|Mixed Platforms.Build.0 = Release|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_2.7|Win32.ActiveCfg = Release|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_2.7|x64.ActiveCfg = Release|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release|Any CPU.Build.0 = Release|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release|Win32.ActiveCfg = Release|Any CPU
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release|x64.ActiveCfg = Release|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_2.7|Any CPU.ActiveCfg = Debug|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_2.7|Any CPU.Build.0 = Debug|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_2.7|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_2.7|Mixed Platforms.Build.0 = Debug|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_2.7|Win32.ActiveCfg = Debug|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_2.7|x64.ActiveCfg = Debug|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug|Win32.ActiveCfg = Debug|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug|x64.ActiveCfg = Debug|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_2.7|Any CPU.ActiveCfg = Release|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_2.7|Any CPU.Build.0 = Release|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_2.7|Mixed Platforms.ActiveCfg = Release|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_2.7|Mixed Platforms.Build.0 = Release|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_2.7|Win32.ActiveCfg = Release|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_2.7|x64.ActiveCfg = Release|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release|Any CPU.Build.0 = Release|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release|Win32.ActiveCfg = Release|Any CPU
- {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release|x64.ActiveCfg = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF} = {5A3C2DA6-AE91-4025-AC03-A58BD03CEBCD}
- {3F0BE77E-19B0-4192-B432-44A25805BCB8} = {5A3C2DA6-AE91-4025-AC03-A58BD03CEBCD}
- {EEFC9510-DFA7-439E-801E-48FCE72766AD} = {A7AF87D2-983B-4B3A-823F-5A2C6989672E}
- {6471FEDC-3129-410F-BFFC-4BC89707E5EC} = {AAB21DD2-B0EE-493E-8415-5195F18879EB}
- EndGlobalSection
-EndGlobal
diff --git a/pykd-0.3-2013.sln b/pykd.sln
similarity index 71%
rename from pykd-0.3-2013.sln
rename to pykd.sln
index d46d335..92f217b 100644
--- a/pykd-0.3-2013.sln
+++ b/pykd.sln
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2013
-VisualStudioVersion = 12.0.40629.0
+# Visual Studio 15
+VisualStudioVersion = 15.0.27428.2037
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{5A3C2DA6-AE91-4025-AC03-A58BD03CEBCD}"
EndProject
@@ -20,14 +20,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "um", "um", "{EEFC9510-DFA7-
samples\um\virtalloc.py = samples\um\virtalloc.py
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{D1F1222A-A12B-4FD7-91A0-0AB6393A3169}"
- ProjectSection(SolutionItems) = preProject
- .nuget\NuGet.Config = .nuget\NuGet.Config
- .nuget\NuGet.exe = .nuget\NuGet.exe
- .nuget\NuGet.targets = .nuget\NuGet.targets
- .nuget\packages.config = .nuget\packages.config
- EndProjectSection
-EndProject
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "pykdtest", "test\scripts\pykdtest.pyproj", "{3F0BE77E-19B0-4192-B432-44A25805BCB8}"
ProjectSection(ProjectDependencies) = postProject
{C4C45791-0201-4406-BC5C-A384B01E3BF5} = {C4C45791-0201-4406-BC5C-A384B01E3BF5}
@@ -37,18 +29,14 @@ Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "snippets", "snippets\snippe
EndProject
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "setup", "setup\setup.pyproj", "{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kdlib", "kdlibcpp\kdlib\source\kdlib_vc120.vcxproj", "{3E9C538F-F060-4E86-AB7D-D44439615B63}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kdlib", "kdlibcpp\kdlib\source\kdlib.vcxproj", "{3E9C538F-F060-4E86-AB7D-D44439615B63}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pykd", "pykd\pykd_vc120.vcxproj", "{C4C45791-0201-4406-BC5C-A384B01E3BF5}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pykd", "pykd\pykd.vcxproj", "{C4C45791-0201-4406-BC5C-A384B01E3BF5}"
ProjectSection(ProjectDependencies) = postProject
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF} = {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "targetapp", "kdlibcpp\kdlib\tests\targetapp\targetapp_vc120.vcxproj", "{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pykd_ext", "pykd_bootstrapper\pykd_bootstrapper_vc120.vcxproj", "{CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pykd_ext_2.0", "pykd_ext\pykd_ext_vc120.vcxproj", "{583F9A6C-AF6D-45E0-A8F4-290D93611185}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "targetapp", "kdlibcpp\kdlib\tests\targetapp\targetapp.vcxproj", "{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -64,6 +52,8 @@ Global
Release_3.5|x64 = Release_3.5|x64
Release_3.6|Win32 = Release_3.6|Win32
Release_3.6|x64 = Release_3.6|x64
+ Release_3.7|Win32 = Release_3.7|Win32
+ Release_3.7|x64 = Release_3.7|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Debug_2.7|Win32.ActiveCfg = Debug|Any CPU
@@ -79,6 +69,8 @@ Global
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.5|x64.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.6|Win32.ActiveCfg = Release|Any CPU
{3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.6|x64.ActiveCfg = Release|Any CPU
+ {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.7|Win32.ActiveCfg = Release|Any CPU
+ {3F0BE77E-19B0-4192-B432-44A25805BCB8}.Release_3.7|x64.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_2.7|Win32.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_2.7|x64.ActiveCfg = Debug|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Debug_3.5|Win32.ActiveCfg = Debug|Any CPU
@@ -91,6 +83,8 @@ Global
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.5|x64.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.6|Win32.ActiveCfg = Release|Any CPU
{6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.6|x64.ActiveCfg = Release|Any CPU
+ {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.7|Win32.ActiveCfg = Release|Any CPU
+ {6471FEDC-3129-410F-BFFC-4BC89707E5EC}.Release_3.7|x64.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_2.7|Win32.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_2.7|x64.ActiveCfg = Debug|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Debug_3.5|Win32.ActiveCfg = Debug|Any CPU
@@ -103,6 +97,8 @@ Global
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.5|x64.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.6|Win32.ActiveCfg = Release|Any CPU
{D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.6|x64.ActiveCfg = Release|Any CPU
+ {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.7|Win32.ActiveCfg = Release|Any CPU
+ {D78837DC-BF31-4FC4-88A5-7F2FADAFA795}.Release_3.7|x64.ActiveCfg = Release|Any CPU
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.ActiveCfg = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|Win32.Build.0 = Debug|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Debug_2.7|x64.ActiveCfg = Debug|x64
@@ -127,6 +123,10 @@ Global
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.6|Win32.Build.0 = Release_Static|Win32
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.6|x64.ActiveCfg = Release_Static|x64
{3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.6|x64.Build.0 = Release_Static|x64
+ {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.7|Win32.ActiveCfg = Release_Static|Win32
+ {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.7|Win32.Build.0 = Release_Static|Win32
+ {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.7|x64.ActiveCfg = Release_Static|x64
+ {3E9C538F-F060-4E86-AB7D-D44439615B63}.Release_3.7|x64.Build.0 = Release_Static|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Win32.ActiveCfg = Debug_2.7|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|Win32.Build.0 = Debug_2.7|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Debug_2.7|x64.ActiveCfg = Debug_2.7|x64
@@ -151,6 +151,10 @@ Global
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.6|Win32.Build.0 = Release_3.6|Win32
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.6|x64.ActiveCfg = Release_3.6|x64
{C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.6|x64.Build.0 = Release_3.6|x64
+ {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.7|Win32.ActiveCfg = Release_3.7|Win32
+ {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.7|Win32.Build.0 = Release_3.7|Win32
+ {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.7|x64.ActiveCfg = Release_3.7|x64
+ {C4C45791-0201-4406-BC5C-A384B01E3BF5}.Release_3.7|x64.Build.0 = Release_3.7|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.ActiveCfg = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|Win32.Build.0 = Debug|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Debug_2.7|x64.ActiveCfg = Debug|x64
@@ -175,50 +179,10 @@ Global
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|Win32.Build.0 = Release|Win32
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|x64.ActiveCfg = Release|x64
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.6|x64.Build.0 = Release|x64
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Debug_2.7|Win32.ActiveCfg = Debug_2.7|Win32
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Debug_2.7|Win32.Build.0 = Debug_2.7|Win32
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Debug_2.7|x64.ActiveCfg = Debug_2.7|x64
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Debug_2.7|x64.Build.0 = Debug_2.7|x64
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Debug_3.5|Win32.ActiveCfg = Debug_2.7|Win32
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Debug_3.5|Win32.Build.0 = Debug_2.7|Win32
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Debug_3.5|x64.ActiveCfg = Debug_2.7|x64
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Debug_3.5|x64.Build.0 = Debug_2.7|x64
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Debug_3.6|Win32.ActiveCfg = Debug_2.7|Win32
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Debug_3.6|x64.ActiveCfg = Debug_2.7|x64
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Release_2.7|Win32.ActiveCfg = Release_2.7|Win32
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Release_2.7|Win32.Build.0 = Release_2.7|Win32
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Release_2.7|x64.ActiveCfg = Release_2.7|x64
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Release_2.7|x64.Build.0 = Release_2.7|x64
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Release_3.5|Win32.ActiveCfg = Release_2.7|Win32
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Release_3.5|Win32.Build.0 = Release_2.7|Win32
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Release_3.5|x64.ActiveCfg = Release_2.7|x64
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Release_3.5|x64.Build.0 = Release_2.7|x64
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Release_3.6|Win32.ActiveCfg = Release_2.7|Win32
- {CA0252CE-EF81-4DD8-A96F-A0E0E3644B7B}.Release_3.6|x64.ActiveCfg = Release_2.7|x64
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Debug_2.7|Win32.ActiveCfg = Debug|Win32
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Debug_2.7|Win32.Build.0 = Debug|Win32
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Debug_2.7|x64.ActiveCfg = Debug|x64
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Debug_2.7|x64.Build.0 = Debug|x64
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Debug_3.5|Win32.ActiveCfg = Debug|Win32
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Debug_3.5|Win32.Build.0 = Debug|Win32
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Debug_3.5|x64.ActiveCfg = Debug|x64
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Debug_3.5|x64.Build.0 = Debug|x64
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Debug_3.6|Win32.ActiveCfg = Debug|Win32
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Debug_3.6|Win32.Build.0 = Debug|Win32
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Debug_3.6|x64.ActiveCfg = Debug|x64
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Debug_3.6|x64.Build.0 = Debug|x64
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Release_2.7|Win32.ActiveCfg = Release|Win32
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Release_2.7|Win32.Build.0 = Release|Win32
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Release_2.7|x64.ActiveCfg = Release|x64
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Release_2.7|x64.Build.0 = Release|x64
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Release_3.5|Win32.ActiveCfg = Release|Win32
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Release_3.5|Win32.Build.0 = Release|Win32
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Release_3.5|x64.ActiveCfg = Release|x64
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Release_3.5|x64.Build.0 = Release|x64
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Release_3.6|Win32.ActiveCfg = Release|Win32
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Release_3.6|Win32.Build.0 = Release|Win32
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Release_3.6|x64.ActiveCfg = Release|x64
- {583F9A6C-AF6D-45E0-A8F4-290D93611185}.Release_3.6|x64.Build.0 = Release|x64
+ {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|Win32.ActiveCfg = Release|Win32
+ {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|Win32.Build.0 = Release|Win32
+ {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|x64.ActiveCfg = Release|x64
+ {0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF}.Release_3.7|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -229,4 +193,7 @@ Global
{6471FEDC-3129-410F-BFFC-4BC89707E5EC} = {AAB21DD2-B0EE-493E-8415-5195F18879EB}
{0E4CC688-F2F5-499F-9C07-0F2CAEE0D3EF} = {5A3C2DA6-AE91-4025-AC03-A58BD03CEBCD}
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {23D3DF9E-C3F8-476E-8B59-440641E1B2D6}
+ EndGlobalSection
EndGlobal
diff --git a/pykd/boost.python/boost_python-src.dict.cpp b/pykd/boost.python/boost_python-src.dict.cpp
new file mode 100644
index 0000000..0134390
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.dict.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "dict.cpp"
diff --git a/pykd/boost.python/boost_python-src.errors.cpp b/pykd/boost.python/boost_python-src.errors.cpp
new file mode 100644
index 0000000..2e07ffd
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.errors.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "errors.cpp"
diff --git a/pykd/boost.python/boost_python-src.exec.cpp b/pykd/boost.python/boost_python-src.exec.cpp
new file mode 100644
index 0000000..ea11bdb
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.exec.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "exec.cpp"
diff --git a/pykd/boost.python/boost_python-src.import.cpp b/pykd/boost.python/boost_python-src.import.cpp
new file mode 100644
index 0000000..cb15f74
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.import.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "import.cpp"
diff --git a/pykd/boost.python/boost_python-src.list.cpp b/pykd/boost.python/boost_python-src.list.cpp
new file mode 100644
index 0000000..4ef9dbf
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.list.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "list.cpp"
diff --git a/pykd/boost.python/boost_python-src.long.cpp b/pykd/boost.python/boost_python-src.long.cpp
new file mode 100644
index 0000000..a1f9e37
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.long.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "long.cpp"
diff --git a/pykd/boost.python/boost_python-src.module.cpp b/pykd/boost.python/boost_python-src.module.cpp
new file mode 100644
index 0000000..470e296
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.module.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "module.cpp"
diff --git a/pykd/boost.python/boost_python-src.object_operators.cpp b/pykd/boost.python/boost_python-src.object_operators.cpp
new file mode 100644
index 0000000..81acc34
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.object_operators.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "object_operators.cpp"
diff --git a/pykd/boost.python/boost_python-src.object_protocol.cpp b/pykd/boost.python/boost_python-src.object_protocol.cpp
new file mode 100644
index 0000000..cafe3ea
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.object_protocol.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "object_protocol.cpp"
diff --git a/pykd/boost.python/boost_python-src.slice.cpp b/pykd/boost.python/boost_python-src.slice.cpp
new file mode 100644
index 0000000..c8d7ffe
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.slice.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "slice.cpp"
diff --git a/pykd/boost.python/boost_python-src.str.cpp b/pykd/boost.python/boost_python-src.str.cpp
new file mode 100644
index 0000000..1e7300c
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.str.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "str.cpp"
diff --git a/pykd/boost.python/boost_python-src.tuple.cpp b/pykd/boost.python/boost_python-src.tuple.cpp
new file mode 100644
index 0000000..045db47
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.tuple.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "tuple.cpp"
diff --git a/pykd/boost.python/boost_python-src.wrapper.cpp b/pykd/boost.python/boost_python-src.wrapper.cpp
new file mode 100644
index 0000000..75b1f4d
--- /dev/null
+++ b/pykd/boost.python/boost_python-src.wrapper.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "wrapper.cpp"
diff --git a/pykd/boost.python/converter/arg_to_python_base.cpp b/pykd/boost.python/converter/arg_to_python_base.cpp
new file mode 100644
index 0000000..d872314
--- /dev/null
+++ b/pykd/boost.python/converter/arg_to_python_base.cpp
@@ -0,0 +1,28 @@
+// Copyright David Abrahams 2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include
+#include
+#include
+#include
+#include
+
+namespace boost { namespace python { namespace converter {
+
+namespace detail
+{
+ arg_to_python_base::arg_to_python_base(
+ void const volatile* source, registration const& converters)
+# if !defined(BOOST_MSVC) || BOOST_MSVC <= 1300 || _MSC_FULL_VER > 13102179
+ : handle<>
+# else
+ : m_ptr
+# endif
+ (converters.to_python(source))
+ {
+ }
+}
+
+}}} // namespace boost::python::converter
diff --git a/pykd/boost.python/converter/boost_python-src.converter.arg_to_python_base.cpp b/pykd/boost.python/converter/boost_python-src.converter.arg_to_python_base.cpp
new file mode 100644
index 0000000..dd9752a
--- /dev/null
+++ b/pykd/boost.python/converter/boost_python-src.converter.arg_to_python_base.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "arg_to_python_base.cpp"
diff --git a/pykd/boost.python/converter/boost_python-src.converter.builtin_converters.cpp b/pykd/boost.python/converter/boost_python-src.converter.builtin_converters.cpp
new file mode 100644
index 0000000..df31ccf
--- /dev/null
+++ b/pykd/boost.python/converter/boost_python-src.converter.builtin_converters.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "builtin_converters.cpp"
diff --git a/pykd/boost.python/converter/boost_python-src.converter.from_python.cpp b/pykd/boost.python/converter/boost_python-src.converter.from_python.cpp
new file mode 100644
index 0000000..fc71566
--- /dev/null
+++ b/pykd/boost.python/converter/boost_python-src.converter.from_python.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "from_python.cpp"
diff --git a/pykd/boost.python/converter/boost_python-src.converter.registry.cpp b/pykd/boost.python/converter/boost_python-src.converter.registry.cpp
new file mode 100644
index 0000000..7cc2cf8
--- /dev/null
+++ b/pykd/boost.python/converter/boost_python-src.converter.registry.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "registry.cpp"
diff --git a/pykd/boost.python/converter/boost_python-src.converter.type_id.cpp b/pykd/boost.python/converter/boost_python-src.converter.type_id.cpp
new file mode 100644
index 0000000..afaf12b
--- /dev/null
+++ b/pykd/boost.python/converter/boost_python-src.converter.type_id.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "type_id.cpp"
diff --git a/pykd/boost.python/converter/builtin_converters.cpp b/pykd/boost.python/converter/builtin_converters.cpp
new file mode 100644
index 0000000..ee2d5b4
--- /dev/null
+++ b/pykd/boost.python/converter/builtin_converters.cpp
@@ -0,0 +1,592 @@
+// Copyright David Abrahams 2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+namespace boost { namespace python { namespace converter {
+
+shared_ptr_deleter::shared_ptr_deleter(handle<> owner)
+ : owner(owner)
+{}
+
+shared_ptr_deleter::~shared_ptr_deleter() {}
+
+void shared_ptr_deleter::operator()(void const*)
+{
+ owner.reset();
+}
+
+namespace
+{
+
+ // An lvalue conversion function which extracts a char const* from a
+ // Python String.
+#if PY_VERSION_HEX < 0x03000000
+ void* convert_to_cstring(PyObject* obj)
+ {
+ return PyString_Check(obj) ? PyString_AsString(obj) : 0;
+ }
+#elif PY_VERSION_HEX < 0x03070000
+ void* convert_to_cstring(PyObject* obj)
+ {
+ return PyUnicode_Check(obj) ? _PyUnicode_AsString(obj) : 0;
+ }
+#else
+ void* convert_to_cstring(PyObject* obj)
+ {
+ return PyUnicode_Check(obj) ? const_cast(reinterpret_cast(_PyUnicode_AsString(obj))) : 0;
+ }
+#endif
+
+ // Given a target type and a SlotPolicy describing how to perform a
+ // given conversion, registers from_python converters which use the
+ // SlotPolicy to extract the type.
+ template
+ struct slot_rvalue_from_python
+ {
+ public:
+ slot_rvalue_from_python()
+ {
+ registry::insert(
+ &slot_rvalue_from_python::convertible
+ , &slot_rvalue_from_python::construct
+ , type_id()
+ , &SlotPolicy::get_pytype
+ );
+ }
+
+ private:
+ static void* convertible(PyObject* obj)
+ {
+ unaryfunc* slot = SlotPolicy::get_slot(obj);
+ return slot && *slot ? slot : 0;
+ }
+
+ static void construct(PyObject* obj, rvalue_from_python_stage1_data* data)
+ {
+ // Get the (intermediate) source object
+ unaryfunc creator = *static_cast(data->convertible);
+ handle<> intermediate(creator(obj));
+
+ // Get the location in which to construct
+ void* storage = ((rvalue_from_python_storage*)data)->storage.bytes;
+# ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4244)
+# endif
+ new (storage) T( SlotPolicy::extract(intermediate.get()) );
+
+# ifdef _MSC_VER
+# pragma warning(pop)
+# endif
+ // record successful construction
+ data->convertible = storage;
+ }
+ };
+
+ // identity_unaryfunc/py_object_identity -- manufacture a unaryfunc
+ // "slot" which just returns its argument.
+ extern "C" PyObject* identity_unaryfunc(PyObject* x)
+ {
+ Py_INCREF(x);
+ return x;
+ }
+ unaryfunc py_object_identity = identity_unaryfunc;
+
+#if PY_VERSION_HEX >= 0x03000000
+ // As in Python 3 there is only one integer type, we can have much
+ // simplified logic.
+ // XXX(bhy) maybe the code will work with 2.6 or even 2.5?
+ struct int_rvalue_from_python_base
+ {
+ static unaryfunc* get_slot(PyObject* obj)
+ {
+ return PyLong_Check(obj) ? &py_object_identity : 0;
+ }
+ static PyTypeObject const* get_pytype() {return &PyLong_Type;}
+ };
+
+ template
+ struct signed_int_rvalue_from_python : int_rvalue_from_python_base
+ {
+ static T extract(PyObject* intermediate)
+ {
+ long x = PyLong_AsLong(intermediate);
+ if (PyErr_Occurred())
+ throw_error_already_set();
+ return numeric_cast(x);
+ }
+ };
+
+ template
+ struct unsigned_int_rvalue_from_python : int_rvalue_from_python_base
+ {
+ static T extract(PyObject* intermediate)
+ {
+ unsigned long x = PyLong_AsUnsignedLong(intermediate);
+ if (PyErr_Occurred())
+ throw_error_already_set();
+ return numeric_cast(x);
+ }
+ };
+#else // PY_VERSION_HEX >= 0x03000000
+ // A SlotPolicy for extracting signed integer types from Python objects
+ struct signed_int_rvalue_from_python_base
+ {
+ static unaryfunc* get_slot(PyObject* obj)
+ {
+ PyNumberMethods* number_methods = obj->ob_type->tp_as_number;
+ if (number_methods == 0)
+ return 0;
+
+ return (
+#if PY_VERSION_HEX >= 0x02040000 && defined(BOOST_PYTHON_BOOL_INT_STRICT)
+ !PyBool_Check(obj) &&
+#endif
+ (PyInt_Check(obj) || PyLong_Check(obj)))
+
+ ? &number_methods->nb_int : 0;
+ }
+ static PyTypeObject const* get_pytype() { return &PyInt_Type;}
+ };
+
+ template
+ struct signed_int_rvalue_from_python : signed_int_rvalue_from_python_base
+ {
+ static T extract(PyObject* intermediate)
+ {
+ long x = PyInt_AsLong(intermediate);
+ if (PyErr_Occurred())
+ throw_error_already_set();
+ return numeric_cast(x);
+ }
+ };
+
+ // A SlotPolicy for extracting unsigned integer types from Python objects
+ struct unsigned_int_rvalue_from_python_base
+ {
+ static unaryfunc* get_slot(PyObject* obj)
+ {
+ PyNumberMethods* number_methods = obj->ob_type->tp_as_number;
+ if (number_methods == 0)
+ return 0;
+
+ return (
+#if PY_VERSION_HEX >= 0x02040000 && defined(BOOST_PYTHON_BOOL_INT_STRICT)
+ !PyBool_Check(obj) &&
+#endif
+ (PyInt_Check(obj) || PyLong_Check(obj)))
+ ? &py_object_identity : 0;
+ }
+ static PyTypeObject const* get_pytype() { return &PyInt_Type;}
+ };
+
+ template
+ struct unsigned_int_rvalue_from_python : unsigned_int_rvalue_from_python_base
+ {
+ static T extract(PyObject* intermediate)
+ {
+ if (PyLong_Check(intermediate)) {
+ // PyLong_AsUnsignedLong() checks for negative overflow, so no
+ // need to check it here.
+ unsigned long result = PyLong_AsUnsignedLong(intermediate);
+ if (PyErr_Occurred())
+ throw_error_already_set();
+ return numeric_cast(result);
+ } else {
+ // None of PyInt_AsUnsigned*() functions check for negative
+ // overflow, so use PyInt_AS_LONG instead and check if number is
+ // negative, issuing the exception appropriately.
+ long result = PyInt_AS_LONG(intermediate);
+ if (PyErr_Occurred())
+ throw_error_already_set();
+ if (result < 0) {
+ PyErr_SetString(PyExc_OverflowError, "can't convert negative"
+ " value to unsigned");
+ throw_error_already_set();
+ }
+ return numeric_cast(result);
+ }
+ }
+ };
+#endif // PY_VERSION_HEX >= 0x03000000
+
+// Checking Python's macro instead of Boost's - we don't seem to get
+// the config right all the time. Furthermore, Python's is defined
+// when long long is absent but __int64 is present.
+
+#ifdef HAVE_LONG_LONG
+ // A SlotPolicy for extracting long long types from Python objects
+
+ struct long_long_rvalue_from_python_base
+ {
+ static unaryfunc* get_slot(PyObject* obj)
+ {
+#if PY_VERSION_HEX >= 0x03000000
+ return PyLong_Check(obj) ? &py_object_identity : 0;
+#else
+ PyNumberMethods* number_methods = obj->ob_type->tp_as_number;
+ if (number_methods == 0)
+ return 0;
+
+ // Return the identity conversion slot to avoid creating a
+ // new object. We'll handle that in the extract function
+ if (PyInt_Check(obj))
+ return &number_methods->nb_int;
+ else if (PyLong_Check(obj))
+ return &number_methods->nb_long;
+ else
+ return 0;
+#endif
+ }
+ static PyTypeObject const* get_pytype() { return &PyLong_Type;}
+ };
+
+ struct long_long_rvalue_from_python : long_long_rvalue_from_python_base
+ {
+ static BOOST_PYTHON_LONG_LONG extract(PyObject* intermediate)
+ {
+#if PY_VERSION_HEX < 0x03000000
+ if (PyInt_Check(intermediate))
+ {
+ return PyInt_AS_LONG(intermediate);
+ }
+ else
+#endif
+ {
+ BOOST_PYTHON_LONG_LONG result = PyLong_AsLongLong(intermediate);
+
+ if (PyErr_Occurred())
+ throw_error_already_set();
+
+ return result;
+ }
+ }
+ };
+
+ struct unsigned_long_long_rvalue_from_python : long_long_rvalue_from_python_base
+ {
+ static unsigned BOOST_PYTHON_LONG_LONG extract(PyObject* intermediate)
+ {
+#if PY_VERSION_HEX < 0x03000000
+ if (PyInt_Check(intermediate))
+ {
+ return numeric_cast(PyInt_AS_LONG(intermediate));
+ }
+ else
+#endif
+ {
+ unsigned BOOST_PYTHON_LONG_LONG result = PyLong_AsUnsignedLongLong(intermediate);
+
+ if (PyErr_Occurred())
+ throw_error_already_set();
+
+ return result;
+ }
+ }
+ };
+#endif
+
+ // A SlotPolicy for extracting bool from a Python object
+ struct bool_rvalue_from_python
+ {
+ static unaryfunc* get_slot(PyObject* obj)
+ {
+#if PY_VERSION_HEX >= 0x03000000
+ return obj == Py_None || PyLong_Check(obj) ? &py_object_identity : 0;
+#elif PY_VERSION_HEX >= 0x02040000 && defined(BOOST_PYTHON_BOOL_INT_STRICT)
+ return obj == Py_None || PyBool_Check(obj) ? &py_object_identity : 0;
+#else
+ return obj == Py_None || PyInt_Check(obj) ? &py_object_identity : 0;
+#endif
+ }
+
+ static bool extract(PyObject* intermediate)
+ {
+ return PyObject_IsTrue(intermediate);
+ }
+
+ static PyTypeObject const* get_pytype()
+ {
+#if PY_VERSION_HEX >= 0x02030000
+ return &PyBool_Type;
+#else
+ return &PyInt_Type;
+#endif
+ }
+ };
+
+ // A SlotPolicy for extracting floating types from Python objects.
+ struct float_rvalue_from_python
+ {
+ static unaryfunc* get_slot(PyObject* obj)
+ {
+ PyNumberMethods* number_methods = obj->ob_type->tp_as_number;
+ if (number_methods == 0)
+ return 0;
+
+ // For integer types, return the tp_int conversion slot to avoid
+ // creating a new object. We'll handle that below
+#if PY_VERSION_HEX < 0x03000000
+ if (PyInt_Check(obj))
+ return &number_methods->nb_int;
+#endif
+
+ return (PyLong_Check(obj) || PyFloat_Check(obj))
+ ? &number_methods->nb_float : 0;
+ }
+
+ static double extract(PyObject* intermediate)
+ {
+#if PY_VERSION_HEX < 0x03000000
+ if (PyInt_Check(intermediate))
+ {
+ return PyInt_AS_LONG(intermediate);
+ }
+ else
+#endif
+ {
+ return PyFloat_AS_DOUBLE(intermediate);
+ }
+ }
+ static PyTypeObject const* get_pytype() { return &PyFloat_Type;}
+ };
+
+#if PY_VERSION_HEX >= 0x03000000
+ unaryfunc py_unicode_as_string_unaryfunc = PyUnicode_AsUTF8String;
+#endif
+
+ // A SlotPolicy for extracting C++ strings from Python objects.
+ struct string_rvalue_from_python
+ {
+ // If the underlying object is "string-able" this will succeed
+ static unaryfunc* get_slot(PyObject* obj)
+ {
+#if PY_VERSION_HEX >= 0x03000000
+ return (PyUnicode_Check(obj)) ? &py_unicode_as_string_unaryfunc :
+ PyBytes_Check(obj) ? &py_object_identity : 0;
+#else
+ return (PyString_Check(obj)) ? &obj->ob_type->tp_str : 0;
+
+#endif
+ };
+
+ // Remember that this will be used to construct the result object
+#if PY_VERSION_HEX >= 0x03000000
+ static std::string extract(PyObject* intermediate)
+ {
+ return std::string(PyBytes_AsString(intermediate),PyBytes_Size(intermediate));
+ }
+ static PyTypeObject const* get_pytype() { return &PyUnicode_Type;}
+#else
+ static std::string extract(PyObject* intermediate)
+ {
+ return std::string(PyString_AsString(intermediate),PyString_Size(intermediate));
+ }
+ static PyTypeObject const* get_pytype() { return &PyString_Type;}
+#endif
+ };
+
+#if defined(Py_USING_UNICODE) && !defined(BOOST_NO_STD_WSTRING)
+ // encode_string_unaryfunc/py_encode_string -- manufacture a unaryfunc
+ // "slot" which encodes a Python string using the default encoding
+ extern "C" PyObject* encode_string_unaryfunc(PyObject* x)
+ {
+ return PyUnicode_FromEncodedObject( x, 0, 0 );
+ }
+ unaryfunc py_encode_string = encode_string_unaryfunc;
+
+ // A SlotPolicy for extracting C++ strings from Python objects.
+ struct wstring_rvalue_from_python
+ {
+ // If the underlying object is "string-able" this will succeed
+ static unaryfunc* get_slot(PyObject* obj)
+ {
+ return PyUnicode_Check(obj)
+ ? &py_object_identity
+#if PY_VERSION_HEX >= 0x03000000
+ : PyBytes_Check(obj)
+#else
+ : PyString_Check(obj)
+#endif
+ ? &py_encode_string
+ : 0;
+ };
+
+ // Remember that this will be used to construct the result object
+ static std::wstring extract(PyObject* intermediate)
+ {
+ // On Windows, with Python >= 3.3, PyObject_Length cannot be used to get
+ // the size of the wchar_t string, because it will count the number of
+ // *code points*, but some characters not on the BMP will use two UTF-16
+ // *code units* (surrogate pairs).
+ // This is not a problem on Unix, since wchar_t is 32-bit.
+#if defined(_WIN32) && PY_VERSION_HEX >= 0x03030000
+ BOOST_STATIC_ASSERT(sizeof(wchar_t) == 2);
+
+ Py_ssize_t size = 0;
+ wchar_t *buf = PyUnicode_AsWideCharString(intermediate, &size);
+ if (buf == NULL) {
+ boost::python::throw_error_already_set();
+ }
+ std::wstring result(buf, size);
+ PyMem_Free(buf);
+#else
+ std::wstring result(::PyObject_Length(intermediate), L' ');
+ if (!result.empty())
+ {
+ int err = PyUnicode_AsWideChar(
+#if PY_VERSION_HEX < 0x03020000
+ (PyUnicodeObject *)
+#endif
+ intermediate
+ , &result[0]
+ , result.size());
+
+ if (err == -1)
+ throw_error_already_set();
+ }
+#endif
+ return result;
+ }
+ static PyTypeObject const* get_pytype() { return &PyUnicode_Type;}
+ };
+#endif
+
+ struct complex_rvalue_from_python
+ {
+ static unaryfunc* get_slot(PyObject* obj)
+ {
+ if (PyComplex_Check(obj))
+ return &py_object_identity;
+ else
+ return float_rvalue_from_python::get_slot(obj);
+ }
+
+ static std::complex extract(PyObject* intermediate)
+ {
+ if (PyComplex_Check(intermediate))
+ {
+ return std::complex(
+ PyComplex_RealAsDouble(intermediate)
+ , PyComplex_ImagAsDouble(intermediate));
+ }
+#if PY_VERSION_HEX < 0x03000000
+ else if (PyInt_Check(intermediate))
+ {
+ return PyInt_AS_LONG(intermediate);
+ }
+#endif
+ else
+ {
+ return PyFloat_AS_DOUBLE(intermediate);
+ }
+ }
+ static PyTypeObject const* get_pytype() { return &PyComplex_Type;}
+ };
+}
+
+BOOST_PYTHON_DECL PyObject* do_return_to_python(char x)
+{
+#if PY_VERSION_HEX >= 0x03000000
+ return PyUnicode_FromStringAndSize(&x, 1);
+#else
+ return PyString_FromStringAndSize(&x, 1);
+#endif
+}
+
+BOOST_PYTHON_DECL PyObject* do_return_to_python(char const* x)
+{
+#if PY_VERSION_HEX >= 0x03000000
+ return x ? PyUnicode_FromString(x) : boost::python::detail::none();
+#else
+ return x ? PyString_FromString(x) : boost::python::detail::none();
+#endif
+}
+
+BOOST_PYTHON_DECL PyObject* do_return_to_python(PyObject* x)
+{
+ return x ? x : boost::python::detail::none();
+}
+
+BOOST_PYTHON_DECL PyObject* do_arg_to_python(PyObject* x)
+{
+ if (x == 0)
+ return boost::python::detail::none();
+
+ Py_INCREF(x);
+ return x;
+}
+
+#define REGISTER_INT_CONVERTERS(signedness, U) \
+ slot_rvalue_from_python< \
+ signedness U \
+ ,signedness##_int_rvalue_from_python \
+ >()
+
+#define REGISTER_INT_CONVERTERS2(U) \
+ REGISTER_INT_CONVERTERS(signed, U); \
+ REGISTER_INT_CONVERTERS(unsigned, U)
+
+void initialize_builtin_converters()
+{
+ // booleans
+ slot_rvalue_from_python();
+
+ // integer types
+ REGISTER_INT_CONVERTERS2(char);
+ REGISTER_INT_CONVERTERS2(short);
+ REGISTER_INT_CONVERTERS2(int);
+ REGISTER_INT_CONVERTERS2(long);
+
+// using Python's macro instead of Boost's - we don't seem to get the
+// config right all the time.
+# ifdef HAVE_LONG_LONG
+ slot_rvalue_from_python();
+ slot_rvalue_from_python();
+# endif
+
+ // floating types
+ slot_rvalue_from_python();
+ slot_rvalue_from_python();
+ slot_rvalue_from_python();
+
+ slot_rvalue_from_python,complex_rvalue_from_python>();
+ slot_rvalue_from_python,complex_rvalue_from_python>();
+ slot_rvalue_from_python,complex_rvalue_from_python>();
+
+ // Add an lvalue converter for char which gets us char const*
+#if PY_VERSION_HEX < 0x03000000
+ registry::insert(convert_to_cstring,type_id(),&converter::wrap_pytype<&PyString_Type>::get_pytype);
+#else
+ registry::insert(convert_to_cstring,type_id(),&converter::wrap_pytype<&PyUnicode_Type>::get_pytype);
+#endif
+
+ // Register by-value converters to std::string, std::wstring
+#if defined(Py_USING_UNICODE) && !defined(BOOST_NO_STD_WSTRING)
+ slot_rvalue_from_python();
+# endif
+ slot_rvalue_from_python();
+
+}
+
+}}} // namespace boost::python::converter
diff --git a/pykd/boost.python/converter/from_python.cpp b/pykd/boost.python/converter/from_python.cpp
new file mode 100644
index 0000000..9678be1
--- /dev/null
+++ b/pykd/boost.python/converter/from_python.cpp
@@ -0,0 +1,303 @@
+// Copyright David Abrahams 2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include
+#include
+#include
+
+#include
+
+#include
+#include
+#include
+
+#include
+#include
+
+namespace boost { namespace python { namespace converter {
+
+// rvalue_from_python_stage1 -- do the first stage of a conversion
+// from a Python object to a C++ rvalue.
+//
+// source - the Python object to be converted
+// converters - the registry entry for the target type T
+//
+// Postcondition: where x is the result, one of:
+//
+// 1. x.convertible == 0, indicating failure
+//
+// 2. x.construct == 0, x.convertible is the address of an object of
+// type T. Indicates a successful lvalue conversion
+//
+// 3. where y is of type rvalue_from_python_data,
+// x.construct(source, y) constructs an object of type T
+// in y.storage.bytes and then sets y.convertible == y.storage.bytes,
+// or else throws an exception and has no effect.
+BOOST_PYTHON_DECL rvalue_from_python_stage1_data rvalue_from_python_stage1(
+ PyObject* source
+ , registration const& converters)
+{
+ rvalue_from_python_stage1_data data;
+
+ // First check to see if it's embedded in an extension class
+ // instance, as a special case.
+ data.convertible = objects::find_instance_impl(source, converters.target_type, converters.is_shared_ptr);
+ data.construct = 0;
+ if (!data.convertible)
+ {
+ for (rvalue_from_python_chain const* chain = converters.rvalue_chain;
+ chain != 0;
+ chain = chain->next)
+ {
+ void* r = chain->convertible(source);
+ if (r != 0)
+ {
+ data.convertible = r;
+ data.construct = chain->construct;
+ break;
+ }
+ }
+ }
+ return data;
+}
+
+// rvalue_result_from_python -- return the address of a C++ object which
+// can be used as the result of calling a Python function.
+//
+// src - the Python object to be converted
+//
+// data - a reference to the base part of a
+// rvalue_from_python_data object, where T is the
+// target type of the conversion.
+//
+// Requires: data.convertible == ®istered::converters
+//
+BOOST_PYTHON_DECL void* rvalue_result_from_python(
+ PyObject* src, rvalue_from_python_stage1_data& data)
+{
+ // Retrieve the registration
+ // Cast in two steps for less-capable compilers
+ void const* converters_ = data.convertible;
+ registration const& converters = *static_cast(converters_);
+
+ // Look for an eligible converter
+ data = rvalue_from_python_stage1(src, converters);
+ return rvalue_from_python_stage2(src, data, converters);
+}
+
+BOOST_PYTHON_DECL void* rvalue_from_python_stage2(
+ PyObject* source, rvalue_from_python_stage1_data& data, registration const& converters)
+{
+ if (!data.convertible)
+ {
+ handle<> msg(
+#if PY_VERSION_HEX >= 0x03000000
+ ::PyUnicode_FromFormat
+#else
+ ::PyString_FromFormat
+#endif
+ (
+ "No registered converter was able to produce a C++ rvalue of type %s from this Python object of type %s"
+ , converters.target_type.name()
+ , source->ob_type->tp_name
+ ));
+
+ PyErr_SetObject(PyExc_TypeError, msg.get());
+ throw_error_already_set();
+ }
+
+ // If a construct function was registered (i.e. we found an
+ // rvalue conversion), call it now.
+ if (data.construct != 0)
+ data.construct(source, &data);
+
+ // Return the address of the resulting C++ object
+ return data.convertible;
+}
+
+BOOST_PYTHON_DECL void* get_lvalue_from_python(
+ PyObject* source
+ , registration const& converters)
+{
+ // Check to see if it's embedded in a class instance
+ void* x = objects::find_instance_impl(source, converters.target_type);
+ if (x)
+ return x;
+
+ lvalue_from_python_chain const* chain = converters.lvalue_chain;
+ for (;chain != 0; chain = chain->next)
+ {
+ void* r = chain->convert(source);
+ if (r != 0)
+ return r;
+ }
+ return 0;
+}
+
+namespace
+{
+ // Prevent looping in implicit conversions. This could/should be
+ // much more efficient, but will work for now.
+ typedef std::vector visited_t;
+ static visited_t visited;
+
+ inline bool visit(rvalue_from_python_chain const* chain)
+ {
+ visited_t::iterator const p = std::lower_bound(visited.begin(), visited.end(), chain);
+ if (p != visited.end() && *p == chain)
+ return false;
+ visited.insert(p, chain);
+ return true;
+ }
+
+ // RAII class for managing global visited marks.
+ struct unvisit
+ {
+ unvisit(rvalue_from_python_chain const* chain)
+ : chain(chain) {}
+
+ ~unvisit()
+ {
+ visited_t::iterator const p = std::lower_bound(visited.begin(), visited.end(), chain);
+ assert(p != visited.end());
+ visited.erase(p);
+ }
+ private:
+ rvalue_from_python_chain const* chain;
+ };
+}
+
+
+BOOST_PYTHON_DECL bool implicit_rvalue_convertible_from_python(
+ PyObject* source
+ , registration const& converters)
+{
+ if (objects::find_instance_impl(source, converters.target_type))
+ return true;
+
+ rvalue_from_python_chain const* chain = converters.rvalue_chain;
+
+ if (!visit(chain))
+ return false;
+
+ unvisit protect(chain);
+
+ for (;chain != 0; chain = chain->next)
+ {
+ if (chain->convertible(source))
+ return true;
+ }
+
+ return false;
+}
+
+namespace
+{
+ void throw_no_lvalue_from_python(PyObject* source, registration const& converters, char const* ref_type)
+ {
+ handle<> msg(
+#if PY_VERSION_HEX >= 0x03000000
+ ::PyUnicode_FromFormat
+#else
+ ::PyString_FromFormat
+#endif
+ (
+ "No registered converter was able to extract a C++ %s to type %s"
+ " from this Python object of type %s"
+ , ref_type
+ , converters.target_type.name()
+ , source->ob_type->tp_name
+ ));
+
+ PyErr_SetObject(PyExc_TypeError, msg.get());
+
+ throw_error_already_set();
+ }
+
+ void* lvalue_result_from_python(
+ PyObject* source
+ , registration const& converters
+ , char const* ref_type)
+ {
+ handle<> holder(source);
+ if (source->ob_refcnt <= 1)
+ {
+ handle<> msg(
+#if PY_VERSION_HEX >= 0x3000000
+ ::PyUnicode_FromFormat
+#else
+ ::PyString_FromFormat
+#endif
+ (
+ "Attempt to return dangling %s to object of type: %s"
+ , ref_type
+ , converters.target_type.name()));
+
+ PyErr_SetObject(PyExc_ReferenceError, msg.get());
+
+ throw_error_already_set();
+ }
+
+ void* result = get_lvalue_from_python(source, converters);
+ if (!result)
+ (throw_no_lvalue_from_python)(source, converters, ref_type);
+ return result;
+ }
+
+}
+
+BOOST_PYTHON_DECL void throw_no_pointer_from_python(PyObject* source, registration const& converters)
+{
+ (throw_no_lvalue_from_python)(source, converters, "pointer");
+}
+
+BOOST_PYTHON_DECL void throw_no_reference_from_python(PyObject* source, registration const& converters)
+{
+ (throw_no_lvalue_from_python)(source, converters, "reference");
+}
+
+BOOST_PYTHON_DECL void* reference_result_from_python(
+ PyObject* source
+ , registration const& converters)
+{
+ return (lvalue_result_from_python)(source, converters, "reference");
+}
+
+BOOST_PYTHON_DECL void* pointer_result_from_python(
+ PyObject* source
+ , registration const& converters)
+{
+ if (source == Py_None)
+ {
+ Py_DECREF(source);
+ return 0;
+ }
+ return (lvalue_result_from_python)(source, converters, "pointer");
+}
+
+BOOST_PYTHON_DECL void void_result_from_python(PyObject* o)
+{
+ Py_DECREF(expect_non_null(o));
+}
+
+} // namespace boost::python::converter
+
+BOOST_PYTHON_DECL PyObject*
+pytype_check(PyTypeObject* type_, PyObject* source)
+{
+ if (!PyObject_IsInstance(source, python::upcast(type_)))
+ {
+ ::PyErr_Format(
+ PyExc_TypeError
+ , "Expecting an object of type %s; got an object of type %s instead"
+ , type_->tp_name
+ , source->ob_type->tp_name
+ );
+ throw_error_already_set();
+ }
+ return source;
+}
+
+}} // namespace boost::python
diff --git a/pykd/boost.python/converter/registry.cpp b/pykd/boost.python/converter/registry.cpp
new file mode 100644
index 0000000..aa20c3f
--- /dev/null
+++ b/pykd/boost.python/converter/registry.cpp
@@ -0,0 +1,306 @@
+// Copyright David Abrahams 2001.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#include
+#include
+#include
+
+#include
+#include
+
+#if defined(__APPLE__) && defined(__MACH__) && defined(__GNUC__) \
+ && __GNUC__ == 3 && __GNUC_MINOR__ <= 4 && !defined(__APPLE_CC__)
+# define BOOST_PYTHON_CONVERTER_REGISTRY_APPLE_MACH_WORKAROUND
+#endif
+
+#if defined(BOOST_PYTHON_TRACE_REGISTRY) \
+ || defined(BOOST_PYTHON_CONVERTER_REGISTRY_APPLE_MACH_WORKAROUND)
+# include
+#endif
+
+namespace boost { namespace python { namespace converter {
+BOOST_PYTHON_DECL PyTypeObject const* registration::expected_from_python_type() const
+{
+ if (this->m_class_object != 0)
+ return this->m_class_object;
+
+ std::set pool;
+
+ for(rvalue_from_python_chain* r = rvalue_chain; r ; r=r->next)
+ if(r->expected_pytype)
+ pool.insert(r->expected_pytype());
+
+ //for now I skip the search for common base
+ if (pool.size()==1)
+ return *pool.begin();
+
+ return 0;
+
+}
+
+BOOST_PYTHON_DECL PyTypeObject const* registration::to_python_target_type() const
+{
+ if (this->m_class_object != 0)
+ return this->m_class_object;
+
+ if (this->m_to_python_target_type != 0)
+ return this->m_to_python_target_type();
+
+ return 0;
+}
+
+BOOST_PYTHON_DECL PyTypeObject* registration::get_class_object() const
+{
+ if (this->m_class_object == 0)
+ {
+ ::PyErr_Format(
+ PyExc_TypeError
+ , const_cast("No Python class registered for C++ class %s")
+ , this->target_type.name());
+
+ throw_error_already_set();
+ }
+
+ return this->m_class_object;
+}
+
+BOOST_PYTHON_DECL PyObject* registration::to_python(void const volatile* source) const
+{
+ if (this->m_to_python == 0)
+ {
+ handle<> msg(
+#if PY_VERSION_HEX >= 0x3000000
+ ::PyUnicode_FromFormat
+#else
+ ::PyString_FromFormat
+#endif
+ (
+ "No to_python (by-value) converter found for C++ type: %s"
+ , this->target_type.name()
+ )
+ );
+
+ PyErr_SetObject(PyExc_TypeError, msg.get());
+
+ throw_error_already_set();
+ }
+
+ return source == 0
+ ? incref(Py_None)
+ : this->m_to_python(const_cast(source));
+}
+
+namespace
+{
+ template< typename T >
+ void delete_node( T* node )
+ {
+ if( !!node && !!node->next )
+ delete_node( node->next );
+ delete node;
+ }
+}
+
+registration::~registration()
+{
+ delete_node(lvalue_chain);
+ delete_node(rvalue_chain);
+}
+
+
+namespace //
+{
+ typedef registration entry;
+
+ typedef std::set registry_t;
+
+#ifndef BOOST_PYTHON_CONVERTER_REGISTRY_APPLE_MACH_WORKAROUND
+ registry_t& entries()
+ {
+ static registry_t registry;
+
+# ifndef BOOST_PYTHON_SUPPRESS_REGISTRY_INITIALIZATION
+ static bool builtin_converters_initialized = false;
+ if (!builtin_converters_initialized)
+ {
+ // Make this true early because registering the builtin
+ // converters will cause recursion.
+ builtin_converters_initialized = true;
+
+ initialize_builtin_converters();
+ }
+# ifdef BOOST_PYTHON_TRACE_REGISTRY
+ std::cout << "registry: ";
+ for (registry_t::iterator p = registry.begin(); p != registry.end(); ++p)
+ {
+ std::cout << p->target_type << "; ";
+ }
+ std::cout << '\n';
+# endif
+# endif
+ return registry;
+ }
+#else
+ registry_t& static_registry()
+ {
+ static registry_t result;
+ return result;
+ }
+
+ bool static_builtin_converters_initialized()
+ {
+ static bool result = false;
+ if (result == false) {
+ result = true;
+ std::cout << std::flush;
+ return false;
+ }
+ return true;
+ }
+
+ registry_t& entries()
+ {
+# ifndef BOOST_PYTHON_SUPPRESS_REGISTRY_INITIALIZATION
+ if (!static_builtin_converters_initialized())
+ {
+ initialize_builtin_converters();
+ }
+# ifdef BOOST_PYTHON_TRACE_REGISTRY
+ std::cout << "registry: ";
+ for (registry_t::iterator p = static_registry().begin(); p != static_registry().end(); ++p)
+ {
+ std::cout << p->target_type << "; ";
+ }
+ std::cout << '\n';
+# endif
+# endif
+ return static_registry();
+ }
+#endif // BOOST_PYTHON_CONVERTER_REGISTRY_APPLE_MACH_WORKAROUND
+
+ entry* get(type_info type, bool is_shared_ptr = false)
+ {
+# ifdef BOOST_PYTHON_TRACE_REGISTRY
+ registry_t::iterator p = entries().find(entry(type));
+
+ std::cout << "looking up " << type << ": "
+ << (p == entries().end() || p->target_type != type
+ ? "...NOT found\n" : "...found\n");
+# endif
+ std::pair pos_ins
+ = entries().insert(entry(type,is_shared_ptr));
+
+# if __MWERKS__ >= 0x3000
+ // do a little invariant checking if a change was made
+ if ( pos_ins.second )
+ assert(entries().invariants());
+# endif
+ return const_cast(&*pos_ins.first);
+ }
+} // namespace
+
+namespace registry
+{
+ void insert(to_python_function_t f, type_info source_t, PyTypeObject const* (*to_python_target_type)())
+ {
+# ifdef BOOST_PYTHON_TRACE_REGISTRY
+ std::cout << "inserting to_python " << source_t << "\n";
+# endif
+ entry* slot = get(source_t);
+
+ assert(slot->m_to_python == 0); // we have a problem otherwise
+ if (slot->m_to_python != 0)
+ {
+ std::string msg = (
+ std::string("to-Python converter for ")
+ + source_t.name()
+ + " already registered; second conversion method ignored."
+ );
+
+ if ( ::PyErr_Warn( NULL, const_cast(msg.c_str()) ) )
+ {
+ throw_error_already_set();
+ }
+ }
+ slot->m_to_python = f;
+ slot->m_to_python_target_type = to_python_target_type;
+ }
+
+ // Insert an lvalue from_python converter
+ void insert(convertible_function convert, type_info key, PyTypeObject const* (*exp_pytype)())
+ {
+# ifdef BOOST_PYTHON_TRACE_REGISTRY
+ std::cout << "inserting lvalue from_python " << key << "\n";
+# endif
+ entry* found = get(key);
+ lvalue_from_python_chain *registration = new lvalue_from_python_chain;
+ registration->convert = convert;
+ registration->next = found->lvalue_chain;
+ found->lvalue_chain = registration;
+
+ insert(convert, 0, key,exp_pytype);
+ }
+
+ // Insert an rvalue from_python converter
+ void insert(convertible_function convertible
+ , constructor_function construct
+ , type_info key
+ , PyTypeObject const* (*exp_pytype)())
+ {
+# ifdef BOOST_PYTHON_TRACE_REGISTRY
+ std::cout << "inserting rvalue from_python " << key << "\n";
+# endif
+ entry* found = get(key);
+ rvalue_from_python_chain *registration = new rvalue_from_python_chain;
+ registration->convertible = convertible;
+ registration->construct = construct;
+ registration->expected_pytype = exp_pytype;
+ registration->next = found->rvalue_chain;
+ found->rvalue_chain = registration;
+ }
+
+ // Insert an rvalue from_python converter
+ void push_back(convertible_function convertible
+ , constructor_function construct
+ , type_info key
+ , PyTypeObject const* (*exp_pytype)())
+ {
+# ifdef BOOST_PYTHON_TRACE_REGISTRY
+ std::cout << "push_back rvalue from_python " << key << "\n";
+# endif
+ rvalue_from_python_chain** found = &get(key)->rvalue_chain;
+ while (*found != 0)
+ found = &(*found)->next;
+
+ rvalue_from_python_chain *registration = new rvalue_from_python_chain;
+ registration->convertible = convertible;
+ registration->construct = construct;
+ registration->expected_pytype = exp_pytype;
+ registration->next = 0;
+ *found = registration;
+ }
+
+ registration const& lookup(type_info key)
+ {
+ return *get(key);
+ }
+
+ registration const& lookup_shared_ptr(type_info key)
+ {
+ return *get(key, true);
+ }
+
+ registration const* query(type_info type)
+ {
+ registry_t::iterator p = entries().find(entry(type));
+# ifdef BOOST_PYTHON_TRACE_REGISTRY
+ std::cout << "querying " << type
+ << (p == entries().end() || p->target_type != type
+ ? "...NOT found\n" : "...found\n");
+# endif
+ return (p == entries().end() || p->target_type != type) ? 0 : &*p;
+ }
+} // namespace registry
+
+}}} // namespace boost::python::converter
diff --git a/pykd/boost.python/converter/type_id.cpp b/pykd/boost.python/converter/type_id.cpp
new file mode 100644
index 0000000..c6a8bf7
--- /dev/null
+++ b/pykd/boost.python/converter/type_id.cpp
@@ -0,0 +1,212 @@
+// Copyright David Abrahams 2001.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#if defined(__QNXNTO__)
+# include
+#else /* defined(__QNXNTO__) */
+
+#if !defined(__GNUC__) || __GNUC__ >= 3 || __SGI_STL_PORT || __EDG_VERSION__
+# include
+#else
+# include
+#endif
+
+# ifdef BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE
+# if defined(__GNUC__) && __GNUC__ >= 3
+
+// http://lists.debian.org/debian-gcc/2003/09/msg00055.html notes
+// that, in cxxabi.h of gcc-3.x for x < 4, this type is used before it
+// is declared.
+# if __GNUC__ == 3 && __GNUC_MINOR__ < 4
+class __class_type_info;
+# endif
+
+# include
+# endif
+# endif
+#endif /* defined(__QNXNTO__) */
+
+namespace boost { namespace python {
+
+# ifdef BOOST_PYTHON_HAVE_GCC_CP_DEMANGLE
+
+# if defined(__QNXNTO__)
+namespace cxxabi {
+extern "C" char* __cxa_demangle(char const*, char*, std::size_t*, int*);
+}
+# else /* defined(__QNXNTO__) */
+
+# ifdef __GNUC__
+# if __GNUC__ < 3
+
+namespace cxxabi = :: ;
+extern "C" char* __cxa_demangle(char const*, char*, std::size_t*, int*);
+# else
+
+namespace cxxabi = ::abi; // GCC 3.1 and later
+
+# if __GNUC__ == 3 && __GNUC_MINOR__ == 0
+namespace abi
+{
+ extern "C" char* __cxa_demangle(char const*, char*, std::size_t*, int*);
+}
+# endif /* __GNUC__ == 3 && __GNUC_MINOR__ == 0 */
+# endif /* __GNUC__ < 3 */
+# endif /* __GNUC__ */
+# endif /* defined(__QNXNTO__) */
+
+namespace
+{
+ struct compare_first_cstring
+ {
+ template
+ bool operator()(T const& x, T const& y)
+ {
+ return std::strcmp(x.first,y.first) < 0;
+ }
+ };
+
+ struct free_mem
+ {
+ free_mem(char*p)
+ : p(p) {}
+
+ ~free_mem()
+ {
+ std::free(p);
+ }
+ char* p;
+ };
+}
+
+bool cxxabi_cxa_demangle_is_broken()
+{
+ static bool was_tested = false;
+ static bool is_broken = false;
+ if (!was_tested) {
+ int status;
+ free_mem keeper(cxxabi::__cxa_demangle("b", 0, 0, &status));
+ was_tested = true;
+ if (status == -2 || strcmp(keeper.p, "bool") != 0) {
+ is_broken = true;
+ }
+ }
+ return is_broken;
+}
+
+namespace detail
+{
+ BOOST_PYTHON_DECL char const* gcc_demangle(char const* mangled)
+ {
+ typedef std::vector<
+ std::pair
+ > mangling_map;
+
+ static mangling_map demangler;
+ mangling_map::iterator p
+ = std::lower_bound(
+ demangler.begin(), demangler.end()
+ , std::make_pair(mangled, (char const*)0)
+ , compare_first_cstring());
+
+ if (p == demangler.end() || strcmp(p->first, mangled))
+ {
+ int status;
+ free_mem keeper(
+ cxxabi::__cxa_demangle(mangled, 0, 0, &status)
+ );
+
+ assert(status != -3); // invalid argument error
+
+ if (status == -1)
+ {
+ throw std::bad_alloc();
+ }
+ else
+ {
+ char const* demangled
+ = status == -2
+ // Invalid mangled name. Best we can do is to
+ // return it intact.
+ ? mangled
+ : keeper.p;
+
+ // Ult Mundane, 2005 Aug 17
+ // Contributed under the Boost Software License, Version 1.0.
+ // (See accompanying file LICENSE_1_0.txt or copy at
+ // http://www.boost.org/LICENSE_1_0.txt)
+ // The __cxa_demangle function is supposed to translate
+ // builtin types from their one-character mangled names,
+ // but it doesn't in gcc 3.3.5 and gcc 3.4.x.
+ if (cxxabi_cxa_demangle_is_broken()
+ && status == -2 && strlen(mangled) == 1)
+ {
+ // list from
+ // http://www.codesourcery.com/cxx-abi/abi.html
+ switch (mangled[0])
+ {
+ case 'v': demangled = "void"; break;
+ case 'w': demangled = "wchar_t"; break;
+ case 'b': demangled = "bool"; break;
+ case 'c': demangled = "char"; break;
+ case 'a': demangled = "signed char"; break;
+ case 'h': demangled = "unsigned char"; break;
+ case 's': demangled = "short"; break;
+ case 't': demangled = "unsigned short"; break;
+ case 'i': demangled = "int"; break;
+ case 'j': demangled = "unsigned int"; break;
+ case 'l': demangled = "long"; break;
+ case 'm': demangled = "unsigned long"; break;
+ case 'x': demangled = "long long"; break;
+ case 'y': demangled = "unsigned long long"; break;
+ case 'n': demangled = "__int128"; break;
+ case 'o': demangled = "unsigned __int128"; break;
+ case 'f': demangled = "float"; break;
+ case 'd': demangled = "double"; break;
+ case 'e': demangled = "long double"; break;
+ case 'g': demangled = "__float128"; break;
+ case 'z': demangled = "..."; break;
+ }
+ }
+
+ p = demangler.insert(p, std::make_pair(mangled, demangled));
+ keeper.p = 0;
+ }
+ }
+
+ return p->second;
+ }
+}
+# endif
+
+BOOST_PYTHON_DECL std::ostream& operator<<(std::ostream& os, type_info const& x)
+{
+ return os << x.name();
+}
+
+namespace detail
+{
+ BOOST_PYTHON_DECL std::ostream& operator<<(std::ostream& os, detail::decorated_type_info const& x)
+ {
+ os << x.m_base_type;
+ if (x.m_decoration & decorated_type_info::const_)
+ os << " const";
+ if (x.m_decoration & decorated_type_info::volatile_)
+ os << " volatile";
+ if (x.m_decoration & decorated_type_info::reference)
+ os << "&";
+ return os;
+ }
+}
+}} // namespace boost::python::converter
diff --git a/pykd/boost.python/dict.cpp b/pykd/boost.python/dict.cpp
new file mode 100644
index 0000000..77d840d
--- /dev/null
+++ b/pykd/boost.python/dict.cpp
@@ -0,0 +1,184 @@
+// Copyright David Abrahams 2004. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#include
+#include
+
+namespace boost { namespace python { namespace detail {
+namespace
+{
+ // When returning list objects from methods, it may turn out that the
+ // derived class is returning something else, perhaps something not
+ // even derived from list. Since it is generally harmless for a
+ // Boost.Python wrapper object to hold an object of a different
+ // type, and because calling list() with an object may in fact
+ // perform a conversion, the least-bad alternative is to assume that
+ // we have a Python list object and stuff it into the list result.
+ list assume_list(object const& o)
+ {
+ return list(detail::borrowed_reference(o.ptr()));
+ }
+
+ // No PyDict_CheckExact; roll our own.
+ inline bool check_exact(dict_base const* p)
+ {
+ return p->ptr()->ob_type == &PyDict_Type;
+ }
+}
+
+detail::new_reference dict_base::call(object const& arg_)
+{
+ return (detail::new_reference)PyObject_CallFunction(
+ (PyObject*)&PyDict_Type, const_cast("(O)"),
+ arg_.ptr());
+}
+
+dict_base::dict_base()
+ : object(detail::new_reference(PyDict_New()))
+{}
+
+dict_base::dict_base(object_cref data)
+ : object(call(data))
+{}
+
+void dict_base::clear()
+{
+ if (check_exact(this))
+ PyDict_Clear(this->ptr());
+ else
+ this->attr("clear")();
+}
+
+dict dict_base::copy()
+{
+ if (check_exact(this))
+ {
+ return dict(detail::new_reference(
+ PyDict_Copy(this->ptr())));
+ }
+ else
+ {
+ return dict(detail::borrowed_reference(
+ this->attr("copy")().ptr()
+ ));
+ }
+}
+
+object dict_base::get(object_cref k) const
+{
+ if (check_exact(this))
+ {
+ PyObject* result = PyDict_GetItem(this->ptr(),k.ptr());
+ return object(detail::borrowed_reference(result ? result : Py_None));
+ }
+ else
+ {
+ return this->attr("get")(k);
+ }
+}
+
+object dict_base::get(object_cref k, object_cref d) const
+{
+ return this->attr("get")(k,d);
+}
+
+bool dict_base::has_key(object_cref k) const
+{
+ return extract(this->contains(k));
+}
+
+list dict_base::items() const
+{
+ if (check_exact(this))
+ {
+ return list(detail::new_reference(
+ PyDict_Items(this->ptr())));
+ }
+ else
+ {
+ return assume_list(this->attr("items")());
+ }
+}
+
+object dict_base::iteritems() const
+{
+ return this->attr("iteritems")();
+}
+
+object dict_base::iterkeys() const
+{
+ return this->attr("iterkeys")();
+}
+
+object dict_base::itervalues() const
+{
+ return this->attr("itervalues")();
+}
+
+list dict_base::keys() const
+{
+ if (check_exact(this))
+ {
+ return list(detail::new_reference(
+ PyDict_Keys(this->ptr())));
+ }
+ else
+ {
+ return assume_list(this->attr("keys")());
+ }
+}
+
+tuple dict_base::popitem()
+{
+ return tuple(detail::borrowed_reference(
+ this->attr("popitem")().ptr()
+ ));
+}
+
+object dict_base::setdefault(object_cref k)
+{
+ return this->attr("setdefault")(k);
+}
+
+object dict_base::setdefault(object_cref k, object_cref d)
+{
+ return this->attr("setdefault")(k,d);
+}
+
+void dict_base::update(object_cref other)
+{
+ if (check_exact(this))
+ {
+ if (PyDict_Update(this->ptr(),other.ptr()) == -1)
+ throw_error_already_set();
+ }
+ else
+ {
+ this->attr("update")(other);
+ }
+}
+
+list dict_base::values() const
+{
+ if (check_exact(this))
+ {
+ return list(detail::new_reference(
+ PyDict_Values(this->ptr())));
+ }
+ else
+ {
+ return assume_list(this->attr("values")());
+ }
+}
+
+static struct register_dict_pytype_ptr
+{
+ register_dict_pytype_ptr()
+ {
+ const_cast(
+ converter::registry::lookup(boost::python::type_id())
+ ).m_class_object = &PyDict_Type;
+ }
+}register_dict_pytype_ptr_;
+
+}}} // namespace boost::python
diff --git a/pykd/boost.python/errors.cpp b/pykd/boost.python/errors.cpp
new file mode 100644
index 0000000..34ea22f
--- /dev/null
+++ b/pykd/boost.python/errors.cpp
@@ -0,0 +1,105 @@
+// Copyright David Abrahams 2001.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_PYTHON_SOURCE
+# define BOOST_PYTHON_SOURCE
+#endif
+
+#include
+#include
+#include
+
+namespace boost { namespace python {
+
+error_already_set::~error_already_set() {}
+
+// IMPORTANT: this function may only be called from within a catch block!
+BOOST_PYTHON_DECL bool handle_exception_impl(function0 f)
+{
+ try
+ {
+ if (detail::exception_handler::chain)
+ return detail::exception_handler::chain->handle(f);
+ f();
+ return false;
+ }
+ catch(const boost::python::error_already_set&)
+ {
+ // The python error reporting has already been handled.
+ }
+ catch(const std::bad_alloc&)
+ {
+ PyErr_NoMemory();
+ }
+ catch(const bad_numeric_cast& x)
+ {
+ PyErr_SetString(PyExc_OverflowError, x.what());
+ }
+ catch(const std::out_of_range& x)
+ {
+ PyErr_SetString(PyExc_IndexError, x.what());
+ }
+ catch(const std::invalid_argument& x)
+ {
+ PyErr_SetString(PyExc_ValueError, x.what());
+ }
+ catch(const std::exception& x)
+ {
+ PyErr_SetString(PyExc_RuntimeError, x.what());
+ }
+ catch(...)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "unidentifiable C++ exception");
+ }
+ return true;
+}
+
+void BOOST_PYTHON_DECL throw_error_already_set()
+{
+ throw error_already_set();
+}
+
+namespace detail {
+
+bool exception_handler::operator()(function0 const& f) const
+{
+ if (m_next)
+ {
+ return m_next->handle(f);
+ }
+ else
+ {
+ f();
+ return false;
+ }
+}
+
+exception_handler::exception_handler(handler_function const& impl)
+ : m_impl(impl)
+ , m_next(0)
+{
+ if (chain != 0)
+ tail->m_next = this;
+ else
+ chain = this;
+ tail = this;
+}
+
+exception_handler* exception_handler::chain;
+exception_handler* exception_handler::tail;
+
+BOOST_PYTHON_DECL void register_exception_handler(handler_function const& f)
+{
+ // the constructor links the new object into a handler chain, so
+ // this object isn't actaully leaked (until, of course, the
+ // interpreter exits).
+ new exception_handler(f);
+}
+
+} // namespace boost::python::detail
+
+}} // namespace boost::python
+
+
diff --git a/pykd/boost.python/exec.cpp b/pykd/boost.python/exec.cpp
new file mode 100644
index 0000000..171c6f4
--- /dev/null
+++ b/pykd/boost.python/exec.cpp
@@ -0,0 +1,129 @@
+// Copyright Stefan Seefeld 2005.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include
+#include
+#include
+#include
+#include
+
+namespace boost
+{
+namespace python
+{
+
+object BOOST_PYTHON_DECL eval(str string, object global, object local)
+{
+ return eval(python::extract(string), global, local);
+}
+
+object BOOST_PYTHON_DECL eval(char const *string, object global, object local)
+{
+ // Set suitable default values for global and local dicts.
+ if (global.is_none())
+ {
+ if (PyObject *g = PyEval_GetGlobals())
+ global = object(detail::borrowed_reference(g));
+ else
+ global = dict();
+ }
+ if (local.is_none()) local = global;
+ // should be 'char const *' but older python versions don't use 'const' yet.
+ char *s = const_cast(string);
+ PyObject* result = PyRun_String(s, Py_eval_input, global.ptr(), local.ptr());
+ if (!result) throw_error_already_set();
+ return object(detail::new_reference(result));
+}
+
+object BOOST_PYTHON_DECL exec(str string, object global, object local)
+{
+ return exec(python::extract(string), global, local);
+}
+
+object BOOST_PYTHON_DECL exec(char const *string, object global, object local)
+{
+ // Set suitable default values for global and local dicts.
+ if (global.is_none())
+ {
+ if (PyObject *g = PyEval_GetGlobals())
+ global = object(detail::borrowed_reference(g));
+ else
+ global = dict();
+ }
+ if (local.is_none()) local = global;
+ // should be 'char const *' but older python versions don't use 'const' yet.
+ char *s = const_cast(string);
+ PyObject* result = PyRun_String(s, Py_file_input, global.ptr(), local.ptr());
+ if (!result) throw_error_already_set();
+ return object(detail::new_reference(result));
+}
+
+object BOOST_PYTHON_DECL exec_statement(str string, object global, object local)
+{
+ return exec_statement(python::extract(string), global, local);
+}
+
+object BOOST_PYTHON_DECL exec_statement(char const *string, object global, object local)
+{
+ // Set suitable default values for global and local dicts.
+ if (global.is_none())
+ {
+ if (PyObject *g = PyEval_GetGlobals())
+ global = object(detail::borrowed_reference(g));
+ else
+ global = dict();
+ }
+ if (local.is_none()) local = global;
+ // should be 'char const *' but older python versions don't use 'const' yet.
+ char *s = const_cast(string);
+ PyObject* result = PyRun_String(s, Py_single_input, global.ptr(), local.ptr());
+ if (!result) throw_error_already_set();
+ return object(detail::new_reference(result));
+}
+
+// Execute python source code from file filename.
+// global and local are the global and local scopes respectively,
+// used during execution.
+object BOOST_PYTHON_DECL exec_file(str filename, object global, object local)
+{
+ return exec_file(python::extract(filename), global, local);
+}
+
+object BOOST_PYTHON_DECL exec_file(char const *filename, object global, object local)
+{
+ // Set suitable default values for global and local dicts.
+ if (global.is_none())
+ {
+ if (PyObject *g = PyEval_GetGlobals())
+ global = object(detail::borrowed_reference(g));
+ else
+ global = dict();
+ }
+ if (local.is_none()) local = global;
+ // should be 'char const *' but older python versions don't use 'const' yet.
+ char *f = const_cast(filename);
+ // Let python open the file to avoid potential binary incompatibilities.
+#if PY_VERSION_HEX >= 0x03040000
+ FILE *fs = _Py_fopen(f, "r");
+#elif PY_VERSION_HEX >= 0x03000000
+ PyObject *fo = Py_BuildValue("s", f);
+ FILE *fs = _Py_fopen(fo, "r");
+ Py_DECREF(fo);
+#else
+ PyObject *pyfile = PyFile_FromString(f, const_cast("r"));
+ if (!pyfile) throw std::invalid_argument(std::string(f) + " : no such file");
+ python::handle<> file(pyfile);
+ FILE *fs = PyFile_AsFile(file.get());
+#endif
+ PyObject* result = PyRun_File(fs,
+ f,
+ Py_file_input,
+ global.ptr(), local.ptr());
+ if (!result) throw_error_already_set();
+ return object(detail::new_reference(result));
+}
+
+} // namespace boost::python
+} // namespace boost
diff --git a/pykd/boost.python/fabscript b/pykd/boost.python/fabscript
new file mode 100644
index 0000000..0ebeac6
--- /dev/null
+++ b/pykd/boost.python/fabscript
@@ -0,0 +1,58 @@
+# -*- python -*-
+#
+# Copyright (c) 2016 Stefan Seefeld
+# All rights reserved.
+#
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+from faber.feature import set
+from faber.artefacts.library import library
+from faber.tools.compiler import define
+
+root = module('..')
+
+bpl = library('boost_python' + root.py_suffix,
+ ['list.cpp',
+ 'long.cpp',
+ 'dict.cpp',
+ 'tuple.cpp',
+ 'str.cpp',
+ 'slice.cpp',
+ 'converter/from_python.cpp',
+ 'converter/registry.cpp',
+ 'converter/type_id.cpp',
+ 'object/enum.cpp',
+ 'object/class.cpp',
+ 'object/function.cpp',
+ 'object/inheritance.cpp',
+ 'object/life_support.cpp',
+ 'object/pickle_support.cpp',
+ 'errors.cpp',
+ 'module.cpp',
+ 'converter/builtin_converters.cpp',
+ 'converter/arg_to_python_base.cpp',
+ 'object/iterator.cpp',
+ 'object/stl_iterator.cpp',
+ 'object_protocol.cpp',
+ 'object_operators.cpp',
+ 'wrapper.cpp',
+ 'import.cpp',
+ 'exec.cpp',
+ 'object/function_doc_signature.cpp'],
+ dependencies=root.config,
+ features=features + define('BOOST_PYTHON_SOURCE'))
+
+bnl = library('boost_numpy' + root.py_suffix,
+ ['numpy/dtype.cpp',
+ 'numpy/matrix.cpp',
+ 'numpy/ndarray.cpp',
+ 'numpy/numpy.cpp',
+ 'numpy/scalars.cpp',
+ 'numpy/ufunc.cpp',
+ bpl],
+ dependencies=root.config,
+ features=features + define('BOOST_NUMPY_SOURCE'),
+ condition=set.define.contains('HAS_NUMPY'))
+default = [bpl, bnl]
diff --git a/pykd/boost.python/import.cpp b/pykd/boost.python/import.cpp
new file mode 100644
index 0000000..0add79e
--- /dev/null
+++ b/pykd/boost.python/import.cpp
@@ -0,0 +1,25 @@
+// Copyright Stefan Seefeld 2005.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include
+#include
+#include
+#include
+
+namespace boost
+{
+namespace python
+{
+
+object BOOST_PYTHON_DECL import(str name)
+{
+ // should be 'char const *' but older python versions don't use 'const' yet.
+ char *n = python::extract(name);
+ python::handle<> module(PyImport_ImportModule(n));
+ return python::object(module);
+}
+
+} // namespace boost::python
+} // namespace boost
diff --git a/pykd/boost.python/list.cpp b/pykd/boost.python/list.cpp
new file mode 100644
index 0000000..77e6168
--- /dev/null
+++ b/pykd/boost.python/list.cpp
@@ -0,0 +1,170 @@
+// Copyright David Abrahams 2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#include
+#include
+
+namespace boost { namespace python { namespace detail {
+
+
+detail::new_non_null_reference list_base::call(object const& arg_)
+{
+ return (detail::new_non_null_reference)
+ (expect_non_null)(
+ PyObject_CallFunction(
+ (PyObject*)&PyList_Type, const_cast("(O)"),
+ arg_.ptr()));
+}
+
+list_base::list_base()
+ : object(detail::new_reference(PyList_New(0)))
+{}
+
+list_base::list_base(object_cref sequence)
+ : object(list_base::call(sequence))
+{}
+
+void list_base::append(object_cref x)
+{
+ if (PyList_CheckExact(this->ptr()))
+ {
+ if (PyList_Append(this->ptr(), x.ptr()) == -1)
+ throw_error_already_set();
+ }
+ else
+ {
+ this->attr("append")(x);
+ }
+}
+
+//long list_base::count(object_cref value) const;
+
+void list_base::extend(object_cref sequence)
+{
+ this->attr("extend")(sequence);
+}
+
+long list_base::index(object_cref value) const
+{
+ object result_obj(this->attr("index")(value));
+#if PY_VERSION_HEX >= 0x03000000
+ ssize_t result = PyLong_AsSsize_t(result_obj.ptr());
+#else
+ long result = PyInt_AsLong(result_obj.ptr());
+#endif
+ if (result == -1)
+ throw_error_already_set();
+ return result;
+}
+
+void list_base::insert(ssize_t index, object_cref item)
+{
+ if (PyList_CheckExact(this->ptr()))
+ {
+ if (PyList_Insert(this->ptr(), index, item.ptr()) == -1)
+ throw_error_already_set();
+ }
+ else
+ {
+ this->attr("insert")(index, item);
+ }
+}
+
+void list_base::insert(object const& index, object_cref x)
+{
+#if PY_VERSION_HEX >= 0x03000000
+ ssize_t index_ = PyLong_AsSsize_t(index.ptr());
+#else
+ long index_ = PyInt_AsLong(index.ptr());
+#endif
+ if (index_ == -1 && PyErr_Occurred())
+ throw_error_already_set();
+ this->insert(index_, x);
+}
+
+object list_base::pop()
+{
+ return this->attr("pop")();
+}
+
+object list_base::pop(ssize_t index)
+{
+ return this->pop(object(index));
+}
+
+object list_base::pop(object const& index)
+{
+ return this->attr("pop")(index);
+}
+
+void list_base::remove(object_cref value)
+{
+ this->attr("remove")(value);
+}
+
+void list_base::reverse()
+{
+ if (PyList_CheckExact(this->ptr()))
+ {
+ if (PyList_Reverse(this->ptr()) == -1)
+ throw_error_already_set();
+ }
+ else
+ {
+ this->attr("reverse")();
+ }
+}
+
+void list_base::sort()
+{
+ if (PyList_CheckExact(this->ptr()))
+ {
+ if (PyList_Sort(this->ptr()) == -1)
+ throw_error_already_set();
+ }
+ else
+ {
+ this->attr("sort")();
+ }
+}
+
+#if PY_VERSION_HEX >= 0x03000000
+void list_base::sort(args_proxy const &args,
+ kwds_proxy const &kwds)
+{
+ this->attr("sort")(args, kwds);
+}
+#else
+void list_base::sort(object_cref cmpfunc)
+{
+ this->attr("sort")(cmpfunc);
+}
+#endif
+
+// For some reason, moving this to the end of the TU suppresses an ICE
+// with vc6.
+ssize_t list_base::count(object_cref value) const
+{
+ object result_obj(this->attr("count")(value));
+#if PY_VERSION_HEX >= 0x03000000
+ ssize_t result = PyLong_AsSsize_t(result_obj.ptr());
+#else
+ long result = PyInt_AsLong(result_obj.ptr());
+#endif
+ if (result == -1)
+ throw_error_already_set();
+ return result;
+}
+
+static struct register_list_pytype_ptr
+{
+ register_list_pytype_ptr()
+ {
+ const_cast(
+ converter::registry::lookup(boost::python::type_id())
+ ).m_class_object = &PyList_Type;
+ }
+}register_list_pytype_ptr_;
+
+}}} // namespace boost::python
diff --git a/pykd/boost.python/long.cpp b/pykd/boost.python/long.cpp
new file mode 100644
index 0000000..1ec8ebc
--- /dev/null
+++ b/pykd/boost.python/long.cpp
@@ -0,0 +1,39 @@
+// Copyright David Abrahams 2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#include
+
+namespace boost { namespace python { namespace detail {
+
+new_non_null_reference long_base::call(object const& arg_)
+{
+ return (detail::new_non_null_reference)PyObject_CallFunction(
+ (PyObject*)&PyLong_Type, const_cast("(O)"),
+ arg_.ptr());
+}
+
+new_non_null_reference long_base::call(object const& arg_, object const& base)
+{
+ return (detail::new_non_null_reference)PyObject_CallFunction(
+ (PyObject*)&PyLong_Type, const_cast("(OO)"),
+ arg_.ptr(), base.ptr());
+}
+
+long_base::long_base()
+ : object(
+ detail::new_reference(
+ PyObject_CallFunction((PyObject*)&PyLong_Type, const_cast("()")))
+ )
+{}
+
+long_base::long_base(object_cref arg)
+ : object(long_base::call(arg))
+{}
+
+long_base::long_base(object_cref arg, object_cref base)
+ : object(long_base::call(arg, base))
+{}
+
+
+}}} // namespace boost::python
diff --git a/pykd/boost.python/module.cpp b/pykd/boost.python/module.cpp
new file mode 100644
index 0000000..9628481
--- /dev/null
+++ b/pykd/boost.python/module.cpp
@@ -0,0 +1,73 @@
+// (C) Copyright David Abrahams 2000.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// The author gratefully acknowleges the support of Dragon Systems, Inc., in
+// producing this work.
+
+#include
+#include
+
+namespace boost { namespace python { namespace detail {
+
+namespace
+{
+ PyObject* init_module_in_scope(PyObject* m, void(*init_function)())
+ {
+ if (m != 0)
+ {
+ // Create the current module scope
+ object m_obj(((borrowed_reference_t*)m));
+ scope current_module(m_obj);
+
+ handle_exception(init_function);
+ }
+
+ return m;
+ }
+}
+
+BOOST_PYTHON_DECL void scope_setattr_doc(char const* name, object const& x, char const* doc)
+{
+ // Use function::add_to_namespace to achieve overloading if
+ // appropriate.
+ scope current;
+ objects::add_to_namespace(current, name, x, doc);
+}
+
+#if PY_VERSION_HEX >= 0x03000000
+
+BOOST_PYTHON_DECL PyObject* init_module(PyModuleDef& moduledef, void(*init_function)())
+{
+ return init_module_in_scope(
+ PyModule_Create(&moduledef),
+ init_function);
+}
+
+#else
+
+namespace
+{
+ PyMethodDef initial_methods[] = { { 0, 0, 0, 0 } };
+}
+
+BOOST_PYTHON_DECL PyObject* init_module(char const* name, void(*init_function)())
+{
+ return init_module_in_scope(
+ Py_InitModule(const_cast(name), initial_methods),
+ init_function);
+}
+
+#endif
+
+}}} // namespace boost::python::detail
+
+namespace boost { namespace python {
+
+namespace detail
+{
+ BOOST_PYTHON_DECL PyObject* current_scope = 0;
+}
+
+}}
diff --git a/pykd/boost.python/object/boost_python-src.object.class.cpp b/pykd/boost.python/object/boost_python-src.object.class.cpp
new file mode 100644
index 0000000..08c1ef8
--- /dev/null
+++ b/pykd/boost.python/object/boost_python-src.object.class.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "class.cpp"
diff --git a/pykd/boost.python/object/boost_python-src.object.enum.cpp b/pykd/boost.python/object/boost_python-src.object.enum.cpp
new file mode 100644
index 0000000..798abca
--- /dev/null
+++ b/pykd/boost.python/object/boost_python-src.object.enum.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "enum.cpp"
diff --git a/pykd/boost.python/object/boost_python-src.object.function.cpp b/pykd/boost.python/object/boost_python-src.object.function.cpp
new file mode 100644
index 0000000..961a417
--- /dev/null
+++ b/pykd/boost.python/object/boost_python-src.object.function.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "function.cpp"
diff --git a/pykd/boost.python/object/boost_python-src.object.function_doc_signature.cpp b/pykd/boost.python/object/boost_python-src.object.function_doc_signature.cpp
new file mode 100644
index 0000000..86af1d5
--- /dev/null
+++ b/pykd/boost.python/object/boost_python-src.object.function_doc_signature.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "function_doc_signature.cpp"
diff --git a/pykd/boost.python/object/boost_python-src.object.inheritance.cpp b/pykd/boost.python/object/boost_python-src.object.inheritance.cpp
new file mode 100644
index 0000000..0725431
--- /dev/null
+++ b/pykd/boost.python/object/boost_python-src.object.inheritance.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "inheritance.cpp"
diff --git a/pykd/boost.python/object/boost_python-src.object.iterator.cpp b/pykd/boost.python/object/boost_python-src.object.iterator.cpp
new file mode 100644
index 0000000..9cfb3c2
--- /dev/null
+++ b/pykd/boost.python/object/boost_python-src.object.iterator.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "iterator.cpp"
diff --git a/pykd/boost.python/object/boost_python-src.object.life_support.cpp b/pykd/boost.python/object/boost_python-src.object.life_support.cpp
new file mode 100644
index 0000000..54d4422
--- /dev/null
+++ b/pykd/boost.python/object/boost_python-src.object.life_support.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "life_support.cpp"
diff --git a/pykd/boost.python/object/boost_python-src.object.pickle_support.cpp b/pykd/boost.python/object/boost_python-src.object.pickle_support.cpp
new file mode 100644
index 0000000..b3bc57a
--- /dev/null
+++ b/pykd/boost.python/object/boost_python-src.object.pickle_support.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "pickle_support.cpp"
diff --git a/pykd/boost.python/object/boost_python-src.object.stl_iterator.cpp b/pykd/boost.python/object/boost_python-src.object.stl_iterator.cpp
new file mode 100644
index 0000000..e27520e
--- /dev/null
+++ b/pykd/boost.python/object/boost_python-src.object.stl_iterator.cpp
@@ -0,0 +1,5 @@
+#define _SCL_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#pragma warning(disable: 4244 4503 4752 4800 4996)
+#define BOOST_PYTHON_SOURCE
+#include "stl_iterator.cpp"
diff --git a/pykd/boost.python/object/class.cpp b/pykd/boost.python/object/class.cpp
new file mode 100644
index 0000000..aeef688
--- /dev/null
+++ b/pykd/boost.python/object/class.cpp
@@ -0,0 +1,764 @@
+// Copyright David Abrahams 2001.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include
+#include // #including this first is an intel6 workaround
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace boost { namespace python {
+
+# ifdef BOOST_PYTHON_SELF_IS_CLASS
+namespace self_ns
+{
+ self_t self;
+}
+# endif
+
+instance_holder::instance_holder()
+ : m_next(0)
+{
+}
+
+instance_holder::~instance_holder()
+{
+}
+
+extern "C"
+{
+ // This is copied from typeobject.c in the Python sources. Even though
+ // class_metatype_object doesn't set Py_TPFLAGS_HAVE_GC, that bit gets
+ // filled in by the base class initialization process in
+ // PyType_Ready(). However, tp_is_gc is *not* copied from the base
+ // type, making it assume that classes are GC-able even if (like
+ // class_type_object) they're statically allocated.
+ static int
+ type_is_gc(PyTypeObject *python_type)
+ {
+ return python_type->tp_flags & Py_TPFLAGS_HEAPTYPE;
+ }
+
+ // This is also copied from the Python sources. We can't implement
+ // static_data as a subclass property effectively without it.
+ typedef struct {
+ PyObject_HEAD
+ PyObject *prop_get;
+ PyObject *prop_set;
+ PyObject *prop_del;
+ PyObject *prop_doc;
+ int getter_doc;
+ } propertyobject;
+
+ // Copied from Python source and removed the part for setting docstring,
+ // since we don't have a setter for __doc__ and trying to set it will
+ // cause the init fail.
+ static int property_init(PyObject *self, PyObject *args, PyObject *kwds)
+ {
+ PyObject *get = NULL, *set = NULL, *del = NULL, *doc = NULL;
+ static const char *kwlist[] = {"fget", "fset", "fdel", "doc", 0};
+ propertyobject *prop = (propertyobject *)self;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOOO:property",
+ const_cast(kwlist), &get, &set, &del, &doc))
+ return -1;
+
+ if (get == Py_None)
+ get = NULL;
+ if (set == Py_None)
+ set = NULL;
+ if (del == Py_None)
+ del = NULL;
+
+ Py_XINCREF(get);
+ Py_XINCREF(set);
+ Py_XINCREF(del);
+ Py_XINCREF(doc);
+
+ prop->prop_get = get;
+ prop->prop_set = set;
+ prop->prop_del = del;
+ prop->prop_doc = doc;
+ prop->getter_doc = 0;
+
+ return 0;
+ }
+
+
+ static PyObject *
+ static_data_descr_get(PyObject *self, PyObject * /*obj*/, PyObject * /*type*/)
+ {
+ propertyobject *gs = (propertyobject *)self;
+
+ return PyObject_CallFunction(gs->prop_get, const_cast("()"));
+ }
+
+ static int
+ static_data_descr_set(PyObject *self, PyObject * /*obj*/, PyObject *value)
+ {
+ propertyobject *gs = (propertyobject *)self;
+ PyObject *func, *res;
+
+ if (value == NULL)
+ func = gs->prop_del;
+ else
+ func = gs->prop_set;
+ if (func == NULL) {
+ PyErr_SetString(PyExc_AttributeError,
+ value == NULL ?
+ "can't delete attribute" :
+ "can't set attribute");
+ return -1;
+ }
+ if (value == NULL)
+ res = PyObject_CallFunction(func, const_cast("()"));
+ else
+ res = PyObject_CallFunction(func, const_cast("(O)"), value);
+ if (res == NULL)
+ return -1;
+ Py_DECREF(res);
+ return 0;
+ }
+}
+
+static PyTypeObject static_data_object = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ const_cast("Boost.Python.StaticProperty"),
+ sizeof(propertyobject),
+ 0,
+ 0, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_compare */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT // | Py_TPFLAGS_HAVE_GC
+ | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ 0, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ 0, //&PyProperty_Type, /* tp_base */
+ 0, /* tp_dict */
+ static_data_descr_get, /* tp_descr_get */
+ static_data_descr_set, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ property_init, /* tp_init */
+ 0, /* tp_alloc */
+ 0, // filled in with type_new /* tp_new */
+ 0, // filled in with __PyObject_GC_Del /* tp_free */
+ 0, /* tp_is_gc */
+ 0, /* tp_bases */
+ 0, /* tp_mro */
+ 0, /* tp_cache */
+ 0, /* tp_subclasses */
+ 0, /* tp_weaklist */
+#if PYTHON_API_VERSION >= 1012
+ 0 /* tp_del */
+#endif
+};
+
+namespace objects
+{
+#if PY_VERSION_HEX < 0x03000000
+ // XXX Not sure why this run into compiling error in Python 3
+ extern "C"
+ {
+ // This declaration needed due to broken Python 2.2 headers
+ extern DL_IMPORT(PyTypeObject) PyProperty_Type;
+ }
+#endif
+
+ BOOST_PYTHON_DECL PyObject* static_data()
+ {
+ if (static_data_object.tp_dict == 0)
+ {
+ Py_TYPE(&static_data_object) = &PyType_Type;
+ static_data_object.tp_base = &PyProperty_Type;
+ if (PyType_Ready(&static_data_object))
+ return 0;
+ }
+ return upcast(&static_data_object);
+ }
+}
+
+extern "C"
+{
+ // Ordinarily, descriptors have a certain assymetry: you can use
+ // them to read attributes off the class object they adorn, but
+ // writing the same attribute on the class object always replaces
+ // the descriptor in the class __dict__. In order to properly
+ // represent C++ static data members, we need to allow them to be
+ // written through the class instance. This function of the
+ // metaclass makes it possible.
+ static int
+ class_setattro(PyObject *obj, PyObject *name, PyObject* value)
+ {
+ // Must use "private" Python implementation detail
+ // _PyType_Lookup instead of PyObject_GetAttr because the
+ // latter will always end up calling the descr_get function on
+ // any descriptor it finds; we need the unadulterated
+ // descriptor here.
+ PyObject* a = _PyType_Lookup(downcast(obj), name);
+
+ // a is a borrowed reference or 0
+
+ // If we found a static data descriptor, call it directly to
+ // force it to set the static data member
+ if (a != 0 && PyObject_IsInstance(a, objects::static_data()))
+ return Py_TYPE(a)->tp_descr_set(a, obj, value);
+ else
+ return PyType_Type.tp_setattro(obj, name, value);
+ }
+}
+
+static PyTypeObject class_metatype_object = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ const_cast("Boost.Python.class"),
+ PyType_Type.tp_basicsize,
+ 0,
+ 0, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_compare */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ class_setattro, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT // | Py_TPFLAGS_HAVE_GC
+ | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ 0, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ 0, //&PyType_Type, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, // filled in with type_new /* tp_new */
+ 0, // filled in with __PyObject_GC_Del /* tp_free */
+ (inquiry)type_is_gc, /* tp_is_gc */
+ 0, /* tp_bases */
+ 0, /* tp_mro */
+ 0, /* tp_cache */
+ 0, /* tp_subclasses */
+ 0, /* tp_weaklist */
+#if PYTHON_API_VERSION >= 1012
+ 0 /* tp_del */
+#endif
+};
+
+// Install the instance data for a C++ object into a Python instance
+// object.
+void instance_holder::install(PyObject* self) throw()
+{
+ assert(PyType_IsSubtype(Py_TYPE(Py_TYPE(self)), &class_metatype_object));
+ m_next = ((objects::instance<>*)self)->objects;
+ ((objects::instance<>*)self)->objects = this;
+}
+
+
+namespace objects
+{
+// Get the metatype object for all extension classes.
+ BOOST_PYTHON_DECL type_handle class_metatype()
+ {
+ if (class_metatype_object.tp_dict == 0)
+ {
+ Py_TYPE(&class_metatype_object) = &PyType_Type;
+ class_metatype_object.tp_base = &PyType_Type;
+ if (PyType_Ready(&class_metatype_object))
+ return type_handle();
+ }
+ return type_handle(borrowed(&class_metatype_object));
+ }
+ extern "C"
+ {
+ static void instance_dealloc(PyObject* inst)
+ {
+ instance<>* kill_me = (instance<>*)inst;
+
+ for (instance_holder* p = kill_me->objects, *next; p != 0; p = next)
+ {
+ next = p->next();
+ p->~instance_holder();
+ instance_holder::deallocate(inst, dynamic_cast(p));
+ }
+
+ // Python 2.2.1 won't add weak references automatically when
+ // tp_itemsize > 0, so we need to manage that
+ // ourselves. Accordingly, we also have to clean up the
+ // weakrefs ourselves.
+ if (kill_me->weakrefs != NULL)
+ PyObject_ClearWeakRefs(inst);
+
+ Py_XDECREF(kill_me->dict);
+
+ Py_TYPE(inst)->tp_free(inst);
+ }
+
+ static PyObject *
+ instance_new(PyTypeObject* type_, PyObject* /*args*/, PyObject* /*kw*/)
+ {
+ // Attempt to find the __instance_size__ attribute. If not present, no problem.
+ PyObject* d = type_->tp_dict;
+ PyObject* instance_size_obj = PyObject_GetAttrString(d, const_cast("__instance_size__"));
+
+ ssize_t instance_size = instance_size_obj ?
+#if PY_VERSION_HEX >= 0x03000000
+ PyLong_AsSsize_t(instance_size_obj) : 0;
+#else
+ PyInt_AsLong(instance_size_obj) : 0;
+#endif
+
+ if (instance_size < 0)
+ instance_size = 0;
+
+ PyErr_Clear(); // Clear any errors that may have occurred.
+
+ instance<>* result = (instance<>*)type_->tp_alloc(type_, instance_size);
+ if (result)
+ {
+ // Guido says we can use ob_size for any purpose we
+ // like, so we'll store the total size of the object
+ // there. A negative number indicates that the extra
+ // instance memory is not yet allocated to any holders.
+#if PY_VERSION_HEX >= 0x02060000
+ Py_SIZE(result) =
+#else
+ result->ob_size =
+#endif
+ -(static_cast(offsetof(instance<>,storage) + instance_size));
+ }
+ return (PyObject*)result;
+ }
+
+ static PyObject* instance_get_dict(PyObject* op, void*)
+ {
+ instance<>* inst = downcast >(op);
+ if (inst->dict == 0)
+ inst->dict = PyDict_New();
+ return python::xincref(inst->dict);
+ }
+
+ static int instance_set_dict(PyObject* op, PyObject* dict, void*)
+ {
+ instance<>* inst = downcast >(op);
+ python::xdecref(inst->dict);
+ inst->dict = python::incref(dict);
+ return 0;
+ }
+
+ }
+
+
+ static PyGetSetDef instance_getsets[] = {
+ {const_cast("__dict__"), instance_get_dict, instance_set_dict, NULL, 0},
+ {0, 0, 0, 0, 0}
+ };
+
+
+ static PyMemberDef instance_members[] = {
+ {const_cast("__weakref__"), T_OBJECT, offsetof(instance<>, weakrefs), 0, 0},
+ {0, 0, 0, 0, 0}
+ };
+
+ static PyTypeObject class_type_object = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ const_cast("Boost.Python.instance"),
+ offsetof(instance<>,storage), /* tp_basicsize */
+ 1, /* tp_itemsize */
+ instance_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_compare */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT // | Py_TPFLAGS_HAVE_GC
+ | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ offsetof(instance<>,weakrefs), /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ 0, /* tp_methods */
+ instance_members, /* tp_members */
+ instance_getsets, /* tp_getset */
+ 0, //&PyBaseObject_Type, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ offsetof(instance<>,dict), /* tp_dictoffset */
+ 0, /* tp_init */
+ PyType_GenericAlloc, /* tp_alloc */
+ instance_new, /* tp_new */
+ 0, /* tp_free */
+ 0, /* tp_is_gc */
+ 0, /* tp_bases */
+ 0, /* tp_mro */
+ 0, /* tp_cache */
+ 0, /* tp_subclasses */
+ 0, /* tp_weaklist */
+#if PYTHON_API_VERSION >= 1012
+ 0 /* tp_del */
+#endif
+ };
+
+ BOOST_PYTHON_DECL type_handle class_type()
+ {
+ if (class_type_object.tp_dict == 0)
+ {
+ Py_TYPE(&class_type_object) = incref(class_metatype().get());
+ class_type_object.tp_base = &PyBaseObject_Type;
+ if (PyType_Ready(&class_type_object))
+ return type_handle();
+// class_type_object.tp_setattro = class_setattro;
+ }
+ return type_handle(borrowed(&class_type_object));
+ }
+
+ BOOST_PYTHON_DECL void*
+ find_instance_impl(PyObject* inst, type_info type, bool null_shared_ptr_only)
+ {
+ if (!Py_TYPE(Py_TYPE(inst)) ||
+ !PyType_IsSubtype(Py_TYPE(Py_TYPE(inst)), &class_metatype_object))
+ return 0;
+
+ instance<>* self = reinterpret_cast*>(inst);
+
+ for (instance_holder* match = self->objects; match != 0; match = match->next())
+ {
+ void* const found = match->holds(type, null_shared_ptr_only);
+ if (found)
+ return found;
+ }
+ return 0;
+ }
+
+ object module_prefix()
+ {
+ return object(
+ PyObject_IsInstance(scope().ptr(), upcast(&PyModule_Type))
+ ? object(scope().attr("__name__"))
+ : api::getattr(scope(), "__module__", str())
+ );
+ }
+
+ namespace
+ {
+ // Find a registered class object corresponding to id. Return a
+ // null handle if no such class is registered.
+ inline type_handle query_class(type_info id)
+ {
+ converter::registration const* p = converter::registry::query(id);
+ return type_handle(
+ python::borrowed(
+ python::allow_null(p ? p->m_class_object : 0))
+ );
+ }
+
+ // Find a registered class corresponding to id. If not found,
+ // throw an appropriate exception.
+ type_handle get_class(type_info id)
+ {
+ type_handle result(query_class(id));
+
+ if (result.get() == 0)
+ {
+ object report("extension class wrapper for base class ");
+ report = report + id.name() + " has not been created yet";
+ PyErr_SetObject(PyExc_RuntimeError, report.ptr());
+ throw_error_already_set();
+ }
+ return result;
+ }
+
+ // class_base constructor
+ //
+ // name - the name of the new Python class
+ //
+ // num_types - one more than the number of declared bases
+ //
+ // types - array of python::type_info, the first item
+ // corresponding to the class being created, and the
+ // rest corresponding to its declared bases.
+ //
+ inline object
+ new_class(char const* name, std::size_t num_types, type_info const* const types, char const* doc)
+ {
+ assert(num_types >= 1);
+
+ // Build a tuple of the base Python type objects. If no bases
+ // were declared, we'll use our class_type() as the single base
+ // class.
+ ssize_t const num_bases = (std::max)(num_types - 1, static_cast(1));
+ handle<> bases(PyTuple_New(num_bases));
+
+ for (ssize_t i = 1; i <= num_bases; ++i)
+ {
+ type_handle c = (i >= static_cast(num_types)) ? class_type() : get_class(types[i]);
+ // PyTuple_SET_ITEM steals this reference
+ PyTuple_SET_ITEM(bases.get(), static_cast(i - 1), upcast(c.release()));
+ }
+
+ // Call the class metatype to create a new class
+ dict d;
+
+ object m = module_prefix();
+ if (m) d["__module__"] = m;
+
+ if (doc != 0)
+ d["__doc__"] = doc;
+
+ object result = object(class_metatype())(name, bases, d);
+ assert(PyType_IsSubtype(Py_TYPE(result.ptr()), &PyType_Type));
+
+ if (scope().ptr() != Py_None)
+ scope().attr(name) = result;
+
+ // For pickle. Will lead to informative error messages if pickling
+ // is not enabled.
+ result.attr("__reduce__") = object(make_instance_reduce_function());
+
+ return result;
+ }
+ }
+
+ class_base::class_base(
+ char const* name, std::size_t num_types, type_info const* const types, char const* doc)
+ : object(new_class(name, num_types, types, doc))
+ {
+ // Insert the new class object in the registry
+ converter::registration& converters = const_cast(
+ converter::registry::lookup(types[0]));
+
+ // Class object is leaked, for now
+ converters.m_class_object = (PyTypeObject*)incref(this->ptr());
+ }
+
+ BOOST_PYTHON_DECL void copy_class_object(type_info const& src, type_info const& dst)
+ {
+ converter::registration& dst_converters
+ = const_cast(converter::registry::lookup(dst));
+
+ converter::registration const& src_converters = converter::registry::lookup(src);
+
+ dst_converters.m_class_object = src_converters.m_class_object;
+ }
+
+ void class_base::set_instance_size(std::size_t instance_size)
+ {
+ this->attr("__instance_size__") = instance_size;
+ }
+
+ void class_base::add_property(
+ char const* name, object const& fget, char const* docstr)
+ {
+ object property(
+ (python::detail::new_reference)
+ PyObject_CallFunction((PyObject*)&PyProperty_Type, const_cast("Osss"), fget.ptr(), 0, 0, docstr));
+
+ this->setattr(name, property);
+ }
+
+ void class_base::add_property(
+ char const* name, object const& fget, object const& fset, char const* docstr)
+ {
+ object property(
+ (python::detail::new_reference)
+ PyObject_CallFunction((PyObject*)&PyProperty_Type, const_cast("OOss"), fget.ptr(), fset.ptr(), 0, docstr));
+
+ this->setattr(name, property);
+ }
+
+ void class_base::add_static_property(char const* name, object const& fget)
+ {
+ object property(
+ (python::detail::new_reference)
+ PyObject_CallFunction(static_data(), const_cast("O"), fget.ptr())
+ );
+
+ this->setattr(name, property);
+ }
+
+ void class_base::add_static_property(char const* name, object const& fget, object const& fset)
+ {
+ object property(
+ (python::detail::new_reference)
+ PyObject_CallFunction(static_data(), const_cast("OO"), fget.ptr(), fset.ptr()));
+
+ this->setattr(name, property);
+ }
+
+ void class_base::setattr(char const* name, object const& x)
+ {
+ if (PyObject_SetAttrString(this->ptr(), const_cast(name), x.ptr()) < 0)
+ throw_error_already_set();
+ }
+
+ namespace
+ {
+ extern "C" PyObject* no_init(PyObject*, PyObject*)
+ {
+ ::PyErr_SetString(::PyExc_RuntimeError, const_cast("This class cannot be instantiated from Python"));
+ return NULL;
+ }
+ static ::PyMethodDef no_init_def = {
+ const_cast("__init__"), no_init, METH_VARARGS,
+ const_cast("Raises an exception\n"
+ "This class cannot be instantiated from Python\n")
+ };
+ }
+
+ void class_base::def_no_init()
+ {
+ handle<> f(::PyCFunction_New(&no_init_def, 0));
+ this->setattr("__init__", object(f));
+ }
+
+ void class_base::enable_pickling_(bool getstate_manages_dict)
+ {
+ setattr("__safe_for_unpickling__", object(true));
+
+ if (getstate_manages_dict)
+ {
+ setattr("__getstate_manages_dict__", object(true));
+ }
+ }
+
+ namespace
+ {
+ PyObject* callable_check(PyObject* callable)
+ {
+ if (PyCallable_Check(expect_non_null(callable)))
+ return callable;
+
+ ::PyErr_Format(
+ PyExc_TypeError
+ , const_cast("staticmethod expects callable object; got an object of type %s, which is not callable")
+ , Py_TYPE(callable)->tp_name
+ );
+
+ throw_error_already_set();
+ return 0;
+ }
+ }
+
+ void class_base::make_method_static(const char * method_name)
+ {
+ PyTypeObject* self = downcast(this->ptr());
+ dict d((handle<>(borrowed(self->tp_dict))));
+
+ object method(d[method_name]);
+
+ this->attr(method_name) = object(
+ handle<>(
+ PyStaticMethod_New((callable_check)(method.ptr()) )
+ ));
+ }
+
+ BOOST_PYTHON_DECL type_handle registered_class_object(type_info id)
+ {
+ return query_class(id);
+ }
+} // namespace objects
+
+
+void* instance_holder::allocate(PyObject* self_, std::size_t holder_offset, std::size_t holder_size)
+{
+ assert(PyType_IsSubtype(Py_TYPE(Py_TYPE(self_)), &class_metatype_object));
+ objects::instance<>* self = (objects::instance<>*)self_;
+
+ int total_size_needed = holder_offset + holder_size;
+
+ if (-Py_SIZE(self) >= total_size_needed)
+ {
+ // holder_offset should at least point into the variable-sized part
+ assert(holder_offset >= offsetof(objects::instance<>,storage));
+
+ // Record the fact that the storage is occupied, noting where it starts
+ Py_SIZE(self) = holder_offset;
+ return (char*)self + holder_offset;
+ }
+ else
+ {
+ void* const result = PyMem_Malloc(holder_size);
+ if (result == 0)
+ throw std::bad_alloc();
+ return result;
+ }
+}
+
+void instance_holder::deallocate(PyObject* self_, void* storage) throw()
+{
+ assert(PyType_IsSubtype(Py_TYPE(Py_TYPE(self_)), &class_metatype_object));
+ objects::instance<>* self = (objects::instance<>*)self_;
+ if (storage != (char*)self + Py_SIZE(self))
+ {
+ PyMem_Free(storage);
+ }
+}
+
+}} // namespace boost::python
diff --git a/pykd/boost.python/object/enum.cpp b/pykd/boost.python/object/enum.cpp
new file mode 100644
index 0000000..10122ad
--- /dev/null
+++ b/pykd/boost.python/object/enum.cpp
@@ -0,0 +1,252 @@
+// Copyright David Abrahams 2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace boost { namespace python { namespace objects {
+
+struct enum_object
+{
+#if PY_VERSION_HEX >= 0x03000000
+ PyLongObject base_object;
+#else
+ PyIntObject base_object;
+#endif
+ PyObject* name;
+};
+
+static PyMemberDef enum_members[] = {
+ {const_cast("name"), T_OBJECT_EX, offsetof(enum_object,name),READONLY, 0},
+ {0, 0, 0, 0, 0}
+};
+
+
+extern "C"
+{
+ static void
+ enum_dealloc(enum_object* self)
+ {
+ Py_XDECREF(self->name);
+ Py_TYPE(self)->tp_free((PyObject*)self);
+ }
+
+ static PyObject* enum_repr(PyObject* self_)
+ {
+ PyObject *mod = PyObject_GetAttrString( self_, "__module__");
+ object auto_free = object(handle<>(mod));
+ enum_object* self = downcast(self_);
+ if (!self->name)
+ {
+ return
+#if PY_VERSION_HEX >= 0x03000000
+ PyUnicode_FromFormat("%S.%s(%ld)", mod, self_->ob_type->tp_name, PyLong_AsLong(self_));
+#else
+ PyString_FromFormat("%s.%s(%ld)", PyString_AsString(mod), self_->ob_type->tp_name, PyInt_AS_LONG(self_));
+#endif
+ }
+ else
+ {
+ PyObject* name = self->name;
+ if (name == 0)
+ return 0;
+
+ return
+#if PY_VERSION_HEX >= 0x03000000
+ PyUnicode_FromFormat("%S.%s.%S", mod, self_->ob_type->tp_name, name);
+#else
+ PyString_FromFormat("%s.%s.%s",
+ PyString_AsString(mod), self_->ob_type->tp_name, PyString_AsString(name));
+#endif
+ }
+ }
+
+ static PyObject* enum_str(PyObject* self_)
+ {
+ enum_object* self = downcast(self_);
+ if (!self->name)
+ {
+#if PY_VERSION_HEX >= 0x03000000
+ return PyLong_Type.tp_str(self_);
+#else
+ return PyInt_Type.tp_str(self_);
+#endif
+ }
+ else
+ {
+ return incref(self->name);
+ }
+ }
+}
+
+static PyTypeObject enum_type_object = {
+ PyVarObject_HEAD_INIT(NULL, 0) // &PyType_Type
+ const_cast("Boost.Python.enum"),
+ sizeof(enum_object), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor) enum_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_compare */
+ enum_repr, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ enum_str, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT
+#if PY_VERSION_HEX < 0x03000000
+ | Py_TPFLAGS_CHECKTYPES
+#endif
+ | Py_TPFLAGS_HAVE_GC
+ | Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ 0, /* tp_methods */
+ enum_members, /* tp_members */
+ 0, /* tp_getset */
+ 0, //&PyInt_Type, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, /* tp_new */
+ 0, /* tp_free */
+ 0, /* tp_is_gc */
+ 0, /* tp_bases */
+ 0, /* tp_mro */
+ 0, /* tp_cache */
+ 0, /* tp_subclasses */
+ 0, /* tp_weaklist */
+#if PYTHON_API_VERSION >= 1012
+ 0 /* tp_del */
+#endif
+};
+
+object module_prefix();
+
+namespace
+{
+ object new_enum_type(char const* name, char const *doc)
+ {
+ if (enum_type_object.tp_dict == 0)
+ {
+ Py_TYPE(&enum_type_object) = incref(&PyType_Type);
+#if PY_VERSION_HEX >= 0x03000000
+ enum_type_object.tp_base = &PyLong_Type;
+#else
+ enum_type_object.tp_base = &PyInt_Type;
+#endif
+ if (PyType_Ready(&enum_type_object))
+ throw_error_already_set();
+ }
+
+ type_handle metatype(borrowed(&PyType_Type));
+ type_handle base(borrowed(&enum_type_object));
+
+ // suppress the instance __dict__ in these enum objects. There
+ // may be a slicker way, but this'll do for now.
+ dict d;
+ d["__slots__"] = tuple();
+ d["values"] = dict();
+ d["names"] = dict();
+
+ object module_name = module_prefix();
+ if (module_name)
+ d["__module__"] = module_name;
+ if (doc)
+ d["__doc__"] = doc;
+
+ object result = (object(metatype))(name, make_tuple(base), d);
+
+ scope().attr(name) = result;
+
+ return result;
+ }
+}
+
+enum_base::enum_base(
+ char const* name
+ , converter::to_python_function_t to_python
+ , converter::convertible_function convertible
+ , converter::constructor_function construct
+ , type_info id
+ , char const *doc
+ )
+ : object(new_enum_type(name, doc))
+{
+ converter::registration& converters
+ = const_cast(
+ converter::registry::lookup(id));
+
+ converters.m_class_object = downcast(this->ptr());
+ converter::registry::insert(to_python, id);
+ converter::registry::insert(convertible, construct, id);
+}
+
+void enum_base::add_value(char const* name_, long value)
+{
+ // Convert name to Python string
+ object name(name_);
+
+ // Create a new enum instance by calling the class with a value
+ object x = (*this)(value);
+
+ // Store the object in the enum class
+ (*this).attr(name_) = x;
+
+ dict d = extract(this->attr("values"))();
+ d[value] = x;
+
+ // Set the name field in the new enum instanec
+ enum_object* p = downcast(x.ptr());
+ Py_XDECREF(p->name);
+ p->name = incref(name.ptr());
+
+ dict names_dict = extract(this->attr("names"))();
+ names_dict[x.attr("name")] = x;
+}
+
+void enum_base::export_values()
+{
+ dict d = extract(this->attr("names"))();
+ list items = d.items();
+ scope current;
+
+ for (unsigned i = 0, max = len(items); i < max; ++i)
+ api::setattr(current, items[i][0], items[i][1]);
+ }
+
+PyObject* enum_base::to_python(PyTypeObject* type_, long x)
+{
+ object type((type_handle(borrowed(type_))));
+
+ dict d = extract(type.attr("values"))();
+ object v = d.get(x, object());
+ return incref(
+ (v == object() ? type(x) : v).ptr());
+}
+
+}}} // namespace boost::python::object
diff --git a/pykd/boost.python/object/function.cpp b/pykd/boost.python/object/function.cpp
new file mode 100644
index 0000000..5c59cc7
--- /dev/null
+++ b/pykd/boost.python/object/function.cpp
@@ -0,0 +1,793 @@
+// Copyright David Abrahams 2001.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+#include
+
+#include
+#include
+
+#if BOOST_PYTHON_DEBUG_ERROR_MESSAGES
+# include
+#endif
+
+namespace boost { namespace python {
+ volatile bool docstring_options::show_user_defined_ = true;
+ volatile bool docstring_options::show_cpp_signatures_ = true;
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ volatile bool docstring_options::show_py_signatures_ = true;
+#else
+ volatile bool docstring_options::show_py_signatures_ = false;
+#endif
+}}
+
+namespace boost { namespace python { namespace objects {
+
+py_function_impl_base::~py_function_impl_base()
+{
+}
+
+unsigned py_function_impl_base::max_arity() const
+{
+ return this->min_arity();
+}
+
+extern PyTypeObject function_type;
+
+function::function(
+ py_function const& implementation
+#if BOOST_WORKAROUND(__EDG_VERSION__, == 245)
+ , python::detail::keyword const* names_and_defaults
+#else
+ , python::detail::keyword const* const names_and_defaults
+#endif
+ , unsigned num_keywords
+ )
+ : m_fn(implementation)
+ , m_nkeyword_values(0)
+{
+ if (names_and_defaults != 0)
+ {
+ unsigned int max_arity = m_fn.max_arity();
+ unsigned int keyword_offset
+ = max_arity > num_keywords ? max_arity - num_keywords : 0;
+
+
+ ssize_t tuple_size = num_keywords ? max_arity : 0;
+ m_arg_names = object(handle<>(PyTuple_New(tuple_size)));
+
+ if (num_keywords != 0)
+ {
+ for (unsigned j = 0; j < keyword_offset; ++j)
+ PyTuple_SET_ITEM(m_arg_names.ptr(), j, incref(Py_None));
+ }
+
+ for (unsigned i = 0; i < num_keywords; ++i)
+ {
+ tuple kv;
+
+ python::detail::keyword const* const p = names_and_defaults + i;
+ if (p->default_value)
+ {
+ kv = make_tuple(p->name, p->default_value);
+ ++m_nkeyword_values;
+ }
+ else
+ {
+ kv = make_tuple(p->name);
+ }
+
+ PyTuple_SET_ITEM(
+ m_arg_names.ptr()
+ , i + keyword_offset
+ , incref(kv.ptr())
+ );
+ }
+ }
+
+ PyObject* p = this;
+ if (Py_TYPE(&function_type) == 0)
+ {
+ Py_TYPE(&function_type) = &PyType_Type;
+ ::PyType_Ready(&function_type);
+ }
+
+ (void)( // warning suppression for GCC
+ PyObject_INIT(p, &function_type)
+ );
+}
+
+function::~function()
+{
+}
+
+PyObject* function::call(PyObject* args, PyObject* keywords) const
+{
+ std::size_t n_unnamed_actual = PyTuple_GET_SIZE(args);
+ std::size_t n_keyword_actual = keywords ? PyDict_Size(keywords) : 0;
+ std::size_t n_actual = n_unnamed_actual + n_keyword_actual;
+
+ function const* f = this;
+
+ // Try overloads looking for a match
+ do
+ {
+ // Check for a plausible number of arguments
+ unsigned min_arity = f->m_fn.min_arity();
+ unsigned max_arity = f->m_fn.max_arity();
+
+ if (n_actual + f->m_nkeyword_values >= min_arity
+ && n_actual <= max_arity)
+ {
+ // This will be the args that actually get passed
+ handle<>inner_args(allow_null(borrowed(args)));
+
+ if (n_keyword_actual > 0 // Keyword arguments were supplied
+ || n_actual < min_arity) // or default keyword values are needed
+ {
+ if (f->m_arg_names.is_none())
+ {
+ // this overload doesn't accept keywords
+ inner_args = handle<>();
+ }
+ else
+ {
+ // "all keywords are none" is a special case
+ // indicating we will accept any number of keyword
+ // arguments
+ if (PyTuple_Size(f->m_arg_names.ptr()) == 0)
+ {
+ // no argument preprocessing
+ }
+ else if (n_actual > max_arity)
+ {
+ // too many arguments
+ inner_args = handle<>();
+ }
+ else
+ {
+ // build a new arg tuple, will adjust its size later
+ assert(max_arity <= static_cast(ssize_t_max));
+ inner_args = handle<>(
+ PyTuple_New(static_cast(max_arity)));
+
+ // Fill in the positional arguments
+ for (std::size_t i = 0; i < n_unnamed_actual; ++i)
+ PyTuple_SET_ITEM(inner_args.get(), i, incref(PyTuple_GET_ITEM(args, i)));
+
+ // Grab remaining arguments by name from the keyword dictionary
+ std::size_t n_actual_processed = n_unnamed_actual;
+
+ for (std::size_t arg_pos = n_unnamed_actual; arg_pos < max_arity ; ++arg_pos)
+ {
+ // Get the keyword[, value pair] corresponding
+ PyObject* kv = PyTuple_GET_ITEM(f->m_arg_names.ptr(), arg_pos);
+
+ // If there were any keyword arguments,
+ // look up the one we need for this
+ // argument position
+ PyObject* value = n_keyword_actual
+ ? PyDict_GetItem(keywords, PyTuple_GET_ITEM(kv, 0))
+ : 0;
+
+ if (!value)
+ {
+ // Not found; check if there's a default value
+ if (PyTuple_GET_SIZE(kv) > 1)
+ value = PyTuple_GET_ITEM(kv, 1);
+
+ if (!value)
+ {
+ // still not found; matching fails
+ PyErr_Clear();
+ inner_args = handle<>();
+ break;
+ }
+ }
+ else
+ {
+ ++n_actual_processed;
+ }
+
+ PyTuple_SET_ITEM(inner_args.get(), arg_pos, incref(value));
+ }
+
+ if (inner_args.get())
+ {
+ //check if we proccessed all the arguments
+ if(n_actual_processed < n_actual)
+ inner_args = handle<>();
+ }
+ }
+ }
+ }
+
+ // Call the function. Pass keywords in case it's a
+ // function accepting any number of keywords
+ PyObject* result = inner_args ? f->m_fn(inner_args.get(), keywords) : 0;
+
+ // If the result is NULL but no error was set, m_fn failed
+ // the argument-matching test.
+
+ // This assumes that all other error-reporters are
+ // well-behaved and never return NULL to python without
+ // setting an error.
+ if (result != 0 || PyErr_Occurred())
+ return result;
+ }
+ f = f->m_overloads.get();
+ }
+ while (f);
+ // None of the overloads matched; time to generate the error message
+ argument_error(args, keywords);
+ return 0;
+}
+
+object function::signature(bool show_return_type) const
+{
+ py_function const& impl = m_fn;
+
+ python::detail::signature_element const* return_type = impl.signature();
+ python::detail::signature_element const* s = return_type + 1;
+
+ list formal_params;
+ if (impl.max_arity() == 0)
+ formal_params.append("void");
+
+ for (unsigned n = 0; n < impl.max_arity(); ++n)
+ {
+ if (s[n].basename == 0)
+ {
+ formal_params.append("...");
+ break;
+ }
+
+ str param(s[n].basename);
+ if (s[n].lvalue)
+ param += " {lvalue}";
+
+ if (m_arg_names) // None or empty tuple will test false
+ {
+ object kv(m_arg_names[n]);
+ if (kv)
+ {
+ char const* const fmt = len(kv) > 1 ? " %s=%r" : " %s";
+ param += fmt % kv;
+ }
+ }
+
+ formal_params.append(param);
+ }
+
+ if (show_return_type)
+ return "%s(%s) -> %s" % make_tuple(
+ m_name, str(", ").join(formal_params), return_type->basename);
+ return "%s(%s)" % make_tuple(
+ m_name, str(", ").join(formal_params));
+}
+
+object function::signatures(bool show_return_type) const
+{
+ list result;
+ for (function const* f = this; f; f = f->m_overloads.get()) {
+ result.append(f->signature(show_return_type));
+ }
+ return result;
+}
+
+void function::argument_error(PyObject* args, PyObject* /*keywords*/) const
+{
+ static handle<> exception(
+ PyErr_NewException(const_cast("Boost.Python.ArgumentError"), PyExc_TypeError, 0));
+
+ object message = "Python argument types in\n %s.%s("
+ % make_tuple(this->m_namespace, this->m_name);
+
+ list actual_args;
+ for (ssize_t i = 0; i < PyTuple_Size(args); ++i)
+ {
+ char const* name = PyTuple_GetItem(args, i)->ob_type->tp_name;
+ actual_args.append(str(name));
+ }
+ message += str(", ").join(actual_args);
+ message += ")\ndid not match C++ signature:\n ";
+ message += str("\n ").join(signatures());
+
+#if BOOST_PYTHON_DEBUG_ERROR_MESSAGES
+ std::printf("\n--------\n%s\n--------\n", extract(message)());
+#endif
+ PyErr_SetObject(exception.get(), message.ptr());
+ throw_error_already_set();
+}
+
+void function::add_overload(handle const& overload_)
+{
+ function* parent = this;
+
+ while (parent->m_overloads)
+ parent = parent->m_overloads.get();
+
+ parent->m_overloads = overload_;
+
+ // If we have no documentation, get the docs from the overload
+ if (!m_doc)
+ m_doc = overload_->m_doc;
+}
+
+namespace
+{
+ char const* const binary_operator_names[] =
+ {
+ "add__",
+ "and__",
+ "div__",
+ "divmod__",
+ "eq__",
+ "floordiv__",
+ "ge__",
+ "gt__",
+ "le__",
+ "lshift__",
+ "lt__",
+ "mod__",
+ "mul__",
+ "ne__",
+ "or__",
+ "pow__",
+ "radd__",
+ "rand__",
+ "rdiv__",
+ "rdivmod__",
+ "rfloordiv__",
+ "rlshift__",
+ "rmod__",
+ "rmul__",
+ "ror__",
+ "rpow__",
+ "rrshift__",
+ "rshift__",
+ "rsub__",
+ "rtruediv__",
+ "rxor__",
+ "sub__",
+ "truediv__",
+ "xor__"
+ };
+
+ struct less_cstring
+ {
+ bool operator()(char const* x, char const* y) const
+ {
+ return BOOST_CSTD_::strcmp(x,y) < 0;
+ }
+ };
+
+ inline bool is_binary_operator(char const* name)
+ {
+ return name[0] == '_'
+ && name[1] == '_'
+ && std::binary_search(
+ &binary_operator_names[0]
+ , binary_operator_names + sizeof(binary_operator_names)/sizeof(*binary_operator_names)
+ , name + 2
+ , less_cstring()
+ );
+ }
+
+ // Something for the end of the chain of binary operators
+ PyObject* not_implemented(PyObject*, PyObject*)
+ {
+ Py_INCREF(Py_NotImplemented);
+ return Py_NotImplemented;
+ }
+
+ handle not_implemented_function()
+ {
+
+ static object keeper(
+ function_object(
+ py_function(¬_implemented, mpl::vector1(), 2)
+ , python::detail::keyword_range())
+ );
+ return handle(borrowed(downcast(keeper.ptr())));
+ }
+}
+
+void function::add_to_namespace(
+ object const& name_space, char const* name_, object const& attribute)
+{
+ add_to_namespace(name_space, name_, attribute, 0);
+}
+
+namespace detail
+{
+ extern char py_signature_tag[];
+ extern char cpp_signature_tag[];
+}
+
+void function::add_to_namespace(
+ object const& name_space, char const* name_, object const& attribute, char const* doc)
+{
+ str const name(name_);
+ PyObject* const ns = name_space.ptr();
+
+ if (attribute.ptr()->ob_type == &function_type)
+ {
+ function* new_func = downcast(attribute.ptr());
+ handle<> dict;
+
+#if PY_VERSION_HEX < 0x03000000
+ // Old-style class gone in Python 3
+ if (PyClass_Check(ns))
+ dict = handle<>(borrowed(((PyClassObject*)ns)->cl_dict));
+ else
+#endif
+ if (PyType_Check(ns))
+ dict = handle<>(borrowed(((PyTypeObject*)ns)->tp_dict));
+ else
+ dict = handle<>(PyObject_GetAttrString(ns, const_cast("__dict__")));
+
+ if (dict == 0)
+ throw_error_already_set();
+
+ handle<> existing(allow_null(::PyObject_GetItem(dict.get(), name.ptr())));
+
+ if (existing)
+ {
+ if (existing->ob_type == &function_type)
+ {
+ new_func->add_overload(
+ handle(
+ borrowed(
+ downcast(existing.get())
+ )
+ )
+ );
+ }
+ else if (existing->ob_type == &PyStaticMethod_Type)
+ {
+ char const* name_space_name = extract(name_space.attr("__name__"));
+
+ ::PyErr_Format(
+ PyExc_RuntimeError
+ , "Boost.Python - All overloads must be exported "
+ "before calling \'class_<...>(\"%s\").staticmethod(\"%s\")\'"
+ , name_space_name
+ , name_
+ );
+ throw_error_already_set();
+ }
+ }
+ else if (is_binary_operator(name_))
+ {
+ // Binary operators need an additional overload which
+ // returns NotImplemented, so that Python will try the
+ // __rxxx__ functions on the other operand. We add this
+ // when no overloads for the operator already exist.
+ new_func->add_overload(not_implemented_function());
+ }
+
+ // A function is named the first time it is added to a namespace.
+ if (new_func->name().is_none())
+ new_func->m_name = name;
+
+ handle<> name_space_name(
+ allow_null(::PyObject_GetAttrString(name_space.ptr(), const_cast("__name__"))));
+
+ if (name_space_name)
+ new_func->m_namespace = object(name_space_name);
+ }
+
+ // The PyObject_GetAttrString() or PyObject_GetItem calls above may
+ // have left an active error
+ PyErr_Clear();
+ if (PyObject_SetAttr(ns, name.ptr(), attribute.ptr()) < 0)
+ throw_error_already_set();
+
+ object mutable_attribute(attribute);
+/*
+ if (doc != 0 && docstring_options::show_user_defined_)
+ {
+ // Accumulate documentation
+
+ if (
+ PyObject_HasAttrString(mutable_attribute.ptr(), "__doc__")
+ && mutable_attribute.attr("__doc__"))
+ {
+ mutable_attribute.attr("__doc__") += "\n\n";
+ mutable_attribute.attr("__doc__") += doc;
+ }
+ else {
+ mutable_attribute.attr("__doc__") = doc;
+ }
+ }
+
+ if (docstring_options::show_signatures_)
+ {
+ if ( PyObject_HasAttrString(mutable_attribute.ptr(), "__doc__")
+ && mutable_attribute.attr("__doc__")) {
+ mutable_attribute.attr("__doc__") += (
+ mutable_attribute.attr("__doc__")[-1] != "\n" ? "\n\n" : "\n");
+ }
+ else {
+ mutable_attribute.attr("__doc__") = "";
+ }
+ function* f = downcast(attribute.ptr());
+ mutable_attribute.attr("__doc__") += str("\n ").join(make_tuple(
+ "C++ signature:", f->signature(true)));
+ }
+ */
+ str _doc;
+
+ if (docstring_options::show_py_signatures_)
+ {
+ _doc += str(const_cast(detail::py_signature_tag));
+ }
+ if (doc != 0 && docstring_options::show_user_defined_)
+ _doc += doc;
+
+ if (docstring_options::show_cpp_signatures_)
+ {
+ _doc += str(const_cast