+#ifndef PERL_CALLCONV
+# define PERL_CALLCONV
+#endif
+
#ifdef PERL_OBJECT
-#include "ipstdio.h"
-#include "ipdir.h"
-#include "ipenv.h"
-#include "iplio.h"
-#include "ipmem.h"
-#include "ipproc.h"
-#include "ipsock.h"
-#define VIRTUAL virtual
+#define VIRTUAL virtual PERL_CALLCONV
#else
-#define VIRTUAL
+#define VIRTUAL PERL_CALLCONV
START_EXTERN_C
#endif
+/* NOTE!!! When new virtual functions are added, they must be added at
+ * the end of this file to maintain binary compatibility with PERL_OBJECT
+ */
+
+
#ifndef NEXT30_NO_ATTRIBUTE
#ifndef HASATTRIBUTE /* disable GNU-cc attribute checking? */
#ifdef __attribute__ /* Avoid possible redefinition errors */
VIRTUAL OP* append_list _((I32 optype, LISTOP* first, LISTOP* last));
VIRTUAL I32 apply _((I32 type, SV** mark, SV** sp));
VIRTUAL void assertref _((OP* o));
-VIRTUAL SV* avhv_delete _((AV *ar, char* key, U32 klen, I32 flags));
-VIRTUAL SV* avhv_delete_ent _((AV *ar, SV* keysv, I32 flags, U32 hash));
-VIRTUAL bool avhv_exists _((AV *ar, char* key, U32 klen));
VIRTUAL bool avhv_exists_ent _((AV *ar, SV* keysv, U32 hash));
-VIRTUAL SV** avhv_fetch _((AV *ar, char* key, U32 klen, I32 lval));
VIRTUAL SV** avhv_fetch_ent _((AV *ar, SV* keysv, I32 lval, U32 hash));
-VIRTUAL I32 avhv_iterinit _((AV *ar));
VIRTUAL HE* avhv_iternext _((AV *ar));
-VIRTUAL SV * avhv_iternextsv _((AV *ar, char** key, I32* retlen));
VIRTUAL SV* avhv_iterval _((AV *ar, HE* entry));
VIRTUAL HV* avhv_keys _((AV *ar));
-VIRTUAL SV** avhv_store _((AV *ar, char* key, U32 klen, SV* val, U32 hash));
-VIRTUAL SV** avhv_store_ent _((AV *av, SV *keysv, SV *val, U32 hash));
VIRTUAL void av_clear _((AV* ar));
VIRTUAL void av_extend _((AV* ar, I32 key));
VIRTUAL AV* av_fake _((I32 size, SV** svp));
VIRTUAL I32 block_gimme _((void));
VIRTUAL int block_start _((int full));
VIRTUAL void boot_core_UNIVERSAL _((void));
-VIRTUAL void call_list _((I32 oldscope, AV* list));
+VIRTUAL void call_list _((I32 oldscope, AV* av_list));
VIRTUAL I32 cando _((I32 bit, I32 effective, Stat_t* statbufp));
#ifndef CASTNEGFLOAT
VIRTUAL U32 cast_ulong _((double f));
VIRTUAL void cv_ckproto _((CV* cv, GV* gv, char* p));
VIRTUAL CV* cv_clone _((CV* proto));
VIRTUAL SV* cv_const_sv _((CV* cv));
+VIRTUAL SV* op_const_sv _((OP* o, CV* cv));
VIRTUAL void cv_undef _((CV* cv));
-#ifdef DEBUGGING
-void cx_dump _((PERL_CONTEXT* cs));
-#endif
+VIRTUAL void cx_dump _((PERL_CONTEXT* cs));
VIRTUAL SV* filter_add _((filter_t funcp, SV* datasv));
VIRTUAL void filter_del _((filter_t funcp));
VIRTUAL I32 filter_read _((int idx, SV* buffer, int maxlen));
VIRTUAL char ** get_op_descs _((void));
VIRTUAL char ** get_op_names _((void));
+VIRTUAL char * get_no_modify _((void));
+VIRTUAL U32 * get_opargs _((void));
VIRTUAL I32 cxinc _((void));
-#ifdef DEBUGGING
-VIRTUAL void deb _((const char* pat,...)) __attribute__((format(printf,1,2)));
+VIRTUAL void deb _((const char* pat,...));
VIRTUAL void deb_growlevel _((void));
VIRTUAL void debprofdump _((void));
VIRTUAL I32 debop _((OP* o));
VIRTUAL I32 debstack _((void));
VIRTUAL I32 debstackptrs _((void));
-#endif
VIRTUAL char* delimcpy _((char* to, char* toend, char* from, char* fromend,
int delim, I32* retlen));
VIRTUAL void deprecate _((char* s));
VIRTUAL OP* die_where _((char* message));
VIRTUAL void dounwind _((I32 cxix));
VIRTUAL bool do_aexec _((SV* really, SV** mark, SV** sp));
+VIRTUAL int do_binmode _((PerlIO *fp, int iotype, int flag));
VIRTUAL void do_chop _((SV* asv, SV* sv));
VIRTUAL bool do_close _((GV* gv, bool not_implicit));
VIRTUAL bool do_eof _((GV* gv));
VIRTUAL bool do_print _((SV* sv, PerlIO* fp));
VIRTUAL OP* do_readline _((void));
VIRTUAL I32 do_chomp _((SV* sv));
-VIRTUAL bool do_seek _((GV* gv, long pos, int whence));
+VIRTUAL bool do_seek _((GV* gv, Off_t pos, int whence));
#if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
I32 do_semop _((SV** mark, SV** sp));
I32 do_shmio _((I32 optype, SV** mark, SV** sp));
#endif
VIRTUAL void do_sprintf _((SV* sv, I32 len, SV** sarg));
-VIRTUAL long do_sysseek _((GV* gv, long pos, int whence));
-VIRTUAL long do_tell _((GV* gv));
-VIRTUAL I32 do_trans _((SV* sv, OP* arg));
+VIRTUAL Off_t do_sysseek _((GV* gv, Off_t pos, int whence));
+VIRTUAL Off_t do_tell _((GV* gv));
+VIRTUAL I32 do_trans _((SV* sv));
VIRTUAL void do_vecset _((SV* sv));
VIRTUAL void do_vop _((I32 optype, SV* sv, SV* left, SV* right));
+VIRTUAL OP* dofile _((OP* term));
VIRTUAL I32 dowantarray _((void));
VIRTUAL void dump_all _((void));
-#ifdef DEBUGGING
-void dump_eval _((void));
-#endif
+VIRTUAL void dump_eval _((void));
#ifdef DUMP_FDS /* See util.c */
-int dump_fds _((char* s));
+VIRTUAL void dump_fds _((char* s));
#endif
-void dump_form _((GV* gv));
-void dump_gv _((GV* gv));
+VIRTUAL void dump_form _((GV* gv));
+VIRTUAL void dump_gv _((GV* gv));
#ifdef MYMALLOC
-void dump_mstats _((char* s));
+VIRTUAL void dump_mstats _((char* s));
#endif
-void dump_op _((OP* arg));
-void dump_pm _((PMOP* pm));
-void dump_packsubs _((HV* stash));
-void dump_sub _((GV* gv));
+VIRTUAL void dump_op _((OP* arg));
+VIRTUAL void dump_pm _((PMOP* pm));
+VIRTUAL void dump_packsubs _((HV* stash));
+VIRTUAL void dump_sub _((GV* gv));
VIRTUAL void fbm_compile _((SV* sv, U32 flags));
-VIRTUAL char* fbm_instr _((unsigned char* big, unsigned char* bigend, SV* littlesv));
+VIRTUAL char* fbm_instr _((unsigned char* big, unsigned char* bigend, SV* littlesv, U32 flags));
+VIRTUAL char* find_script _((char *scriptname, bool dosearch, char **search_ext, I32 flags));
#ifdef USE_THREADS
VIRTUAL PADOFFSET find_threadsv _((char *name));
#endif
VIRTUAL char* instr _((char* big, char* little));
VIRTUAL bool io_close _((IO* io));
VIRTUAL OP* invert _((OP* cmd));
+VIRTUAL bool is_uni_alnum _((U32 c));
+VIRTUAL bool is_uni_idfirst _((U32 c));
+VIRTUAL bool is_uni_alpha _((U32 c));
+VIRTUAL bool is_uni_space _((U32 c));
+VIRTUAL bool is_uni_digit _((U32 c));
+VIRTUAL bool is_uni_upper _((U32 c));
+VIRTUAL bool is_uni_lower _((U32 c));
+VIRTUAL bool is_uni_print _((U32 c));
+VIRTUAL U32 to_uni_upper _((U32 c));
+VIRTUAL U32 to_uni_title _((U32 c));
+VIRTUAL U32 to_uni_lower _((U32 c));
+VIRTUAL bool is_uni_alnum_lc _((U32 c));
+VIRTUAL bool is_uni_idfirst_lc _((U32 c));
+VIRTUAL bool is_uni_alpha_lc _((U32 c));
+VIRTUAL bool is_uni_space_lc _((U32 c));
+VIRTUAL bool is_uni_digit_lc _((U32 c));
+VIRTUAL bool is_uni_upper_lc _((U32 c));
+VIRTUAL bool is_uni_lower_lc _((U32 c));
+VIRTUAL bool is_uni_print_lc _((U32 c));
+VIRTUAL U32 to_uni_upper_lc _((U32 c));
+VIRTUAL U32 to_uni_title_lc _((U32 c));
+VIRTUAL U32 to_uni_lower_lc _((U32 c));
+VIRTUAL bool is_utf8_alnum _((U8 *p));
+VIRTUAL bool is_utf8_idfirst _((U8 *p));
+VIRTUAL bool is_utf8_alpha _((U8 *p));
+VIRTUAL bool is_utf8_space _((U8 *p));
+VIRTUAL bool is_utf8_digit _((U8 *p));
+VIRTUAL bool is_utf8_upper _((U8 *p));
+VIRTUAL bool is_utf8_lower _((U8 *p));
+VIRTUAL bool is_utf8_print _((U8 *p));
+VIRTUAL bool is_utf8_mark _((U8 *p));
VIRTUAL OP* jmaybe _((OP* arg));
VIRTUAL I32 keyword _((char* d, I32 len));
VIRTUAL void leave_scope _((I32 base));
VIRTUAL int magic_clearpack _((SV* sv, MAGIC* mg));
VIRTUAL int magic_clearsig _((SV* sv, MAGIC* mg));
VIRTUAL int magic_existspack _((SV* sv, MAGIC* mg));
-VIRTUAL int magic_freedefelem _((SV* sv, MAGIC* mg));
VIRTUAL int magic_freeregexp _((SV* sv, MAGIC* mg));
VIRTUAL int magic_get _((SV* sv, MAGIC* mg));
VIRTUAL int magic_getarylen _((SV* sv, MAGIC* mg));
VIRTUAL int magic_getdefelem _((SV* sv, MAGIC* mg));
VIRTUAL int magic_getglob _((SV* sv, MAGIC* mg));
+VIRTUAL int magic_getnkeys _((SV* sv, MAGIC* mg));
VIRTUAL int magic_getpack _((SV* sv, MAGIC* mg));
VIRTUAL int magic_getpos _((SV* sv, MAGIC* mg));
VIRTUAL int magic_getsig _((SV* sv, MAGIC* mg));
+VIRTUAL int magic_getsubstr _((SV* sv, MAGIC* mg));
VIRTUAL int magic_gettaint _((SV* sv, MAGIC* mg));
VIRTUAL int magic_getuvar _((SV* sv, MAGIC* mg));
+VIRTUAL int magic_getvec _((SV* sv, MAGIC* mg));
VIRTUAL U32 magic_len _((SV* sv, MAGIC* mg));
#ifdef USE_THREADS
VIRTUAL int magic_mutexfree _((SV* sv, MAGIC* mg));
#endif /* USE_THREADS */
VIRTUAL int magic_nextpack _((SV* sv, MAGIC* mg, SV* key));
+VIRTUAL U32 magic_regdata_cnt _((SV* sv, MAGIC* mg));
+VIRTUAL int magic_regdatum_get _((SV* sv, MAGIC* mg));
VIRTUAL int magic_set _((SV* sv, MAGIC* mg));
#ifdef OVERLOAD
VIRTUAL int magic_setamagic _((SV* sv, MAGIC* mg));
VIRTUAL int magic_wipepack _((SV* sv, MAGIC* mg));
VIRTUAL void magicname _((char* sym, char* name, I32 namlen));
int main _((int argc, char** argv, char** env));
+#ifdef MYMALLOC
+VIRTUAL MEM_SIZE malloced_size _((void *p));
+#endif
VIRTUAL void markstack_grow _((void));
#ifdef USE_LOCALE_COLLATE
VIRTUAL char* mem_collxfrm _((const char* s, STRLEN len, STRLEN* xlen));
#endif
VIRTUAL char* mess _((const char* pat, va_list* args));
VIRTUAL int mg_clear _((SV* sv));
-VIRTUAL int mg_copy _((SV* , SV* , char* , I32));
+VIRTUAL int mg_copy _((SV* sv, SV* nsv, char* key, I32 klen));
VIRTUAL MAGIC* mg_find _((SV* sv, int type));
VIRTUAL int mg_free _((SV* sv));
VIRTUAL int mg_get _((SV* sv));
VIRTUAL void my_failure_exit _((void)) __attribute__((noreturn));
VIRTUAL I32 my_lstat _((ARGSproto));
#if !defined(HAS_MEMCMP) || !defined(HAS_SANE_MEMCMP)
-I32 my_memcmp _((char* s1, char* s2, I32 len));
+VIRTUAL I32 my_memcmp _((char* s1, char* s2, I32 len));
#endif
#if !defined(HAS_MEMSET)
-void* my_memset _((char* loc, I32 ch, I32 len));
+VIRTUAL void* my_memset _((char* loc, I32 ch, I32 len));
#endif
#ifndef PERL_OBJECT
VIRTUAL I32 my_pclose _((PerlIO* ptr));
VIRTUAL OP* newCONDOP _((I32 flags, OP* expr, OP* trueop, OP* falseop));
VIRTUAL void newCONSTSUB _((HV* stash, char* name, SV* sv));
VIRTUAL void newFORM _((I32 floor, OP* o, OP* block));
-VIRTUAL OP* newFOROP _((I32 flags, char* label, line_t forline, OP* scalar, OP* expr, OP*block, OP*cont));
+VIRTUAL OP* newFOROP _((I32 flags, char* label, line_t forline, OP* sclr, OP* expr, OP*block, OP*cont));
VIRTUAL OP* newLOGOP _((I32 optype, I32 flags, OP* left, OP* right));
VIRTUAL OP* newLOOPEX _((I32 type, OP* label));
VIRTUAL OP* newLOOPOP _((I32 flags, I32 debuggable, OP* expr, OP* block));
VIRTUAL OP* newSLICEOP _((I32 flags, OP* subscript, OP* list));
VIRTUAL OP* newSTATEOP _((I32 flags, char* label, OP* o));
VIRTUAL CV* newSUB _((I32 floor, OP* o, OP* proto, OP* block));
-VIRTUAL CV* newXS _((char* name, void (*subaddr)(CPERLproto_ CV* cv), char* filename));
+VIRTUAL CV* newXS _((char* name, void (*subaddr)(CV* cv _CPERLproto), char* filename));
VIRTUAL AV* newAV _((void));
VIRTUAL OP* newAVREF _((OP* o));
VIRTUAL OP* newBINOP _((I32 type, I32 flags, OP* first, OP* last));
VIRTUAL OP* newGVREF _((I32 type, OP* o));
VIRTUAL OP* newHVREF _((OP* o));
VIRTUAL HV* newHV _((void));
+VIRTUAL HV* newHVhv _((HV* hv));
VIRTUAL IO* newIO _((void));
VIRTUAL OP* newLISTOP _((I32 type, I32 flags, OP* first, OP* last));
VIRTUAL OP* newPMOP _((I32 type, I32 flags));
VIRTUAL OP* newPVOP _((I32 type, I32 flags, char* pv));
-VIRTUAL SV* newRV _((SV* ref));
-#if !defined(__GNUC__) && (defined(CRIPPLED_CC) || defined(USE_THREADS) || defined(PERL_OBJECT))
-VIRTUAL SV* newRV_noinc _((SV *));
-#endif
-#ifdef LEAKTEST
-VIRTUAL SV* newSV _((I32 x, STRLEN len));
-#else
+VIRTUAL SV* newRV _((SV* pref));
+VIRTUAL SV* newRV_noinc _((SV *sv));
VIRTUAL SV* newSV _((STRLEN len));
-#endif
VIRTUAL OP* newSVREF _((OP* o));
VIRTUAL OP* newSVOP _((I32 type, I32 flags, SV* sv));
VIRTUAL SV* newSViv _((IV i));
VIRTUAL SV* newSVnv _((double n));
VIRTUAL SV* newSVpv _((char* s, STRLEN len));
+VIRTUAL SV* newSVpvn _((char *s, STRLEN len));
VIRTUAL SV* newSVpvf _((const char* pat, ...));
VIRTUAL SV* newSVrv _((SV* rv, char* classname));
VIRTUAL SV* newSVsv _((SV* old));
#ifndef PERL_OBJECT
PerlInterpreter* perl_alloc _((void));
#endif
-VIRTUAL I32 perl_call_argv _((char* subname, I32 flags, char** argv));
+#ifdef PERL_OBJECT
+VIRTUAL void perl_atexit _((void(*fn)(CPerlObj *, void *), void* ptr));
+#else
+void perl_atexit _((void(*fn)(void *), void*));
+#endif
+VIRTUAL I32 perl_call_argv _((char* sub_name, I32 flags, char** argv));
VIRTUAL I32 perl_call_method _((char* methname, I32 flags));
-VIRTUAL I32 perl_call_pv _((char* subname, I32 flags));
+VIRTUAL I32 perl_call_pv _((char* sub_name, I32 flags));
VIRTUAL I32 perl_call_sv _((SV* sv, I32 flags));
#ifdef PERL_OBJECT
VIRTUAL void perl_construct _((void));
VIRTUAL OP* prepend_elem _((I32 optype, OP* head, OP* tail));
VIRTUAL void push_return _((OP* o));
VIRTUAL void push_scope _((void));
-VIRTUAL regexp* pregcomp _((char* exp, char* xend, PMOP* pm));
VIRTUAL OP* ref _((OP* o, I32 type));
VIRTUAL OP* refkids _((OP* o, I32 type));
-#ifdef DEBUGGING
-void regdump _((regexp* r));
-#endif
+VIRTUAL void regdump _((regexp* r));
VIRTUAL I32 pregexec _((regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, U32 nosave));
-VIRTUAL I32 regexec_flags _((regexp* prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, void* data, U32 flags));
VIRTUAL void pregfree _((struct regexp* r));
-VIRTUAL regnode*regnext _((regnode* p));
-#ifdef DEBUGGING
-void regprop _((SV* sv, regnode* o));
-#endif
+VIRTUAL regexp* pregcomp _((char* exp, char* xend, PMOP* pm));
+VIRTUAL I32 regexec_flags _((regexp* prog, char* stringarg, char* strend,
+ char* strbeg, I32 minend, SV* screamer,
+ void* data, U32 flags));
+VIRTUAL regnode* regnext _((regnode* p));
+VIRTUAL void regprop _((SV* sv, regnode* o));
VIRTUAL void repeatcpy _((char* to, char* from, I32 len, I32 count));
VIRTUAL char* rninstr _((char* big, char* bigend, char* little, char* lend));
-VIRTUAL Sighandler_t rsignal _((int, Sighandler_t));
-VIRTUAL int rsignal_restore _((int, Sigsave_t*));
-VIRTUAL int rsignal_save _((int, Sighandler_t, Sigsave_t*));
-VIRTUAL Sighandler_t rsignal_state _((int));
+VIRTUAL Sighandler_t rsignal _((int i, Sighandler_t t));
+VIRTUAL int rsignal_restore _((int i, Sigsave_t* t));
+VIRTUAL int rsignal_save _((int i, Sighandler_t t1, Sigsave_t* t2));
+VIRTUAL Sighandler_t rsignal_state _((int i));
VIRTUAL void rxres_free _((void** rsp));
-VIRTUAL void rxres_restore _((void** rsp, REGEXP* rx));
-VIRTUAL void rxres_save _((void** rsp, REGEXP* rx));
+VIRTUAL void rxres_restore _((void** rsp, REGEXP* prx));
+VIRTUAL void rxres_save _((void** rsp, REGEXP* prx));
#ifndef HAS_RENAME
VIRTUAL I32 same_dirent _((char* a, char* b));
#endif
VIRTUAL char* savepvn _((char* sv, I32 len));
VIRTUAL void savestack_grow _((void));
VIRTUAL void save_aelem _((AV* av, I32 idx, SV **sptr));
+VIRTUAL I32 save_alloc _((I32 size, I32 pad));
VIRTUAL void save_aptr _((AV** aptr));
VIRTUAL AV* save_ary _((GV* gv));
VIRTUAL void save_clearsv _((SV** svp));
VIRTUAL void save_gp _((GV* gv, I32 empty));
VIRTUAL HV* save_hash _((GV* gv));
VIRTUAL void save_helem _((HV* hv, SV *key, SV **sptr));
+VIRTUAL void save_hints _((void));
VIRTUAL void save_hptr _((HV** hptr));
VIRTUAL void save_I16 _((I16* intp));
VIRTUAL void save_I32 _((I32* intp));
VIRTUAL void save_op _((void));
VIRTUAL SV* save_scalar _((GV* gv));
VIRTUAL void save_pptr _((char** pptr));
+VIRTUAL void save_re_context _((void));
VIRTUAL void save_sptr _((SV** sptr));
VIRTUAL SV* save_svref _((SV** sptr));
VIRTUAL SV** save_threadsv _((PADOFFSET i));
VIRTUAL IV sv_iv _((SV* sv));
VIRTUAL UV sv_uv _((SV* sv));
VIRTUAL double sv_nv _((SV* sv));
-VIRTUAL char * sv_pvn _((SV *, STRLEN *));
-VIRTUAL I32 sv_true _((SV *));
+VIRTUAL char * sv_pvn _((SV *sv, STRLEN *len));
+VIRTUAL I32 sv_true _((SV *sv));
VIRTUAL void sv_add_arena _((char* ptr, U32 size, U32 flags));
VIRTUAL int sv_backoff _((SV* sv));
VIRTUAL SV* sv_bless _((SV* sv, HV* stash));
VIRTUAL int sv_isa _((SV* sv, char* name));
VIRTUAL int sv_isobject _((SV* sv));
VIRTUAL STRLEN sv_len _((SV* sv));
+VIRTUAL STRLEN sv_len_utf8 _((SV* sv));
VIRTUAL void sv_magic _((SV* sv, SV* obj, int how, char* name, I32 namlen));
VIRTUAL SV* sv_mortalcopy _((SV* oldsv));
VIRTUAL SV* sv_newmortal _((void));
VIRTUAL SV* sv_newref _((SV* sv));
-#ifdef DEBUGGING
-char* sv_peek _((SV* sv));
-#endif
+VIRTUAL char* sv_peek _((SV* sv));
+VIRTUAL void sv_pos_u2b _((SV* sv, I32* offsetp, I32* lenp));
+VIRTUAL void sv_pos_b2u _((SV* sv, I32* offsetp));
VIRTUAL char* sv_pvn_force _((SV* sv, STRLEN* lp));
VIRTUAL char* sv_reftype _((SV* sv, int ob));
VIRTUAL void sv_replace _((SV* sv, SV* nsv));
VIRTUAL void sv_vsetpvfn _((SV* sv, const char* pat, STRLEN patlen,
va_list* args, SV** svargs, I32 svmax,
bool *used_locale));
+VIRTUAL SV* swash_init _((char* pkg, char* name, SV* listsv, I32 minbits, I32 none));
+VIRTUAL UV swash_fetch _((SV *sv, U8 *ptr));
VIRTUAL void taint_env _((void));
VIRTUAL void taint_proper _((const char* f, char* s));
+VIRTUAL UV to_utf8_lower _((U8 *p));
+VIRTUAL UV to_utf8_upper _((U8 *p));
+VIRTUAL UV to_utf8_title _((U8 *p));
#ifdef UNLINK_ALL_VERSIONS
VIRTUAL I32 unlnk _((char* f));
#endif
VIRTUAL void unsharepvn _((char* sv, I32 len, U32 hash));
VIRTUAL void unshare_hek _((HEK* hek));
VIRTUAL void utilize _((int aver, I32 floor, OP* version, OP* id, OP* arg));
+VIRTUAL U8* utf16_to_utf8 _((U16* p, U8 *d, I32 bytelen));
+VIRTUAL U8* utf16_to_utf8_reversed _((U16* p, U8 *d, I32 bytelen));
+VIRTUAL I32 utf8_distance _((U8 *a, U8 *b));
+VIRTUAL U8* utf8_hop _((U8 *s, I32 off));
+VIRTUAL UV utf8_to_uv _((U8 *s, I32* retlen));
+VIRTUAL U8* uv_to_utf8 _((U8 *d, UV uv));
VIRTUAL void vivify_defelem _((SV* sv));
VIRTUAL void vivify_ref _((SV* sv, U32 to_what));
VIRTUAL I32 wait4pid _((int pid, int* statusp, int flags));
VIRTUAL void warn _((const char* pat,...));
-#ifdef DEBUGGING
-void watch _((char** addr));
-#endif
+VIRTUAL void warner _((U32 err, const char* pat,...));
+VIRTUAL void watch _((char** addr));
VIRTUAL I32 whichsig _((char* sig));
VIRTUAL int yyerror _((char* s));
VIRTUAL int yylex _((void));
protected:
void hsplit _((HV *hv));
void hfreeentries _((HV *hv));
-HE* more_he _((void));
+void more_he _((void));
HE* new_he _((void));
void del_he _((HE *p));
HEK *save_hek _((char *str, I32 len, U32 hash));
IV asIV _((SV* sv));
UV asUV _((SV* sv));
SV *more_sv _((void));
-XPVIV *more_xiv _((void));
-XPVNV *more_xnv _((void));
-XPV *more_xpv _((void));
-XRV *more_xrv _((void));
+void more_xiv _((void));
+void more_xnv _((void));
+void more_xpv _((void));
+void more_xrv _((void));
XPVIV *new_xiv _((void));
XPVNV *new_xnv _((void));
XPV *new_xpv _((void));
void sv_mortalgrow _((void));
void sv_unglob _((SV* sv));
void sv_check_thinkfirst _((SV *sv));
-
-SV *newSVpvn _((char *s, STRLEN len));
-
-void sv_catpv_mg _((SV *sv, char *ptr));
-void sv_catpvf_mg _((SV *sv, const char* pat, ...));
-void sv_catpvn_mg _((SV *sv, char *ptr, STRLEN len));
-void sv_catsv_mg _((SV *dstr, SV *sstr));
-void sv_setiv_mg _((SV *sv, IV i));
-void sv_setnv_mg _((SV *sv, double num));
-void sv_setsv_mg _((SV *dstr, SV *sstr));
-void sv_setuv_mg _((SV *sv, UV u));
-void sv_setpv_mg _((SV *sv, const char *ptr));
-void sv_setpvf_mg _((SV *sv, const char* pat, ...));
-void sv_setpviv_mg _((SV *sv, IV iv));
-void sv_setpvn_mg _((SV *sv, const char *ptr, STRLEN len));
-void sv_usepvn_mg _((SV *sv, char *ptr, STRLEN len));
+I32 avhv_index_sv _((SV* sv));
void do_report_used _((SV *sv));
void do_clean_objs _((SV *sv));
typedef I32 (CPerlObj::*SVCOMPARE) _((SV*, SV*));
void qsortsv _((SV ** array, size_t num_elts, SVCOMPARE f));
I32 sortcv _((SV *a, SV *b));
-void save_magic _((MGS *mgs, SV *sv));
+void save_magic _((I32 mgs_ix, SV *sv));
int magic_methpack _((SV *sv, MAGIC *mg, char *meth));
int magic_methcall _((MAGIC *mg, char *meth, I32 flags, int n, SV *val));
OP * doform _((CV *cv, GV *gv, OP *retop));
I32 dopoptolabel _((char *label));
I32 dopoptoloop _((I32 startingblock));
I32 dopoptosub _((I32 startingblock));
+I32 dopoptosub_at _((PERL_CONTEXT* cxstk, I32 startingblock));
void save_lines _((AV *array, SV *sv));
OP *doeval _((int gimme, OP** startop));
SV *mul128 _((SV *sv, U8 m));
int div128 _((SV *pnum, bool *done));
int runops_standard _((void));
-#ifdef DEBUGGING
int runops_debug _((void));
-#endif
+
void check_uni _((void));
void force_next _((I32 type));
char *force_version _((char *start));
char *scan_heredoc _((char *s));
char *scan_ident _((char *s, char *send, char *dest, STRLEN destlen, I32 ck_uni));
char *scan_inputsymbol _((char *start));
-char *scan_pat _((char *start));
+char *scan_pat _((char *start, I32 type));
char *scan_str _((char *start));
char *scan_subst _((char *start));
char *scan_trans _((char *start));
int uni _((I32 f, char *s));
#endif
char * filter_gets _((SV *sv, PerlIO *fp, STRLEN append));
+SV *new_constant _((char *s, STRLEN len, char *key, SV *sv, SV *pv, char *type));
int ao _((int toketype));
void depcom _((void));
#ifdef WIN32
void find_beginning _((void));
void forbid_setid _((char *));
void incpush _((char *, int));
+void init_interp _((void));
void init_ids _((void));
void init_debugger _((void));
void init_lexer _((void));
void open_script _((char *, bool, SV *, int *fd));
void usage _((char *));
void validate_suid _((char *, char*, int));
+int emulate_eaccess _((const char* path, int mode));
regnode *reg _((I32, I32 *));
regnode *reganode _((U8, U32));
regnode *regatom _((I32 *));
regnode *regbranch _((I32 *, I32));
void regc _((U8, char *));
+void reguni _((UV, char *, I32*));
regnode *regclass _((void));
+regnode *regclassutf8 _((void));
I32 regcurly _((char *));
regnode *reg_node _((U8));
regnode *regpiece _((I32 *));
void regoptail _((regnode *, regnode *));
void regset _((char *, I32));
void regtail _((regnode *, regnode *));
+char* regwhite _((char *, char *));
char* nextchar _((void));
regnode *dumpuntil _((regnode *start, regnode *node, regnode *last, SV* sv, I32 l));
void scan_commit _((scan_data_t *data));
I32 regrepeat_hard _((regnode *p, I32 max, I32 *lp));
I32 regtry _((regexp *prog, char *startpos));
bool reginclass _((char *p, I32 c));
+bool reginclassutf8 _((regnode *f, U8* p));
CHECKPOINT regcppush _((I32 parenfloor));
char * regcppop _((void));
+char * regcp_set_to _((I32 ss));
+void cache_re _((regexp *prog));
+U8 * reghop _((U8 *pos, I32 off));
+U8 * reghopmaybe _((U8 *pos, I32 off));
void dump _((char *pat,...));
#ifdef WIN32
int do_aspawn _((void *vreally, void **vmark, void **vsp));
#ifdef DEBUGGING
void del_sv _((SV *p));
-void debprof _((OP *o));
#endif
+void debprof _((OP *o));
void *bset_obj_store _((void *obj, I32 ix));
-#ifdef INDIRECT_BGET_MACROS
-void byterun _((struct bytestream bs));
-#else
-void byterun _((PerlIO *fp));
-#endif /* INDIRECT_BGET_MACROS */
-
OP *new_logop _((I32 type, I32 flags, OP **firstp, OP **otherp));
+I32 do_trans_CC_simple _((SV *sv));
+I32 do_trans_CC_count _((SV *sv));
+I32 do_trans_CC_complex _((SV *sv));
+I32 do_trans_UU_simple _((SV *sv));
+I32 do_trans_UU_count _((SV *sv));
+I32 do_trans_UU_complex _((SV *sv));
+I32 do_trans_UC_simple _((SV *sv));
+I32 do_trans_CU_simple _((SV *sv));
+I32 do_trans_UC_trivial _((SV *sv));
+I32 do_trans_CU_trivial _((SV *sv));
+
#define PPDEF(s) OP* CPerlObj::s _((ARGSproto));
public:
-PPDEF(pp_aassign)
-PPDEF(pp_abs)
-PPDEF(pp_accept)
-PPDEF(pp_add)
-PPDEF(pp_aelem)
-PPDEF(pp_aelemfast)
-PPDEF(pp_alarm)
-PPDEF(pp_and)
-PPDEF(pp_andassign)
-PPDEF(pp_anoncode)
-PPDEF(pp_anonhash)
-PPDEF(pp_anonlist)
-PPDEF(pp_aslice)
-PPDEF(pp_atan2)
-PPDEF(pp_av2arylen)
-PPDEF(pp_backtick)
-PPDEF(pp_bind)
-PPDEF(pp_binmode)
-PPDEF(pp_bit_and)
-PPDEF(pp_bit_or)
-PPDEF(pp_bit_xor)
-PPDEF(pp_bless)
-PPDEF(pp_caller)
-PPDEF(pp_chdir)
-PPDEF(pp_chmod)
-PPDEF(pp_chomp)
-PPDEF(pp_chop)
-PPDEF(pp_chown)
-PPDEF(pp_chr)
-PPDEF(pp_chroot)
-PPDEF(pp_close)
-PPDEF(pp_closedir)
-PPDEF(pp_complement)
-PPDEF(pp_concat)
-PPDEF(pp_cond_expr)
-PPDEF(pp_connect)
-PPDEF(pp_const)
-PPDEF(pp_cos)
-PPDEF(pp_crypt)
-PPDEF(pp_cswitch)
-PPDEF(pp_dbmclose)
-PPDEF(pp_dbmopen)
-PPDEF(pp_dbstate)
-PPDEF(pp_defined)
-PPDEF(pp_delete)
-PPDEF(pp_die)
-PPDEF(pp_divide)
-PPDEF(pp_dofile)
-PPDEF(pp_dump)
-PPDEF(pp_each)
-PPDEF(pp_egrent)
-PPDEF(pp_ehostent)
-PPDEF(pp_enetent)
-PPDEF(pp_enter)
-PPDEF(pp_entereval)
-PPDEF(pp_enteriter)
-PPDEF(pp_enterloop)
-PPDEF(pp_entersub)
-PPDEF(pp_entertry)
-PPDEF(pp_enterwrite)
-PPDEF(pp_eof)
-PPDEF(pp_eprotoent)
-PPDEF(pp_epwent)
-PPDEF(pp_eq)
-PPDEF(pp_eservent)
-PPDEF(pp_exec)
-PPDEF(pp_exists)
-PPDEF(pp_exit)
-PPDEF(pp_exp)
-PPDEF(pp_fcntl)
-PPDEF(pp_fileno)
-PPDEF(pp_flip)
-PPDEF(pp_flock)
-PPDEF(pp_flop)
-PPDEF(pp_fork)
-PPDEF(pp_formline)
-PPDEF(pp_ftatime)
-PPDEF(pp_ftbinary)
-PPDEF(pp_ftblk)
-PPDEF(pp_ftchr)
-PPDEF(pp_ftctime)
-PPDEF(pp_ftdir)
-PPDEF(pp_fteexec)
-PPDEF(pp_fteowned)
-PPDEF(pp_fteread)
-PPDEF(pp_ftewrite)
-PPDEF(pp_ftfile)
-PPDEF(pp_ftis)
-PPDEF(pp_ftlink)
-PPDEF(pp_ftmtime)
-PPDEF(pp_ftpipe)
-PPDEF(pp_ftrexec)
-PPDEF(pp_ftrowned)
-PPDEF(pp_ftrread)
-PPDEF(pp_ftrwrite)
-PPDEF(pp_ftsgid)
-PPDEF(pp_ftsize)
-PPDEF(pp_ftsock)
-PPDEF(pp_ftsuid)
-PPDEF(pp_ftsvtx)
-PPDEF(pp_fttext)
-PPDEF(pp_fttty)
-PPDEF(pp_ftzero)
-PPDEF(pp_ge)
-PPDEF(pp_gelem)
-PPDEF(pp_getc)
-PPDEF(pp_getlogin)
-PPDEF(pp_getpeername)
-PPDEF(pp_getpgrp)
-PPDEF(pp_getppid)
-PPDEF(pp_getpriority)
-PPDEF(pp_getsockname)
-PPDEF(pp_ggrent)
-PPDEF(pp_ggrgid)
-PPDEF(pp_ggrnam)
-PPDEF(pp_ghbyaddr)
-PPDEF(pp_ghbyname)
-PPDEF(pp_ghostent)
-PPDEF(pp_glob)
-PPDEF(pp_gmtime)
-PPDEF(pp_gnbyaddr)
-PPDEF(pp_gnbyname)
-PPDEF(pp_gnetent)
-PPDEF(pp_goto)
-PPDEF(pp_gpbyname)
-PPDEF(pp_gpbynumber)
-PPDEF(pp_gprotoent)
-PPDEF(pp_gpwent)
-PPDEF(pp_gpwnam)
-PPDEF(pp_gpwuid)
-PPDEF(pp_grepstart)
-PPDEF(pp_grepwhile)
-PPDEF(pp_gsbyname)
-PPDEF(pp_gsbyport)
-PPDEF(pp_gservent)
-PPDEF(pp_gsockopt)
-PPDEF(pp_gt)
-PPDEF(pp_gv)
-PPDEF(pp_gvsv)
-PPDEF(pp_helem)
-PPDEF(pp_hex)
-PPDEF(pp_hslice)
-PPDEF(pp_i_add)
-PPDEF(pp_i_divide)
-PPDEF(pp_i_eq)
-PPDEF(pp_i_ge)
-PPDEF(pp_i_gt)
-PPDEF(pp_i_le)
-PPDEF(pp_i_lt)
-PPDEF(pp_i_modulo)
-PPDEF(pp_i_multiply)
-PPDEF(pp_i_ncmp)
-PPDEF(pp_i_ne)
-PPDEF(pp_i_negate)
-PPDEF(pp_i_subtract)
-PPDEF(pp_index)
-PPDEF(pp_indread)
-PPDEF(pp_int)
-PPDEF(pp_ioctl)
-PPDEF(pp_iter)
-PPDEF(pp_join)
-PPDEF(pp_keys)
-PPDEF(pp_kill)
-PPDEF(pp_last)
-PPDEF(pp_lc)
-PPDEF(pp_lcfirst)
-PPDEF(pp_le)
-PPDEF(pp_leave)
-PPDEF(pp_leaveeval)
-PPDEF(pp_leaveloop)
-PPDEF(pp_leavesub)
-PPDEF(pp_leavetry)
-PPDEF(pp_leavewrite)
-PPDEF(pp_left_shift)
-PPDEF(pp_length)
-PPDEF(pp_lineseq)
-PPDEF(pp_link)
-PPDEF(pp_list)
-PPDEF(pp_listen)
-PPDEF(pp_localtime)
-PPDEF(pp_lock)
-PPDEF(pp_log)
-PPDEF(pp_lslice)
-PPDEF(pp_lstat)
-PPDEF(pp_lt)
-PPDEF(pp_mapstart)
-PPDEF(pp_mapwhile)
-PPDEF(pp_match)
-PPDEF(pp_method)
-PPDEF(pp_mkdir)
-PPDEF(pp_modulo)
-PPDEF(pp_msgctl)
-PPDEF(pp_msgget)
-PPDEF(pp_msgrcv)
-PPDEF(pp_msgsnd)
-PPDEF(pp_multiply)
-PPDEF(pp_ncmp)
-PPDEF(pp_ne)
-PPDEF(pp_negate)
-PPDEF(pp_next)
-PPDEF(pp_nextstate)
-PPDEF(pp_not)
-PPDEF(pp_nswitch)
-PPDEF(pp_null)
-PPDEF(pp_oct)
-PPDEF(pp_open)
-PPDEF(pp_open_dir)
-PPDEF(pp_or)
-PPDEF(pp_orassign)
-PPDEF(pp_ord)
-PPDEF(pp_pack)
-PPDEF(pp_padany)
-PPDEF(pp_padav)
-PPDEF(pp_padhv)
-PPDEF(pp_padsv)
-PPDEF(pp_pipe_op)
-PPDEF(pp_pop)
-PPDEF(pp_pos)
-PPDEF(pp_postdec)
-PPDEF(pp_postinc)
-PPDEF(pp_pow)
-PPDEF(pp_predec)
-PPDEF(pp_preinc)
-PPDEF(pp_print)
-PPDEF(pp_prototype)
-PPDEF(pp_prtf)
-PPDEF(pp_push)
-PPDEF(pp_pushmark)
-PPDEF(pp_pushre)
-PPDEF(pp_quotemeta)
-PPDEF(pp_rand)
-PPDEF(pp_range)
-PPDEF(pp_rcatline)
-PPDEF(pp_read)
-PPDEF(pp_readdir)
-PPDEF(pp_readline)
-PPDEF(pp_readlink)
-PPDEF(pp_recv)
-PPDEF(pp_redo)
-PPDEF(pp_ref)
-PPDEF(pp_refgen)
-PPDEF(pp_regcmaybe)
-PPDEF(pp_regcomp)
-PPDEF(pp_rename)
-PPDEF(pp_repeat)
-PPDEF(pp_require)
-PPDEF(pp_reset)
-PPDEF(pp_return)
-PPDEF(pp_reverse)
-PPDEF(pp_rewinddir)
-PPDEF(pp_right_shift)
-PPDEF(pp_rindex)
-PPDEF(pp_rmdir)
-PPDEF(pp_rv2av)
-PPDEF(pp_rv2cv)
-PPDEF(pp_rv2gv)
-PPDEF(pp_rv2hv)
-PPDEF(pp_rv2sv)
-PPDEF(pp_sassign)
-PPDEF(pp_scalar)
-PPDEF(pp_schomp)
-PPDEF(pp_schop)
-PPDEF(pp_scmp)
-PPDEF(pp_scope)
-PPDEF(pp_seek)
-PPDEF(pp_seekdir)
-PPDEF(pp_select)
-PPDEF(pp_semctl)
-PPDEF(pp_semget)
-PPDEF(pp_semop)
-PPDEF(pp_send)
-PPDEF(pp_seq)
-PPDEF(pp_setpgrp)
-PPDEF(pp_setpriority)
-PPDEF(pp_sge)
-PPDEF(pp_sgrent)
-PPDEF(pp_sgt)
-PPDEF(pp_shift)
-PPDEF(pp_shmctl)
-PPDEF(pp_shmget)
-PPDEF(pp_shmread)
-PPDEF(pp_shmwrite)
-PPDEF(pp_shostent)
-PPDEF(pp_shutdown)
-PPDEF(pp_sin)
-PPDEF(pp_sle)
-PPDEF(pp_sleep)
-PPDEF(pp_slt)
-PPDEF(pp_sne)
-PPDEF(pp_snetent)
-PPDEF(pp_socket)
-PPDEF(pp_sockpair)
-PPDEF(pp_sort)
-PPDEF(pp_splice)
-PPDEF(pp_split)
-PPDEF(pp_sprintf)
-PPDEF(pp_sprotoent)
-PPDEF(pp_spwent)
-PPDEF(pp_sqrt)
-PPDEF(pp_srand)
-PPDEF(pp_srefgen)
-PPDEF(pp_sselect)
-PPDEF(pp_sservent)
-PPDEF(pp_ssockopt)
-PPDEF(pp_stat)
-PPDEF(pp_stringify)
-PPDEF(pp_stub)
-PPDEF(pp_study)
-PPDEF(pp_subst)
-PPDEF(pp_substcont)
-PPDEF(pp_substr)
-PPDEF(pp_subtract)
-PPDEF(pp_symlink)
-PPDEF(pp_syscall)
-PPDEF(pp_sysopen)
-PPDEF(pp_sysread)
-PPDEF(pp_sysseek)
-PPDEF(pp_system)
-PPDEF(pp_syswrite)
-PPDEF(pp_tell)
-PPDEF(pp_telldir)
-PPDEF(pp_threadsv)
-PPDEF(pp_tie)
-PPDEF(pp_tied)
-PPDEF(pp_time)
-PPDEF(pp_tms)
-PPDEF(pp_trans)
-PPDEF(pp_truncate)
-PPDEF(pp_uc)
-PPDEF(pp_ucfirst)
-PPDEF(pp_umask)
-PPDEF(pp_undef)
-PPDEF(pp_unlink)
-PPDEF(pp_unpack)
-PPDEF(pp_unshift)
-PPDEF(pp_unstack)
-PPDEF(pp_untie)
-PPDEF(pp_utime)
-PPDEF(pp_values)
-PPDEF(pp_vec)
-PPDEF(pp_wait)
-PPDEF(pp_waitpid)
-PPDEF(pp_wantarray)
-PPDEF(pp_warn)
-PPDEF(pp_xor)
+
+#include "pp_proto.h"
OP * ck_ftst _((OP *o));
OP *ck_anoncode _((OP *o));
void restore_expect _((void *e));
void restore_lex_expect _((void *e));
void yydestruct _((void *ptr));
-VIRTUAL int fprintf _((PerlIO *, const char *, ...));
+VIRTUAL int fprintf _((PerlIO *pf, const char *pat, ...));
+VIRTUAL SV** get_specialsv_list _((void));
#ifdef WIN32
-VIRTUAL int& ErrorNo();
+VIRTUAL int& ErrorNo _((void));
#endif /* WIN32 */
#else /* !PERL_OBJECT */
END_EXTERN_C
#endif /* PERL_OBJECT */
+#ifdef INDIRECT_BGET_MACROS
+VIRTUAL void byterun _((struct bytestream bs));
+#else
+VIRTUAL void byterun _((PerlIO *fp));
+#endif /* INDIRECT_BGET_MACROS */
+
+VIRTUAL void sv_catpvf_mg _((SV *sv, const char* pat, ...));
+VIRTUAL void sv_catpv_mg _((SV *sv, char *ptr));
+VIRTUAL void sv_catpvn_mg _((SV *sv, char *ptr, STRLEN len));
+VIRTUAL void sv_catsv_mg _((SV *dstr, SV *sstr));
+VIRTUAL void sv_setpvf_mg _((SV *sv, const char* pat, ...));
+VIRTUAL void sv_setiv_mg _((SV *sv, IV i));
+VIRTUAL void sv_setpviv_mg _((SV *sv, IV iv));
+VIRTUAL void sv_setuv_mg _((SV *sv, UV u));
+VIRTUAL void sv_setnv_mg _((SV *sv, double num));
+VIRTUAL void sv_setpv_mg _((SV *sv, const char *ptr));
+VIRTUAL void sv_setpvn_mg _((SV *sv, const char *ptr, STRLEN len));
+VIRTUAL void sv_setsv_mg _((SV *dstr, SV *sstr));
+VIRTUAL void sv_usepvn_mg _((SV *sv, char *ptr, STRLEN len));
+
+/* New virtual functions must be added here to maintain binary
+ * compatablity with PERL_OBJECT
+ */
+