/** * @file Plugin.cpp * @brief PluginV1 -- "before your edit". See PluginV2/src/Plugin.cpp for * "after"; the two deliberately export the identical set of names * (minus plugin_legacy_feature, removed in V2) so Context can * line them up. See ../Shared/PluginApi.h for what each export is * there to demonstrate (and for the documentation of every function * defined here). */ #include "PluginApi.h" #include int plugin_tick(int input) { int result = input * 2; std::printf(" plugin_tick(%d) -> %d [V1: input * 2]\n", input, result); return result; } int plugin_legacy_feature(int input) { std::printf(" plugin_legacy_feature(%d) -> %d [V1, about to be removed in V2]\n", input, input); return input; } #if defined(__arm__) || defined(_M_ARM) // See Shared/PluginApi.h's doc comment on plugin_tiny_function for why ARM32 needs this, rather // than the plain empty body every other architecture uses below. __asm__( ".global plugin_tiny_function\n" ".type plugin_tiny_function, %function\n" "plugin_tiny_function:\n" "\tbx lr\n" ".size plugin_tiny_function, . - plugin_tiny_function\n"); #elif defined(__GNUC__) || defined(__clang__) void plugin_tiny_function(void) { } #endif int plugin_build_marker = 1;