mess_sv = Nullsv; \
} STMT_END
-#ifndef PERL_OBJECT
+#ifdef PERL_OBJECT
+static I32 read_e_script _((CPerlObj* pPerl, int idx, SV *buf_sv, int maxlen));
+#else
static void find_beginning _((void));
static void forbid_setid _((char *));
static void incpush _((char *, int));
/* call exit list functions */
while (exitlistlen-- > 0)
- exitlist[exitlistlen].fn(exitlist[exitlistlen].ptr);
+ exitlist[exitlistlen].fn(THIS_ exitlist[exitlistlen].ptr);
Safefree(exitlist);
}
void
+#ifdef PERL_OBJECT
+CPerlObj::perl_atexit(void (*fn) (CPerlObj*,void *), void *ptr)
+#else
perl_atexit(void (*fn) (void *), void *ptr)
+#endif
{
Renew(exitlist, exitlistlen+1, PerlExitListEntry);
exitlist[exitlistlen].fn = fn;
}
-STATIC I32
-read_e_script(int idx, SV *buf_sv, int maxlen)
-{
- char *p, *nl;
- FILTER_READ(idx+1, buf_sv, maxlen);
- p = SvPVX(e_script);
- nl = strchr(p, '\n');
- nl = (nl) ? nl+1 : SvEND(e_script);
- if (nl-p == 0)
- return 0;
- sv_catpvn(buf_sv, p, nl-p);
- sv_chop(e_script, nl);
- return 1;
-}
-
-
STATIC void
init_ids(void)
{
if (!(s = strchr(*env,'=')))
continue;
*s++ = '\0';
-#if defined(WIN32) || defined(MSDOS)
+#if defined(MSDOS)
(void)strupr(*env);
#endif
sv = newSVpv(s--,0);
JMPENV_JUMP(2);
}
+
+
+#include "XSUB.h"
+
+static I32
+#ifdef PERL_OBJECT
+read_e_script(CPerlObj *pPerl, int idx, SV *buf_sv, int maxlen)
+#else
+read_e_script(int idx, SV *buf_sv, int maxlen)
+#endif
+{
+ char *p, *nl;
+ p = SvPVX(e_script);
+ nl = strchr(p, '\n');
+ nl = (nl) ? nl+1 : SvEND(e_script);
+ if (nl-p == 0)
+ return 0;
+ sv_catpvn(buf_sv, p, nl-p);
+ sv_chop(e_script, nl);
+ return 1;
+}
+
+