summaryrefslogtreecommitdiff
path: root/embed.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-08-14 21:13:52 -0600
committerKarl Williamson <public@khwilliamson.com>2013-09-24 11:36:15 -0600
commit09b2b2e6f2b6aae46dfa46b10931186a9531a1e0 (patch)
tree7b5c3eac1de1d0715a101e5590c3e83c161dab91 /embed.h
parentd1d040e539a86226d1a68f741e36ac5b3cfdbda9 (diff)
downloadperl-09b2b2e6f2b6aae46dfa46b10931186a9531a1e0.tar.gz
Make typedef fully typedef
The regcomp.c struct RExC_state_t has not been usable fully as a typedef, requiring the 'struct' at times. This has caused me, and I presume others, wasted time when we forget to use it under those circumstances when it should be used, but it's never been a big enough issue to cause me to spend tuits on it. But, working on something else, I finally came to the realization of what the problem is. It is because proto.h is #included before regcomp.h is, and so functions that are declared in proto.h that have something that is a RExC_state_t as a parameter don't know that it is a typedef because that is defined in regcomp.h. A way around this is already used for other similar structures, and that is to declare them in perl.h which is always read in before proto.h, leaving the definitions to regcomp.h. Thus proto.h knows enough to compile. The structure was already declared in perl.h; just not typedef'd. Otherwise proto.h would not know about it at all. This patch moves two regcomp.c related declarations in perl.h to the same section as the others, and changes the one for RExC_state_t to be a typedef. All the 'struct' uses are removed.
Diffstat (limited to 'embed.h')
-rw-r--r--embed.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/embed.h b/embed.h
index 7c6b4509ff..a060cced97 100644
--- a/embed.h
+++ b/embed.h
@@ -1564,9 +1564,6 @@
#define doform(a,b,c) S_doform(aTHX_ a,b,c)
#define space_join_names_mortal(a) S_space_join_names_mortal(aTHX_ a)
# endif
-# if defined(PERL_IN_REGCOMP_C)
-#define () (aTHX)
-# endif
# if defined(PERL_IN_SCOPE_C)
#define save_pushptri32ptr(a,b,c,d) S_save_pushptri32ptr(aTHX_ a,b,c,d)
#define save_scalar_at(a,b) S_save_scalar_at(aTHX_ a,b)