Skip to content

Instantly share code, notes, and snippets.

@Autoplay1999
Created July 17, 2024 12:35
Show Gist options
  • Save Autoplay1999/34672aeb97a9dc3af4c3b48749720aab to your computer and use it in GitHub Desktop.
Save Autoplay1999/34672aeb97a9dc3af4c3b48749720aab to your computer and use it in GitHub Desktop.
#ifndef _HSR_H_
#define _HSR_H_
#pragma once
#define HSRA(x) __hsr_a("\0" x)
#define HSRW(x) __hsr_w(L"\0" x)
#ifdef __cplusplus
extern "C" {
#endif
static __declspec(noinline) const char* __hsr_a(const char* s) {
return ++s;
}
static __declspec(noinline) const wchar_t* __hsr_w(const wchar_t* s) {
return ++s;
}
#ifdef __cplusplus
}
#endif
#endif /* _HSR_H_ */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment