From: Dave Mitchell Date: Sat, 14 Dec 2002 19:16:49 +0000 (+0000) Subject: Re: [jhi@iki.fi: enums are not nums] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c7c737cb28949ebe168789b54bc0a5da1ada7664;p=p5sagit%2Fp5-mst-13.2.git Re: [jhi@iki.fi: enums are not nums] Message-ID: <20021214191649.B3992@fdgroup.com> p4raw-id: //depot/perl@18311 --- diff --git a/embed.fnc b/embed.fnc index ace2ade..00c6e94 100644 --- a/embed.fnc +++ b/embed.fnc @@ -1328,7 +1328,7 @@ s |void |deb_stack_n |SV** stack_base|I32 stack_min \ |I32 stack_max|I32 mark_min|I32 mark_max #endif -pd |PADLIST*|pad_new |padnew_flags flags +pd |PADLIST*|pad_new |int flags pd |void |pad_undef |CV* cv pd |PADOFFSET|pad_add_name |char *name\ |HV* typestash|HV* ourstash \ diff --git a/pad.c b/pad.c index 560638f..634b762 100644 --- a/pad.c +++ b/pad.c @@ -111,7 +111,7 @@ can be OR'ed together: */ PADLIST * -Perl_pad_new(pTHX_ padnew_flags flags) +Perl_pad_new(pTHX_ int flags) { AV *padlist, *padname, *pad, *a0; diff --git a/pad.h b/pad.h index e61b409..54e8bc1 100644 --- a/pad.h +++ b/pad.h @@ -34,11 +34,9 @@ typedef U64TYPE PADOFFSET; /* flags for the pad_new() function */ -typedef enum { - padnew_CLONE = 1, /* this pad is for a cloned CV */ - padnew_SAVE = 2, /* save old globals */ - padnew_SAVESUB = 4 /* also save extra stuff for start of sub */ -} padnew_flags; +#define padnew_CLONE 1 /* this pad is for a cloned CV */ +#define padnew_SAVE 2 /* save old globals */ +#define padnew_SAVESUB 4 /* also save extra stuff for start of sub */ /* values for the pad_tidy() function */ diff --git a/pod/perlintern.pod b/pod/perlintern.pod index 0d0b19d..d6cd333 100644 --- a/pod/perlintern.pod +++ b/pod/perlintern.pod @@ -652,7 +652,7 @@ can be OR'ed together: padnew_SAVE save old globals padnew_SAVESUB also save extra stuff for start of sub - PADLIST* pad_new(padnew_flags flags) + PADLIST* pad_new(int flags) =for hackers Found in file pad.c diff --git a/proto.h b/proto.h index fca42ed..78841c2 100644 --- a/proto.h +++ b/proto.h @@ -1359,7 +1359,7 @@ PERL_CALLCONV void Perl_deb_stack_all(pTHX); STATIC void S_deb_stack_n(pTHX_ SV** stack_base, I32 stack_min, I32 stack_max, I32 mark_min, I32 mark_max); #endif -PERL_CALLCONV PADLIST* Perl_pad_new(pTHX_ padnew_flags flags); +PERL_CALLCONV PADLIST* Perl_pad_new(pTHX_ int flags); PERL_CALLCONV void Perl_pad_undef(pTHX_ CV* cv); PERL_CALLCONV PADOFFSET Perl_pad_add_name(pTHX_ char *name, HV* typestash, HV* ourstash, bool clone); PERL_CALLCONV PADOFFSET Perl_pad_add_anon(pTHX_ SV* sv, OPCODE op_type);