[Vm-dev] VM_PROXY_ version testing
akgrant0710 at gmail.com
Sun Dec 30 17:29:12 UTC 2018
Recent versions of vmmaker are generating code similar to:
#if VM_PROXY_MAJOR > 1 || (VM_PROXY_MAJOR == 1 && VM_PROXY_MINOR >= 14)
extern sqInt primitiveFailForOSError(sqLong osError);
# define primitiveFailForOSError(osError) 0
This seems quite dangerous as compiling with an earlier version of the
VM will succeed, but the plugin will behave in strange ways when run.
Forcing a compiler failure seems like the safer option, e.g. something
#error "Not supported on VMs earlier than 1.14"
What do you think?
More information about the Vm-dev