Skip to content

Commit

Permalink
Don't redefine MUTABLE_PTR if it's already there. (GH #23)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfsage committed Mar 18, 2016
1 parent bce8901 commit 40dc017
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion parts/inc/magic
Expand Up @@ -29,13 +29,15 @@ __UNDEFINED__ SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_E

__UNDEFINED__ HEf_SVKEY -2

#ifndef MUTABLE_PTR
#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
# define MUTABLE_PTR(p) ({ void *_p = (p); _p; })
#else
# define MUTABLE_PTR(p) ((void *) (p))
#endif
#endif

#define MUTABLE_SV(p) ((SV *)MUTABLE_PTR(p))
__UNDEFINED__ MUTABLE_SV(p) ((SV *)MUTABLE_PTR(p))

/* end of random bits */

Expand Down

0 comments on commit 40dc017

Please sign in to comment.