From e3ecdd9668a23916f6820caafa79291ed842601a Mon Sep 17 00:00:00 2001 From: Robert Förster Date: Sun, 1 Jun 2014 09:49:28 +0000 Subject: - added qt5 phonon support (windows doesn't seem to work, others were not tested yet) - fixed tabs in plist - wrapped #warning into __GNUC__ ifdef - partly revert r6370 the change was quite pointless - update to ExtUtils::ParseXS 3.24 and Devel::PPPort 3.24, also adding a define which the latter suggested - massive update to the numeric table, no function change, some of these make sense to implement, some don't, this commit is merely to complete the listing so i can figure something out, possibly git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6381 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/objects/KvsObject_ftp.cpp | 4 +- src/modules/objects/KvsObject_http.cpp | 4 +- src/modules/perlcore/libkviperlcore.cpp | 3 +- src/modules/perlcore/ppport.h | 114 ++++++++++++++++++++++++++++++-- src/modules/perlcore/xs.inc | 2 +- 5 files changed, 117 insertions(+), 10 deletions(-) (limited to 'src/modules') diff --git a/src/modules/objects/KvsObject_ftp.cpp b/src/modules/objects/KvsObject_ftp.cpp index e23daa0bd..f9ed6c7b9 100644 --- a/src/modules/objects/KvsObject_ftp.cpp +++ b/src/modules/objects/KvsObject_ftp.cpp @@ -24,7 +24,9 @@ #include "KvsObject_ftp.h" -#warning QFtp doesn't exists anymore in Qt5, port this class or drop it +#ifdef __GNUC__ +#warning QFtp doesn't exist anymore in Qt5, port this class or drop it +#endif #if (QT_VERSION < 0x050000) #include "kvi_debug.h" diff --git a/src/modules/objects/KvsObject_http.cpp b/src/modules/objects/KvsObject_http.cpp index b82c683b6..3983f5d90 100644 --- a/src/modules/objects/KvsObject_http.cpp +++ b/src/modules/objects/KvsObject_http.cpp @@ -24,7 +24,9 @@ #include "KvsObject_http.h" -#warning QHttp doesn't exists anymore in Qt5, port this class or drop it +#ifdef __GNUC__ +#warning QHttp doesn't exist anymore in Qt5, port this class or drop it +#endif #if (QT_VERSION < 0x050000) #include "kvi_debug.h" diff --git a/src/modules/perlcore/libkviperlcore.cpp b/src/modules/perlcore/libkviperlcore.cpp index 6c857b79f..101d31920 100644 --- a/src/modules/perlcore/libkviperlcore.cpp +++ b/src/modules/perlcore/libkviperlcore.cpp @@ -68,6 +68,7 @@ #include #include + #define NEED_eval_pv #include "ppport.h" #include "KviKvsRunTimeContext.h" @@ -77,7 +78,7 @@ static KviCString g_szLastReturnValue(""); static QStringList g_lWarningList; - // this is why we can't have nice things + // this is why we can't have nice things -- part of perl 5.17.1+ #ifdef __cplusplus #define dNOOP (void)0 #else diff --git a/src/modules/perlcore/ppport.h b/src/modules/perlcore/ppport.h index d07f52d03..b4019924e 100644 --- a/src/modules/perlcore/ppport.h +++ b/src/modules/perlcore/ppport.h @@ -4,9 +4,9 @@ /* ---------------------------------------------------------------------- - ppport.h -- Perl/Pollution/Portability Version 3.21 + ppport.h -- Perl/Pollution/Portability Version 3.24 - Automatically created by Devel::PPPort running under perl 5.018001. + Automatically created by Devel::PPPort running under perl 5.020000. Version 3.x, Copyright (c) 2004-2013, Marcus Holland-Moritz. @@ -23,8 +23,8 @@ SKIP if (@ARGV && $ARGV[0] eq '--unstrip') { eval { require Devel::PPPort }; $@ and die "Cannot require Devel::PPPort, please install.\n"; - if (eval $Devel::PPPort::VERSION < 3.21) { - die "ppport.h was originally generated with Devel::PPPort 3.21.\n" + if (eval $Devel::PPPort::VERSION < 3.24) { + die "ppport.h was originally generated with Devel::PPPort 3.24.\n" . "Your Devel::PPPort is only version $Devel::PPPort::VERSION.\n" . "Please install a newer version, or --unstrip will not work.\n"; } @@ -788,6 +788,13 @@ typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); #define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) #endif #endif +#if (PERL_BCDVERSION >= 0x5008000) +#ifndef HeUTF8 +#define HeUTF8(he) ((HeKLEN(he) == HEf_SVKEY) ? \ +SvUTF8(HeKEY_sv(he)) : \ +(U32)HeKUTF8(he)) +#endif +#endif #ifndef PERL_SIGNALS_UNSAFE_FLAG #define PERL_SIGNALS_UNSAFE_FLAG 0x0001 #if (PERL_BCDVERSION < 0x5008000) @@ -1042,6 +1049,9 @@ const int oexpect = PL_expect; #if (PERL_BCDVERSION >= 0x5004000) utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0), veop, modname, imop); +#elif (PERL_BCDVERSION > 0x5003000) +utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(), +veop, modname, imop); #else utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(), modname, imop); @@ -2017,6 +2027,15 @@ warn("%s", SvPV_nolen(sv)); #ifndef SvGETMAGIC #define SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END #endif +#ifndef HEf_SVKEY +#define HEf_SVKEY -2 +#endif +#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +#define MUTABLE_PTR(p) ({ void *_p = (p); _p; }) +#else +#define MUTABLE_PTR(p) ((void *) (p)) +#endif +#define MUTABLE_SV(p) ((SV *)MUTABLE_PTR(p)) #ifndef PERL_MAGIC_sv #define PERL_MAGIC_sv '\0' #endif @@ -2258,6 +2277,89 @@ sv_magic(SvMp_sv, obj, how, SvMp_name, SvMp_namlen); \ #else #define sv_magic_portable(a, b, c, d, e) sv_magic(a, b, c, d, e) #endif +#if !defined(mg_findext) +#if defined(NEED_mg_findext) +static MAGIC * DPPP_(my_mg_findext)(pTHX_ SV * sv, int type, const MGVTBL *vtbl); +static +#else +extern MAGIC * DPPP_(my_mg_findext)(pTHX_ SV * sv, int type, const MGVTBL *vtbl); +#endif +#ifdef mg_findext +#undef mg_findext +#endif +#define mg_findext(a,b,c) DPPP_(my_mg_findext)(aTHX_ a,b,c) +#define Perl_mg_findext DPPP_(my_mg_findext) +#if defined(NEED_mg_findext) || defined(NEED_mg_findext_GLOBAL) +MAGIC * +DPPP_(my_mg_findext)(pTHX_ SV * sv, int type, const MGVTBL *vtbl) { +if (sv) { +MAGIC *mg; +#ifdef AvPAD_NAMELIST +assert(!(SvTYPE(sv) == SVt_PVAV && AvPAD_NAMELIST(sv))); +#endif +for (mg = SvMAGIC (sv); mg; mg = mg->mg_moremagic) { +if (mg->mg_type == type && mg->mg_virtual == vtbl) +return mg; +} +} +return NULL; +} +#endif +#endif +#if !defined(sv_unmagicext) +#if defined(NEED_sv_unmagicext) +static int DPPP_(my_sv_unmagicext)(pTHX_ SV * const sv, const int type, MGVTBL * vtbl); +static +#else +extern int DPPP_(my_sv_unmagicext)(pTHX_ SV * const sv, const int type, MGVTBL * vtbl); +#endif +#ifdef sv_unmagicext +#undef sv_unmagicext +#endif +#define sv_unmagicext(a,b,c) DPPP_(my_sv_unmagicext)(aTHX_ a,b,c) +#define Perl_sv_unmagicext DPPP_(my_sv_unmagicext) +#if defined(NEED_sv_unmagicext) || defined(NEED_sv_unmagicext_GLOBAL) +int +DPPP_(my_sv_unmagicext)(pTHX_ SV *const sv, const int type, MGVTBL *vtbl) +{ +MAGIC* mg; +MAGIC** mgp; +if (SvTYPE(sv) < SVt_PVMG || !SvMAGIC(sv)) +return 0; +mgp = &(SvMAGIC(sv)); +for (mg = *mgp; mg; mg = *mgp) { +const MGVTBL* const virt = mg->mg_virtual; +if (mg->mg_type == type && virt == vtbl) { +*mgp = mg->mg_moremagic; +if (virt && virt->svt_free) +virt->svt_free(aTHX_ sv, mg); +if (mg->mg_ptr && mg->mg_type != PERL_MAGIC_regex_global) { +if (mg->mg_len > 0) +Safefree(mg->mg_ptr); +else if (mg->mg_len == HEf_SVKEY) +SvREFCNT_dec(MUTABLE_SV(mg->mg_ptr)); +else if (mg->mg_type == PERL_MAGIC_utf8) +Safefree(mg->mg_ptr); +} +if (mg->mg_flags & MGf_REFCOUNTED) +SvREFCNT_dec(mg->mg_obj); +Safefree(mg); +} +else +mgp = &mg->mg_moremagic; +} +if (SvMAGIC(sv)) { +if (SvMAGICAL(sv)) +mg_magical(sv); +} +else { +SvMAGICAL_off(sv); +SvFLAGS(sv) |= (SvFLAGS(sv) & (SVp_IOK|SVp_NOK|SVp_POK)) >> PRIVSHIFT; +} +return 0; +} +#endif +#endif #ifdef USE_ITHREADS #ifndef CopFILE #define CopFILE(c) ((c)->cop_file) @@ -3040,10 +3142,10 @@ const U8 c = (U8)u & 0xFF; if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) { if (flags & PERL_PV_ESCAPE_FIRSTCHAR) chsize = my_snprintf(octbuf, sizeof octbuf, -"%"UVxf, u); +"%" UVxf, u); else chsize = my_snprintf(octbuf, sizeof octbuf, -"%cx{%"UVxf"}", esc, u); +"%cx{%" UVxf "}", esc, u); } else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) { chsize = 1; } else { diff --git a/src/modules/perlcore/xs.inc b/src/modules/perlcore/xs.inc index fa42e8f3c..0db33318e 100644 --- a/src/modules/perlcore/xs.inc +++ b/src/modules/perlcore/xs.inc @@ -1,5 +1,5 @@ /* - * This file was generated automatically by ExtUtils::ParseXS version 3.22 from the + * This file was generated automatically by ExtUtils::ParseXS version 3.24 from the * contents of KVIrc.xs. Do not edit this file, edit KVIrc.xs instead. * * ANY CHANGES MADE HERE WILL BE LOST! -- cgit v1.3.1-10-gc9f91