+#ifndef PERL_CALLCONV
+# define PERL_CALLCONV
+#endif
+
#ifdef PERL_OBJECT
-#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 char * get_no_modify _((void));
VIRTUAL U32 * get_opargs _((void));
VIRTUAL I32 cxinc _((void));
-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 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));
VIRTUAL void dump_eval _((void));
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_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 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_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 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));
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,...));
+VIRTUAL void warner _((U32 err, const char* pat,...));
VIRTUAL void watch _((char** addr));
VIRTUAL I32 whichsig _((char* sig));
VIRTUAL int yyerror _((char* s));
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_check_thinkfirst _((SV *sv));
I32 avhv_index_sv _((SV* sv));
-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));
-
void do_report_used _((SV *sv));
void do_clean_objs _((SV *sv));
void do_clean_named_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));
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 *));
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));
void *bset_obj_store _((void *obj, I32 ix));
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:
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
+ */
+