Skip to content

Commit edce846

Browse files
committed
Can now remove class-specific attributes API functions now that the generic system handles it
1 parent d7f4bab commit edce846

File tree

8 files changed

+356
-411
lines changed

8 files changed

+356
-411
lines changed

class.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -556,13 +556,6 @@ Perl_apply_attribute_isa(pTHX_
556556
}
557557
}
558558

559-
void
560-
Perl_class_apply_attributes(pTHX_ HV *stash, OP *attrlist)
561-
{
562-
PERL_ARGS_ASSERT_CLASS_APPLY_ATTRIBUTES;
563-
apply_attributes_sv((SV *)stash, attrlist, true);
564-
}
565-
566559
/*
567560
568561
Called when a compilation failure occurs when defining a class.
@@ -1169,23 +1162,6 @@ Perl_apply_attribute_writer(pTHX_ struct PerlAttributeTarget *target, SV *value,
11691162
CvIsMETHOD_on(cv);
11701163
}
11711164

1172-
void
1173-
Perl_class_apply_field_attributes(pTHX_ PADNAME *pn, OP *attrlist)
1174-
{
1175-
PERL_ARGS_ASSERT_CLASS_APPLY_FIELD_ATTRIBUTES;
1176-
1177-
/* We need to find the pad index, but PADNAME* doesn't store it.
1178-
*/
1179-
PADNAME **pns = PadnamelistARRAY(PL_comppad_name);
1180-
PADOFFSET padix;
1181-
for(padix = 0; padix <= PadnamelistMAX(PL_comppad_name); padix++)
1182-
if(pns[padix] == pn)
1183-
break;
1184-
1185-
assert(padix <= PadnamelistMAX(PL_comppad_name));
1186-
apply_attributes_lexical(padix, attrlist, true);
1187-
}
1188-
11891165
void
11901166
Perl_class_set_field_defop(pTHX_ PADNAME *pn, OPCODE defmode, OP *defop)
11911167
{

embed.fnc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4416,12 +4416,6 @@ Cp |void |class_add_ADJUST \
44164416
|NN CV *cv
44174417
Cp |void |class_add_field|NN HV *stash \
44184418
|NN PADNAME *pn
4419-
Cp |void |class_apply_attributes \
4420-
|NN HV *stash \
4421-
|NULLOK OP *attrlist
4422-
Cp |void |class_apply_field_attributes \
4423-
|NN PADNAME *pn \
4424-
|NULLOK OP *attrlist
44254419
Cp |void |class_prepare_initfield_parse
44264420
Cp |void |class_prepare_method_parse \
44274421
|NN CV *cv

embed.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2144,8 +2144,6 @@
21442144
defined(PERL_IN_TOKE_C)
21452145
# define class_add_ADJUST(a,b) Perl_class_add_ADJUST(aTHX_ a,b)
21462146
# define class_add_field(a,b) Perl_class_add_field(aTHX_ a,b)
2147-
# define class_apply_attributes(a,b) Perl_class_apply_attributes(aTHX_ a,b)
2148-
# define class_apply_field_attributes(a,b) Perl_class_apply_field_attributes(aTHX_ a,b)
21492147
# define class_prepare_initfield_parse() Perl_class_prepare_initfield_parse(aTHX)
21502148
# define class_prepare_method_parse(a) Perl_class_prepare_method_parse(aTHX_ a)
21512149
# define class_seal_stash(a) Perl_class_seal_stash(aTHX_ a)

0 commit comments

Comments
 (0)