mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 17:12:51 +02:00
cleanup char* casts and replace one useless SvPV with SvPV_nolen
This commit is contained in:
parent
7dbb8efdde
commit
f58a461c54
4 changed files with 11 additions and 12 deletions
|
|
@ -323,7 +323,6 @@ static void perl_call_signal(PERL_SCRIPT_REC *script, SV *func,
|
|||
GList **ret = arg;
|
||||
GList *out = NULL;
|
||||
void *val;
|
||||
STRLEN len;
|
||||
int count;
|
||||
|
||||
av = (AV *) SvRV(saved_args[n]);
|
||||
|
|
@ -331,7 +330,7 @@ static void perl_call_signal(PERL_SCRIPT_REC *script, SV *func,
|
|||
while (count-- >= 0) {
|
||||
sv = av_shift(av);
|
||||
if (SvPOKp(sv))
|
||||
val = g_strdup(SvPV(sv, len));
|
||||
val = g_strdup(SvPV_nolen(sv));
|
||||
else
|
||||
val = GINT_TO_POINTER(SvIV(sv));
|
||||
|
||||
|
|
@ -435,7 +434,7 @@ static void perl_signal_remove_list_one(GSList **siglist, PERL_SIGNAL_REC *rec)
|
|||
|
||||
#define sv_func_cmp(f1, f2) \
|
||||
(f1 == f2 || (SvPOK(f1) && SvPOK(f2) && \
|
||||
strcmp((char *) SvPV_nolen(f1), (char *) SvPV_nolen(f2)) == 0))
|
||||
strcmp(SvPV_nolen(f1), SvPV_nolen(f2)) == 0))
|
||||
|
||||
static void perl_signal_remove_list(GSList **list, SV *func)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue