mirror of
https://github.com/irssi/irssi.git
synced 2026-08-19 08:32:07 +02:00
I always forget Perl 5.004 doesn't have PL_na .. so, now I've declared for
5.004, and changed all STRLEN n_a code to use PL_na instead. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2238 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
d4ee6fd604
commit
617123b5d4
10 changed files with 21 additions and 35 deletions
|
|
@ -47,14 +47,17 @@ typedef struct {
|
|||
PERL_OBJECT_FUNC fill_func;
|
||||
} PERL_OBJECT_REC;
|
||||
|
||||
#ifndef HAVE_PL_PERL
|
||||
STRLEN PL_na;
|
||||
#endif
|
||||
|
||||
static GHashTable *iobject_stashes, *plain_stashes;
|
||||
static GSList *use_protocols;
|
||||
|
||||
/* returns the package who called us */
|
||||
const char *perl_get_package(void)
|
||||
{
|
||||
STRLEN n_a;
|
||||
return SvPV(perl_eval_pv("caller", TRUE), n_a);
|
||||
return SvPV(perl_eval_pv("caller", TRUE), PL_na);
|
||||
}
|
||||
|
||||
/* Parses the package part from function name */
|
||||
|
|
@ -76,13 +79,12 @@ char *perl_function_get_package(const char *function)
|
|||
|
||||
SV *perl_func_sv_inc(SV *func, const char *package)
|
||||
{
|
||||
STRLEN n_a;
|
||||
char *name;
|
||||
|
||||
if (SvPOK(func)) {
|
||||
/* prefix with package name */
|
||||
name = g_strdup_printf("%s::%s", package,
|
||||
(char *) SvPV(func, n_a));
|
||||
(char *) SvPV(func, PL_na));
|
||||
func = new_pv(name);
|
||||
g_free(name);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue