Skip to content

Commit

Permalink
Move java globals into the tls
Browse files Browse the repository at this point in the history
  • Loading branch information
trufae committed Feb 8, 2022
1 parent 837953a commit b19ad11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shlr/java/class.c
Expand Up @@ -13,7 +13,7 @@
#include "class.h"
#include "dsojson.h"

static PrintfCallback Eprintf =(PrintfCallback) printf;
static R_TH_LOCAL PrintfCallback Eprintf =(PrintfCallback) printf;
#ifdef IFDBG
#undef IFDBG
#endif
Expand Down Expand Up @@ -301,10 +301,10 @@ R_API ut32 U(r_bin_java_swap_uint)(ut32 x) {
return (Byte0 << 24) | (Byte1 << 8) | (Byte2 >> 8) | (Byte3 >> 24);
}

static bool R_BIN_JAVA_NULL_TYPE_INITTED = false;
static R_TH_LOCAL bool R_BIN_JAVA_NULL_TYPE_INITTED = false;
// XXX - this is a global variable used while parsing the class file
// this variable should DIE.
static RBinJavaObj *R_BIN_JAVA_GLOBAL_BIN = NULL;
static R_TH_LOCAL RBinJavaObj *R_BIN_JAVA_GLOBAL_BIN = NULL;
static RBinJavaAccessFlags FIELD_ACCESS_FLAGS[] = {
{ "public", R_BIN_JAVA_FIELD_ACC_PUBLIC, 6 },
{ "private", R_BIN_JAVA_FIELD_ACC_PRIVATE, 7 },
Expand Down

0 comments on commit b19ad11

Please sign in to comment.