Add inline comments to constructor and destructor attributes
This commit is contained in:
parent
4c5fbcd677
commit
01312cb4b6
11
src/main.c
11
src/main.c
|
@ -10,12 +10,8 @@
|
||||||
|
|
||||||
static bool loaded = false;
|
static bool loaded = false;
|
||||||
|
|
||||||
/*
|
__attribute__((constructor)) /* Entry point when injected */
|
||||||
* We need:
|
void load(void) {
|
||||||
* __attribute__((constructor))
|
|
||||||
* To indicate that this function will be the entry point once injected.
|
|
||||||
*/
|
|
||||||
__attribute__((constructor)) void load(void) {
|
|
||||||
printf("hl-cheat injected!\n");
|
printf("hl-cheat injected!\n");
|
||||||
|
|
||||||
/* Initialize globals/interfaces */
|
/* Initialize globals/interfaces */
|
||||||
|
@ -44,7 +40,8 @@ __attribute__((constructor)) void load(void) {
|
||||||
loaded = true;
|
loaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((destructor)) void unload() {
|
__attribute__((destructor)) /* Entry point when unloaded */
|
||||||
|
void unload() {
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
/* TODO: Remove our cvars */
|
/* TODO: Remove our cvars */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue