3939 }
4040
4141castsL = {
42- 'boost::python::str' : lambda name : "reinterpret_cast<LPARAM>(static_cast<const char*>(extract<const char *>(" + name + ")))" ,
42+ 'boost::python::str' : lambda name : "reinterpret_cast<LPARAM>(static_cast<const char*>(boost::python:: extract<const char *>(" + name + ")))" ,
4343 # Hack - assume a tuple is a colour
4444 'boost::python::tuple' : lambda name : "MAKECOLOUR(" + name + ")" .format (name )
4545 }
4646
4747castsW = {
48- 'boost::python::str' : lambda name : "reinterpret_cast<WPARAM>(static_cast<const char*>(extract<const char *>(" + name + ")))" ,
48+ 'boost::python::str' : lambda name : "reinterpret_cast<WPARAM>(static_cast<const char*>(boost::python:: extract<const char *>(" + name + ")))" ,
4949 # Hack - assume a tuple is a colour
5050 'boost::python::tuple' : lambda name : "MAKECOLOUR(" + name + ")" .format (name )
5151 }
5252
5353castsRet = {
5454 'bool' : lambda val : 'return 0 != (' + val + ')' ,
55- 'boost::python::tuple' : lambda val : 'int retVal = callScintilla(' + val + ');\n \t return make_tuple(COLOUR_RED(retVal), COLOUR_GREEN(retVal), COLOUR_BLUE(retVal))'
55+ 'boost::python::tuple' : lambda val : 'int retVal = callScintilla(' + val + ');\n \t return boost::python:: make_tuple(COLOUR_RED(retVal), COLOUR_GREEN(retVal), COLOUR_BLUE(retVal))'
5656
5757 }
5858
@@ -92,15 +92,15 @@ def cellsBody(v, out):
9292
9393
9494def constString (v , out ):
95- out .write ("\t const char *raw = extract<const char *>(" + v ["Param2Name" ] + ".attr(\" __str__\" )());\n " )
95+ out .write ("\t const char *raw = boost::python:: extract<const char *>(" + v ["Param2Name" ] + ".attr(\" __str__\" )());\n " )
9696 out .write ("\t return callScintilla(" + symbolName (v ) + ", len(" + v ["Param2Name" ] + "), reinterpret_cast<LPARAM>(raw));\n " );
9797
9898def retString (v , out ):
9999 out .write ("\t int resultLength = callScintilla(" + symbolName (v ) + ");\n " )
100100 out .write ("\t char *result = (char *)malloc(resultLength + 1);\n " )
101101 out .write ("\t callScintilla(" + symbolName (v ) + ", resultLength + 1, reinterpret_cast<LPARAM>(result));\n " )
102102 out .write ("\t result[resultLength] = '\\ 0';\n " )
103- out .write ("\t str o = str((const char *) result);\n " )
103+ out .write ("\t boost::python::str o = boost::python:: str(result);\n " )
104104 out .write ("\t free(result);\n " )
105105 out .write ("\t return o;\n " )
106106
@@ -116,7 +116,7 @@ def getLineBody(v, out):
116116 out .write ("\t \t char *result = (char *)malloc(resultLength + 1);\n " )
117117 out .write ("\t \t callScintilla(" + symbolName (v ) + ", line, reinterpret_cast<LPARAM>(result));\n " )
118118 out .write ("\t \t result[resultLength] = '\\ 0';\n " )
119- out .write ("\t \t str o = str((const char *) result);\n " )
119+ out .write ("\t \t boost::python::str o = boost::python:: str(result);\n " )
120120 out .write ("\t \t free(result);\n " )
121121 out .write ("\t \t return o;\n " )
122122 out .write ("\t }\n " )
@@ -148,19 +148,19 @@ def retStringNoLength(v, out):
148148
149149 out .write (", reinterpret_cast<LPARAM>(result));\n " )
150150 out .write ("\t result[resultLength] = '\\ 0';\n " )
151- out .write ("\t str o = str((const char *) result);\n " )
151+ out .write ("\t boost::python::str o = boost::python:: str(result);\n " )
152152 out .write ("\t free(result);\n " )
153153 out .write ("\t return o;\n " )
154154
155155def findTextBody (v , out ):
156156 out .write ('\t Sci_TextToFind src;\n ' )
157157 out .write ('\t src.chrg.cpMin = start;\n ' )
158158 out .write ('\t src.chrg.cpMax = end;\n ' )
159- out .write ('\t src.lpstrText = const_cast<char*>((const char *)extract<const char *>({0}.attr("__str__")()));\n ' .format (v ['Param2Name' ]))
159+ out .write ('\t src.lpstrText = const_cast<char*>((const char *)boost::python:: extract<const char *>({0}.attr("__str__")()));\n ' .format (v ['Param2Name' ]))
160160 out .write ('\t int result = callScintilla({0}, {1}, reinterpret_cast<LPARAM>(&src));\n ' .format (symbolName (v ), v ["Param1Name" ]))
161161 out .write ('\t if (-1 == result)\n ' )
162- out .write ('\t {\n \t \t return object();\n \t }\n ' )
163- out .write ('\t else\n \t {\n \t \t return make_tuple(src.chrgText.cpMin, src.chrgText.cpMax);\n \t }\n ' )
162+ out .write ('\t {\n \t \t return boost::python:: object();\n \t }\n ' )
163+ out .write ('\t else\n \t {\n \t \t return boost::python:: make_tuple(src.chrgText.cpMin, src.chrgText.cpMax);\n \t }\n ' )
164164
165165
166166def getTextRangeBody (v , out ):
@@ -175,7 +175,7 @@ def getTextRangeBody(v, out):
175175 out .write ('\t src.chrg.cpMax = end;\n ' )
176176 out .write ('\t src.lpstrText = new char[(end-start) + 1];\n ' )
177177 out .write ('\t callScintilla({0}, 0, reinterpret_cast<LPARAM>(&src));\n ' .format (symbolName (v )))
178- out .write ('\t str ret(const_cast<const char*>(src.lpstrText));\n ' )
178+ out .write ('\t boost::python::str ret(const_cast<const char*>(src.lpstrText));\n ' )
179179 out .write ('\t delete src.lpstrText;\n ' )
180180 out .write ('\t return ret;\n ' )
181181
@@ -192,18 +192,18 @@ def getStyledTextBody(v, out):
192192 out .write ('\t src.chrg.cpMax = end;\n ' )
193193 out .write ('\t src.lpstrText = new char[((end-start) * 2) + 2];\n ' )
194194 out .write ('\t callScintilla({0}, 0, reinterpret_cast<LPARAM>(&src));\n ' .format (symbolName (v )))
195- out .write ('\t list styles;\n ' )
195+ out .write ('\t boost::python::list styles;\n ' )
196196 out .write ('\t char *result = new char[(end-start) + 1];\n ' )
197197 out .write ('\t for(int pos = 0; pos < (end - start); pos++)\n ' )
198198 out .write ('\t {\n ' )
199199 out .write ('\t \t result[pos] = src.lpstrText[pos * 2];\n ' )
200200 out .write ('\t \t styles.append((int)(src.lpstrText[(pos * 2) + 1]));\n ' )
201201 out .write ('\t }\n ' )
202202 out .write ("\t result[end-start] = '\\ 0';\n " )
203- out .write ('\t str resultStr(const_cast<const char*>(result));\n ' )
203+ out .write ('\t boost::python::str resultStr(const_cast<const char*>(result));\n ' )
204204 out .write ('\t delete src.lpstrText;\n ' )
205205 out .write ('\t delete result;\n ' )
206- out .write ('\t return make_tuple(resultStr, styles);\n ' )
206+ out .write ('\t return boost::python:: make_tuple(resultStr, styles);\n ' )
207207
208208
209209
@@ -451,12 +451,12 @@ def writeEnumsWrapperFile(f, out):
451451 for name in f .enums :
452452 v = f .enums [name ]
453453 if v .get ('Values' ):
454- out .write ('\t enum_ <{0}>("{1}")' .format (name , name .upper ()))
454+ out .write ('\t boost::python::enum_ <{0}>("{1}")' .format (name , name .upper ()))
455455 for val in v ['Values' ]:
456456 out .write ('\n \t \t .value("{0}", PYSCR_{1})' .format (val [0 ][len (v ['Value' ]):].upper (), val [0 ]))
457457 out .write (';\n \n ' )
458458
459- out .write ('\t enum_ <ScintillaNotification>("SCINTILLANOTIFICATION")' .format (name , name .upper ()))
459+ out .write ('\t boost::python::enum_ <ScintillaNotification>("SCINTILLANOTIFICATION")' .format (name , name .upper ()))
460460
461461 for name in f .order :
462462 v = f .features [name ]
@@ -465,7 +465,7 @@ def writeEnumsWrapperFile(f, out):
465465 out .write ('\n \t \t .value("{0}", PYSCR_SCN_{1})' .format (name .upper (), name .upper ()))
466466 out .write (';\n \n ' )
467467
468- out .write ('\t enum_ <ScintillaMessage>("SCINTILLAMESSAGE")' .format (name , name .upper ()))
468+ out .write ('\t boost::python::enum_ <ScintillaMessage>("SCINTILLAMESSAGE")' .format (name , name .upper ()))
469469 for name in f .order :
470470 v = f .features [name ]
471471 if v ["Category" ] != "Deprecated" :
0 commit comments