Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

Commit

Permalink
VS 2019 compatibility fixes (#52)
Browse files Browse the repository at this point in the history
* Split out Options, simplify KeyBinds

* Split out everything

* More cleaning

* Move dynamic imports to init

* Fix const char errors

* Update all python scripts

* Remove extra file
  • Loading branch information
Matt-Hurd authored Jun 15, 2019
1 parent 20b7dc4 commit 6f5d41a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions PythonSDK.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>PythonSDK</TargetName>
<TargetName>ddraw</TargetName>
<PreBuildEventUseInBuild>false</PreBuildEventUseInBuild>
<IncludePath>$(PYTHONPATH)\include;$(IncludePath);$(VC_SourcePath)\src\include;</IncludePath>
<LibraryPath>$(PYTHONPATH)\libs;$(LibraryPath)</LibraryPath>
<OutDir>C:\Program Files (x86)\Steam\steamapps\common\Borderlands 2\Binaries\Win32\Plugins\</OutDir>
<OutDir>C:\Program Files (x86)\Steam\steamapps\common\Borderlands 2\Binaries\Win32\</OutDir>
<IntDir>build\$(Configuration)\</IntDir>
<SourcePath>$(VC_SourcePath)\src;</SourcePath>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/CPythonInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bool VerifyPythonFunction(py::object funcHook, const char** expectedKeys) {
}
for (int x = 0; x < PyList_GET_SIZE(Keys) - 1; x++) {
PyObject *Key = PyList_GET_ITEM(Keys, x);
char *KeyString = PyUnicode_AsUTF8AndSize(Key, 0);
const char *KeyString = PyUnicode_AsUTF8AndSize(Key, 0);
if (strcmp(KeyString, expectedKeys[x]))
{
Logging::LogF("[Error] Got unexpected argument '%s'. Expected '%s'.\n", KeyString, expectedKeys[x]);
Expand Down
6 changes: 3 additions & 3 deletions src/include/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ namespace pybind11 {
if (!isinstance<sequence>(src))
return false;
PyObject *source = src.ptr();
char *tmp = PyUnicode_AsUTF8AndSize(source, nullptr);
const char *tmp = PyUnicode_AsUTF8AndSize(source, nullptr);
if (!tmp)
return false;
value = FString(tmp);
Expand All @@ -346,7 +346,7 @@ namespace pybind11 {
if (!isinstance<sequence>(src))
return false;
PyObject *source = src.ptr();
char *tmp = PyUnicode_AsUTF8AndSize(source, nullptr);
const char *tmp = PyUnicode_AsUTF8AndSize(source, nullptr);
if (!tmp)
return false;
value = UObject::FindClass(tmp, false);
Expand All @@ -369,7 +369,7 @@ namespace pybind11 {
if (!isinstance<sequence>(src))
return false;
PyObject *source = src.ptr();
char *tmp = PyUnicode_AsUTF8AndSize(source, nullptr);
const char *tmp = PyUnicode_AsUTF8AndSize(source, nullptr);
if (!tmp)
return false;
value = FName(tmp);
Expand Down

0 comments on commit 6f5d41a

Please sign in to comment.