Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add header for PREP() macro #1022

Merged
merged 2 commits into from
Nov 9, 2018
Merged

add header for PREP() macro #1022

merged 2 commits into from
Nov 9, 2018

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented Nov 9, 2018

When merged this pull request will:

@commy2 commy2 added this to the 3.9.1 milestone Nov 9, 2018
The PREP macro should be placed in a script run by a XEH preStart and XEH preInit event.

The PREP macro allows for CBA function caching, which drastically speeds up load times.
Beware though that function caching is enabled by default and as such to disable it you, need to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to disable it, you need

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -936,6 +962,13 @@ Macro: PATHTO_FNC()
Author:
dixon13, commy2
------------------------------------------- */
#ifdef RECOMPILE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now the PATHTO_FNC header looks like it applies to recompile.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alternative is having RECOMPILE to look like it belongs to PREP when it belongs to PATHTO_FNC only.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe move it below PATHTO_FNC then? So that the header is still directly above what it belongs to

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PATHTO_FNC uses RECOMPILE. I think it would break the way you described.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Macro inside a different macro is only resolved when the second macro is used.
PATHTO_FNC is resolved first. Then the RECOMPILE inside it is resolved.
So it wouldn't cause any problems if it's defined after the PATHTO_FNC macro

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess. But it still would look weird.

@commy2 commy2 merged commit dfa086a into master Nov 9, 2018
@commy2 commy2 deleted the PREP-doc branch November 9, 2018 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CBA PREP() macro could be useful thing to have documented
3 participants