Skip to content

Commit

Permalink
Use a define instead of a global in v.c
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Oct 13, 2023
1 parent bb110f1 commit ea7f03a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions libr/lang/p/v.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* radare - LGPL - Copyright 2019-2022 pancake */
/* radare - LGPL - Copyright 2019-2023 pancake */

#include <r_core.h>

static const char *const r2v_sym = "r2v__entry";
#define R2V_SYM "r2v__entry"
static bool lang_v_file(RLangSession *lang, const char *file);

static const char *r2v_head = \
Expand Down Expand Up @@ -93,11 +93,11 @@ static void runlib(void *user, const char *lib) {
void *vl = r_lib_dl_open (lib);
if (vl) {
void (*fcn)(RCore *, int argc, const char **argv);
fcn = r_lib_dl_sym (vl, r2v_sym);
fcn = r_lib_dl_sym (vl, R2V_SYM);
if (fcn) {
fcn (user, 0, NULL);
} else {
R_LOG_ERROR ("Cannot find '%s' symbol in library", r2v_sym);
R_LOG_ERROR ("Cannot find '%s' symbol in library", R2V_SYM);
}
r_lib_dl_close (vl);
} else {
Expand Down
4 changes: 2 additions & 2 deletions test/db/cmd/cmd_ao
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ aobj
aobj fd430191
EOF
EXPECT=<<EOF
{"opstr":"stp x28, x27, [sp, -0x60]!","size":4,"bytes":{[18446744073709551615,3,3,1,1,1,1,1],[4,2,2,2,2,2,3,3],[4,0,4,4,4,4,4,4],[1,18446744073709551615,18446744073709551615,0,18446744073709551615,1,18446744073709551615,3]},"flipstr":"x3311111 42222233 40444444 1xx0x1x3 ","args":[[22,28],[1,2,3,4,0,31,26],[10,11,12,13,14],[5,6,8,9,24],[15,16,17,18,19,20,21,23]]}
{"opstr":"add x29, sp, 0x50","size":4,"bytes":{[2,2,2,1,1,1,1,1],[3,3,3,3,3,3,2,2],[0,3,3,3,3,3,3,3],[1,0,0,18446744073709551615,0,0,18446744073709551615,0]},"flipstr":"22211111 33333322 03333333 100x00x0 ","args":[[23,24,26,27,29,30],[1,2,3,4,0,31],[5,6,7,8,9],[10,11,12,13,14,15,16,17,18,19,20,21,22]]}
{"opstr":"stp x28, x27, [sp, -0x60]!","size":4,"bytes":[[18446744073709551615,3,3,1,1,1,1,1],[4,2,2,2,2,2,3,3],[4,0,4,4,4,4,4,4],[1,18446744073709551615,18446744073709551615,0,18446744073709551615,1,18446744073709551615,3]],"flipstr":"x3311111 42222233 40444444 1xx0x1x3 ","args":[[22,28],[1,2,3,4,0,31,26],[10,11,12,13,14],[5,6,8,9,24],[15,16,17,18,19,20,21,23]]}
{"opstr":"add x29, sp, 0x50","size":4,"bytes":[[2,2,2,1,1,1,1,1],[3,3,3,3,3,3,2,2],[0,3,3,3,3,3,3,3],[1,0,0,18446744073709551615,0,0,18446744073709551615,0]],"flipstr":"22211111 33333322 03333333 100x00x0 ","args":[[23,24,26,27,29,30],[1,2,3,4,0,31],[5,6,7,8,9],[10,11,12,13,14,15,16,17,18,19,20,21,22]]}
EOF
RUN

Expand Down

0 comments on commit ea7f03a

Please sign in to comment.