Skip to content

Commit

Permalink
comment for the trick to enable constructors in static lib & fix codi…
Browse files Browse the repository at this point in the history
…ng style
  • Loading branch information
aquynh committed Jan 9, 2014
1 parent e94bf72 commit 625b5bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ cs_err (*arch_init[MAX_ARCH])(cs_struct *) = { NULL };
cs_err (*arch_option[MAX_ARCH]) (cs_struct *, cs_opt_type, size_t value) = { NULL };
void (*arch_destroy[MAX_ARCH]) (cs_struct *) = { NULL };

// we need this trick to enable module constructors in static lib
extern void enable_arm();
extern void enable_arm64();
extern void enable_mips();
extern void enable_x86();
extern void enable_powerpc();

void enable_construct() {
void enable_construct()
{
#ifdef CAPSTONE_HAS_ARM
enable_arm();
#endif
Expand Down

0 comments on commit 625b5bc

Please sign in to comment.