diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-12 01:55:15 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-12 01:55:15 +0000 |
commit | c5be433b5c5658093bc9cae4434721a0b63e7a85 (patch) | |
tree | b5e25d83702fd5b6ebb6108c8cdf104a09f97040 /lib | |
parent | ed7ab888f26e9b2a3bcf98806b630e993179f8b4 (diff) | |
download | perl-c5be433b5c5658093bc9cae4434721a0b63e7a85.tar.gz |
yet more cleanups of the PERL_OBJECT, MULTIPLICITY and USE_THREADS
builds; passing the implicit context is unified among the three
flavors; PERL_IMPLICIT_CONTEXT is auto-enabled under all three
flavors (see the top of perl.h) for testing; all varargs functions
foo() have a va_list-taking variant vfoo() for generating the
context-free versions; the PERL_OBJECT build should now be
hyper-compatible with CPAN extensions (C++ is totally out of
the picture)
result has only been tested on Windows
TODO: write docs on the THX rationale and idiomatic usage of
the Perl API
p4raw-id: //depot/perl@3667
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExtUtils/MM_Unix.pm | 7 | ||||
-rw-r--r-- | lib/ExtUtils/MM_Win32.pm | 5 | ||||
-rw-r--r-- | lib/ExtUtils/MakeMaker.pm | 3 | ||||
-rwxr-xr-x | lib/ExtUtils/xsubpp | 39 | ||||
-rw-r--r-- | lib/base.pm | 2 |
5 files changed, 10 insertions, 46 deletions
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 03bb43568e..0e4712c4f1 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -376,9 +376,8 @@ sub cflags { $self->{uc $_} ||= $cflags{$_} } - if ($self->{CAPI} && $Is_PERL_OBJECT) { - $self->{CCFLAGS} =~ s/-DPERL_OBJECT(\s|$)//; - $self->{CCFLAGS} .= ' -DPERL_CAPI '; + if ($Is_PERL_OBJECT) { + $self->{CCFLAGS} =~ s/-DPERL_OBJECT(\b|$)/-DPERL_CAPI/g; if ($Is_Win32 && $Config{'cc'} =~ /^cl.exe/i) { # Turn off C++ mode of the MSC compiler $self->{CCFLAGS} =~ s/-TP(\s|$)//; @@ -3415,7 +3414,7 @@ sub tool_xsubpp { } } - my $xsubpp = $self->{CAPI} ? "xsubpp -object_capi" : "xsubpp"; + my $xsubpp = "xsubpp"; return qq{ XSUBPPDIR = $xsdir diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index 5191bc81ec..f6d19a26c5 100644 --- a/lib/ExtUtils/MM_Win32.pm +++ b/lib/ExtUtils/MM_Win32.pm @@ -479,11 +479,6 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)\.exists sub perl_archive { my ($self) = @_; - if($OBJ) { - if ($self->{CAPI}) { - return '$(PERL_INC)\perlCAPI$(LIB_EXT)'; - } - } return '$(PERL_INC)\\'.$Config{'libperl'}; } diff --git a/lib/ExtUtils/MakeMaker.pm b/lib/ExtUtils/MakeMaker.pm index 42bf4162c5..6fe9339b77 100644 --- a/lib/ExtUtils/MakeMaker.pm +++ b/lib/ExtUtils/MakeMaker.pm @@ -1226,6 +1226,9 @@ currently used by MakeMaker but may be handy in Makefile.PLs. =item CAPI +[This attribute is obsolete in Perl 5.6. PERL_OBJECT builds are C-compatible +by default.] + Switch to force usage of the Perl C API even when compiling for PERL_OBJECT. Note that this attribute is passed through to any recursive build, diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp index ac9ea74d23..e5c7e0989e 100755 --- a/lib/ExtUtils/xsubpp +++ b/lib/ExtUtils/xsubpp @@ -6,7 +6,7 @@ xsubpp - compiler to convert Perl XS code into C code =head1 SYNOPSIS -B<xsubpp> [B<-v>] [B<-C++>] [B<-except>] [B<-s pattern>] [B<-prototypes>] [B<-noversioncheck>] [B<-nolinenumbers>] [B<-typemap typemap>] [B<-object_capi>]... file.xs +B<xsubpp> [B<-v>] [B<-C++>] [B<-except>] [B<-s pattern>] [B<-prototypes>] [B<-noversioncheck>] [B<-nolinenumbers>] [B<-typemap typemap>] ... file.xs =head1 DESCRIPTION @@ -59,11 +59,7 @@ number. Prevents the inclusion of `#line' directives in the output. -=item B<-object_capi> - -Compile code as C in a PERL_OBJECT environment. - -back +=back =head1 ENVIRONMENT @@ -127,6 +123,7 @@ SWITCH: while (@ARGV and $ARGV[0] =~ /^-./) { $WantPrototypes = 1, next SWITCH if $flag eq 'prototypes'; $WantVersionChk = 0, next SWITCH if $flag eq 'noversioncheck'; $WantVersionChk = 1, next SWITCH if $flag eq 'versioncheck'; + # XXX left this in for compat $WantCAPI = 1, next SWITCH if $flag eq 'object_capi'; $except = " TRY", next SWITCH if $flag eq 'except'; push(@tm,shift), next SWITCH if $flag eq 'typemap'; @@ -1261,24 +1258,10 @@ print Q<<"EOF"; ##endif EOF -if ($WantCAPI) { -print Q<<"EOF"; -##ifdef PERL_CAPI -#XS(boot__CAPI_entry) -##else -EOF -} - print Q<<"EOF"; #XS(boot_$Module_cname) EOF -if ($WantCAPI) { -print Q<<"EOF"; -##endif /* PERL_CAPI */ -EOF -} - print Q<<"EOF"; #[[ # dXSARGS; @@ -1317,22 +1300,6 @@ print Q<<"EOF";; # EOF -if ($WantCAPI) { -print Q<<"EOF"; -##ifdef PERL_CAPI -##define XSCAPI(name) void name(void *pPerl, CV* cv) -# -##ifdef __cplusplus -#extern "C" -##endif -#XSCAPI(boot_$Module_cname) -#[[ -# boot_CAPI_handler(cv, boot__CAPI_entry, pPerl); -#]] -##endif /* PERL_CAPI */ -EOF -} - warn("Please specify prototyping behavior for $filename (see perlxs manual)\n") unless $ProtoUsed ; &Exit; diff --git a/lib/base.pm b/lib/base.pm index 9a733eada8..7fb3d2bcb9 100644 --- a/lib/base.pm +++ b/lib/base.pm @@ -56,7 +56,7 @@ sub import { # Only ignore "Can't locate" errors from our eval require. # Other fatal errors (syntax etc) must be reported. die if $@ && $@ !~ /^Can't locate .*? at \(eval /; - unless (defined %{"$base\::"}) { + unless (%{"$base\::"}) { require Carp; Carp::croak("Base class package \"$base\" is empty.\n", "\t(Perhaps you need to 'use' the module ", |