/*
* embed.h
*
- * Copyright (c) 1997-2002, Larry Wall
+ * Copyright (c) 1997-2003, Larry Wall
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
/* (Doing namespace management portably in C is really gross.) */
-/* NO_EMBED is no longer supported. i.e. EMBED is always active. */
+/* By defining PERL_NO_SHORT_NAMES (not done by default) the short forms
+ * (like warn instead of Perl_warn) for the API are not defined.
+ * Not defining the short forms is a good thing for cleaner embedding. */
+
+#ifndef PERL_NO_SHORT_NAMES
/* Hide global symbols */
#define magic_setpos Perl_magic_setpos
#endif
#ifdef PERL_CORE
+#define magic_setregexp Perl_magic_setregexp
+#endif
+#ifdef PERL_CORE
#define magic_setsig Perl_magic_setsig
#endif
#ifdef PERL_CORE
#ifdef PERL_CORE
#define peep Perl_peep
#endif
-#ifdef PERL_CORE
-#endif
#if defined(USE_REENTRANT_API)
#define reentrant_size Perl_reentrant_size
#define reentrant_init Perl_reentrant_init
#define sv_setpvf Perl_sv_setpvf
#define sv_vsetpvf Perl_sv_vsetpvf
#define sv_setiv Perl_sv_setiv
+#define sv_setpviv Perl_sv_setpviv
#define sv_setuv Perl_sv_setuv
#define sv_setnv Perl_sv_setnv
#define sv_setref_iv Perl_sv_setref_iv
#define wait4pid Perl_wait4pid
#endif
#ifdef PERL_CORE
+#define parse_unicode_opts Perl_parse_unicode_opts
+#endif
+#ifdef PERL_CORE
#define report_evil_fh Perl_report_evil_fh
#endif
#ifdef PERL_CORE
#define sv_setpvf_mg Perl_sv_setpvf_mg
#define sv_vsetpvf_mg Perl_sv_vsetpvf_mg
#define sv_setiv_mg Perl_sv_setiv_mg
+#define sv_setpviv_mg Perl_sv_setpviv_mg
#define sv_setuv_mg Perl_sv_setuv_mg
#define sv_setnv_mg Perl_sv_setnv_mg
#define sv_setpv_mg Perl_sv_setpv_mg
#define sv_copypv Perl_sv_copypv
#define my_atof2 Perl_my_atof2
#define my_socketpair Perl_my_socketpair
+#ifdef PERL_COPY_ON_WRITE
+#ifdef PERL_CORE
+#define sv_setsv_cow Perl_sv_setsv_cow
+#endif
+#endif
#if defined(USE_PERLIO) && !defined(USE_SFIO)
#define PerlIO_close Perl_PerlIO_close
#define PerlIO_fill Perl_PerlIO_fill
#define magic_setpos(a,b) Perl_magic_setpos(aTHX_ a,b)
#endif
#ifdef PERL_CORE
+#define magic_setregexp(a,b) Perl_magic_setregexp(aTHX_ a,b)
+#endif
+#ifdef PERL_CORE
#define magic_setsig(a,b) Perl_magic_setsig(aTHX_ a,b)
#endif
#ifdef PERL_CORE
#define sv_eq(a,b) Perl_sv_eq(aTHX_ a,b)
#define sv_free(a) Perl_sv_free(aTHX_ a)
#ifdef PERL_CORE
+#endif
+#ifdef PERL_CORE
#define sv_free_arenas() Perl_sv_free_arenas(aTHX)
#endif
#define sv_gets(a,b,c) Perl_sv_gets(aTHX_ a,b,c)
#define sv_reset(a,b) Perl_sv_reset(aTHX_ a,b)
#define sv_vsetpvf(a,b,c) Perl_sv_vsetpvf(aTHX_ a,b,c)
#define sv_setiv(a,b) Perl_sv_setiv(aTHX_ a,b)
+#define sv_setpviv(a,b) Perl_sv_setpviv(aTHX_ a,b)
#define sv_setuv(a,b) Perl_sv_setuv(aTHX_ a,b)
#define sv_setnv(a,b) Perl_sv_setnv(aTHX_ a,b)
#define sv_setref_iv(a,b,c) Perl_sv_setref_iv(aTHX_ a,b,c)
#define wait4pid(a,b,c) Perl_wait4pid(aTHX_ a,b,c)
#endif
#ifdef PERL_CORE
+#define parse_unicode_opts(a) Perl_parse_unicode_opts(aTHX_ a)
+#endif
+#ifdef PERL_CORE
#define report_evil_fh(a,b,c) Perl_report_evil_fh(aTHX_ a,b,c)
#endif
#ifdef PERL_CORE
#define sv_catsv_mg(a,b) Perl_sv_catsv_mg(aTHX_ a,b)
#define sv_vsetpvf_mg(a,b,c) Perl_sv_vsetpvf_mg(aTHX_ a,b,c)
#define sv_setiv_mg(a,b) Perl_sv_setiv_mg(aTHX_ a,b)
+#define sv_setpviv_mg(a,b) Perl_sv_setpviv_mg(aTHX_ a,b)
#define sv_setuv_mg(a,b) Perl_sv_setuv_mg(aTHX_ a,b)
#define sv_setnv_mg(a,b) Perl_sv_setnv_mg(aTHX_ a,b)
#define sv_setpv_mg(a,b) Perl_sv_setpv_mg(aTHX_ a,b)
#define sv_copypv(a,b) Perl_sv_copypv(aTHX_ a,b)
#define my_atof2(a,b) Perl_my_atof2(aTHX_ a,b)
#define my_socketpair Perl_my_socketpair
+#ifdef PERL_COPY_ON_WRITE
+#ifdef PERL_CORE
+#define sv_setsv_cow(a,b) Perl_sv_setsv_cow(aTHX_ a,b)
+#endif
+#endif
#if defined(USE_PERLIO) && !defined(USE_SFIO)
#define PerlIO_close(a) Perl_PerlIO_close(aTHX_ a)
#define PerlIO_fill(a) Perl_PerlIO_fill(aTHX_ a)
#endif /* PERL_IMPLICIT_CONTEXT */
+#endif /* #ifndef PERL_NO_SHORT_NAMES */
+
/* Compatibility stubs. Compile extensions with -DPERL_NOCOMPAT to
disable them.
an extra argument but grab the context pointer using the macro
dTHX.
*/
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_NO_SHORT_NAMES)
# define croak Perl_croak_nocontext
# define deb Perl_deb_nocontext
# define die Perl_die_nocontext