Branch: refs/heads/master Author: Frank Lanitz frank@frank.uvena.de Committer: Frank Lanitz frank@frank.uvena.de Date: Thu, 26 Jul 2012 09:28:30 Commit: 590171801f954d93ad4024ce3a7762fec1af2bdb https://github.com/geany/geany-plugins/commit/590171801f954d93ad4024ce3a7762...
Log Message: ----------- Merge pull request #63 from SiegeLord/master
Remove some questionable pointer->int casts
Modified Paths: -------------- geanylua/glspi_app.c geanylua/glspi_sci.c
Modified: geanylua/glspi_app.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -580,7 +580,7 @@ static gint glspi_keygrab(lua_State* L) if (prompt && doc && doc->is_valid ) { gint fvl=scintilla_send_message(doc->editor->sci,SCI_GETFIRSTVISIBLELINE, 0,0); gint pos=sci_get_position_from_line(doc->editor->sci, fvl+1); - scintilla_send_message(doc->editor->sci,SCI_CALLTIPSHOW,pos+3, (glong)prompt); + scintilla_send_message(doc->editor->sci,SCI_CALLTIPSHOW,pos+3, (sptr_t)prompt); } gdk_window_add_filter(main_widgets->window->window, keygrab_cb, &km); do {
Modified: geanylua/glspi_sci.c 12 files changed, 6 insertions(+), 6 deletions(-) =================================================================== @@ -626,8 +626,8 @@ static gint glspi_fail_arg_count(lua_State* L, const gchar*funcname, const gchar
static gint glspi_scintilla(lua_State* L) { - gint wparam=0; - gint lparam=0; + uptr_t wparam=0; + sptr_t lparam=0; SciCmdHashEntry*he=NULL; gint argc=lua_gettop(L); gchar*resultbuf=NULL; @@ -673,7 +673,7 @@ static gint glspi_scintilla(lua_State* L) break; case SLT_STRING: if (!lua_isstring(L,2)) {return FAIL_STRING_ARG(2); }; - wparam=GPOINTER_TO_INT(lua_tostring(L,2)); + wparam=(uptr_t)lua_tostring(L,2); break; case SLT_CELLS: return FAIL_API; case SLT_BOOL: @@ -696,7 +696,7 @@ static gint glspi_scintilla(lua_State* L) break; case SLT_STRING: if (!lua_isstring(L,3)) {return FAIL_STRING_ARG(2); }; - lparam=GPOINTER_TO_INT(lua_tostring(L,3)); + lparam=(sptr_t)lua_tostring(L,3); break; case SLT_CELLS: return FAIL_API; case SLT_BOOL: @@ -721,7 +721,7 @@ static gint glspi_scintilla(lua_State* L) bufsize=scintilla_send_message(doc->editor->sci, he->msgid, wparam, 0); if (bufsize) { resultbuf=g_malloc0((guint)(bufsize+1)); - lparam=GPOINTER_TO_INT(resultbuf); + lparam=(sptr_t)resultbuf; } else { lua_pushnil(L); return 1; @@ -802,7 +802,7 @@ static gint glspi_find(lua_State* L) lua_pop(L, 1); }
- if (scintilla_send_message(doc->editor->sci,SCI_FINDTEXT,flags,GPOINTER_TO_INT(&ttf))!=-1) { + if (scintilla_send_message(doc->editor->sci,SCI_FINDTEXT,flags,(sptr_t)&ttf)!=-1) { push_number(L,ttf.chrgText.cpMin); push_number(L,ttf.chrgText.cpMax); g_free(ttf.lpstrText);
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
plugins-commits@lists.geany.org