Ticket #31153: patch-ipe-uilua.cpp.diff
File patch-ipe-uilua.cpp.diff, 737 bytes (added by m.thon@…, 13 years ago) |
---|
-
ipe/uilua.cpp
old new 36 36 37 37 #include <cstdio> 38 38 #include <cstdlib> 39 #include <vector> 39 40 40 41 #ifdef IPEUI_QT 41 42 #include "ipeselector_qt.h" … … 543 544 AppUiBase **ui = check_appui(L, 1); 544 545 luaL_argcheck(L, lua_istable(L, 2), 2, "argument is not a table"); 545 546 int no = lua_objlen(L, 2); 546 String bm[no];547 std::vector<String> bm(no); 547 548 for (int i = 1; i <= no; ++i) { 548 549 lua_rawgeti(L, 2, i); 549 550 luaL_argcheck(L, lua_isstring(L, -1), 2, "item is not a string"); 550 551 bm[i-1] = String(lua_tostring(L, -1)); 551 552 lua_pop(L, 1); 552 553 } 553 (*ui)->setBookmarks(no, bm);554 (*ui)->setBookmarks(no, &bm[0]); 554 555 return 0; 555 556 } 556 557