Skip to content

Commit 9f833f3

Browse files
committed
fix that GetWordChars() is autogenerated
1 parent b8d1ae9 commit 9f833f3

File tree

4 files changed

+255
-244
lines changed

4 files changed

+255
-244
lines changed

PythonScript/src/CreateWrapper.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,14 @@ def getGetCharacterPointerBody(v, out):
512512
return {1}(charPtr);
513513
'''.format(symbolName(v), v["ReturnType"]))
514514

515+
def getGetWordCharsBody(v, out):
516+
traceCall(v, out)
517+
checkDisallowedInCallback(v, out)
518+
out.write(
519+
''' PythonCompatibleStrBuffer result(callScintilla({0}));
520+
callScintilla({0}, 0, reinterpret_cast<LPARAM>(*result));
521+
return boost::python::str(ScintillaWrapper::iso_latin_1_to_utf8(result.c_str()));
522+
'''.format(symbolName(v)))
515523

516524
def standardBody(v, out):
517525
# We always release the GIL. For standard getters, this shouldn't really be necessary.
@@ -615,7 +623,8 @@ def getPythonParamNamesQuoted(param1Type, param1Name, param2Type, param2Name):
615623
'ReleaseDocument' :('void', '','', 'intptr_t', 'doc', getReleaseDocumentBody),
616624
'PrivateLexerCall' :('intptr_t', 'intptr_t','operation','intptr_t', 'pointer', getPrivateLexerCallBody),
617625
'GetCharacterPointer' :('boost::python::str', '','','', '', getGetCharacterPointerBody),
618-
'GetRangePointer' :('boost::python::str', 'int','position','int', 'rangeLength', getGetRangePointerBody)
626+
'GetRangePointer' :('boost::python::str', 'int','position','int', 'rangeLength', getGetRangePointerBody),
627+
'GetWordChars' :('boost::python::str', '','','', '', getGetWordCharsBody)
619628
}
620629

621630

@@ -905,7 +914,6 @@ def writeScintillaDoc(f, out):
905914
v["Param1Type"] = mapType(v["Param1Type"])
906915
v["Param2Type"] = mapType(v["Param2Type"])
907916

908-
# out.write("/** " + "\n * ".join(v["Comment"]) + "\n */\n")
909917
out.write(".. method:: editor.")
910918
out.write(getPythonSignature(v).replace('intptr_t','int')) # documentation should contain int instead of intptr_t
911919
out.write("\n\n ")

0 commit comments

Comments
 (0)