EionRobb / purple-discord

A libpurple/Pidgin plugin for Discord
GNU General Public License v3.0
381 stars 43 forks source link

Rename `JsonArray *data` to something else #380

Closed CaptainBeyondDS8 closed 3 years ago

CaptainBeyondDS8 commented 3 years ago

This is so as to not conflict with JsonObject *data, which results in the following error:

libdiscord.c: In function ‘discord_react_cb’:
libdiscord.c:5491:14: error: conflicting types for ‘data’
  JsonObject *data = json_array_get_object_element(data, len-1);
              ^~~~
libdiscord.c:5489:13: note: previous definition of ‘data’ was here
  JsonArray *data = json_node_get_array(node);
             ^~~~
EionRobb commented 3 years ago

Good catch. Thanks!