Browse Source

Turn std::strings into char* before doing PyObject_CallMethod with them

working_subtitles
ZarothYe 3 years ago committed by rarified
parent
commit
3360ac478e
  1. 2
      Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp

2
Sources/Plasma/FeatureLib/pfPython/plPythonFileMod.cpp

@ -2792,7 +2792,7 @@ hsBool plPythonFileMod::MsgReceive(plMessage* msg)
plProfile_BeginTiming(PythonUpdate); plProfile_BeginTiming(PythonUpdate);
PyObject* retVal = PyObject_CallMethod( PyObject* retVal = PyObject_CallMethod(
fPyFunctionInstances[kfunc_OnSubtitleMsg], fFunctionNames[kfunc_OnSubtitleMsg], fPyFunctionInstances[kfunc_OnSubtitleMsg], fFunctionNames[kfunc_OnSubtitleMsg],
"ss", pSubMsg->GetText(), pSubMsg->GetSpeaker()); "ss", pSubMsg->GetText().c_str(), pSubMsg->GetSpeaker().c_str());
if (retVal == nil) if (retVal == nil)
{ {
#ifndef PLASMA_EXTERNAL_RELEASE #ifndef PLASMA_EXTERNAL_RELEASE

Loading…
Cancel
Save