-
Notifications
You must be signed in to change notification settings - Fork 134
add prologue callback right next to epilogue callback #180
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
base: master
Are you sure you want to change the base?
Conversation
You’ll have to explain your use case in a bit more. I didn’t understand your description. Perhaps @attila-lendvai can chime in too. |
@luismbo So, what happens is: the main sdl lib defines certains types/structure such as SDL_Color. Now, SDL-TTF is generated in a seperate package, but some of its function such as render-text-solid rely on these definitions and if it doesn't have them, there will be comments in the generated code that sdl-color was not found and ttf-render-text-solid was skipped. And so I import all the symbols from the core package into the packages that depend on it (well, ommiting the clashing symbols like init or quit) and that solves the problem. |
src/c2ffi/generator.lisp
Outdated
@@ -537,7 +537,7 @@ target package." | |||
(with-standard-io-syntax | |||
(with-input-from-file (in c2ffi-spec-file :external-format (uiop:encoding-external-format :utf-8)) | |||
(with-output-to-file (*c2ffi-output-stream* output :if-exists :supersede | |||
:external-format (uiop:encoding-external-format output-encoding)) | |||
:external-format (uiop:encoding-external-format output-encoding)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for git blame
it's better to avoid recording changes to parts that you don't need to touch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it solve the problem if I change the indentation back to how it was and push again? Or would it be easier to make another pull request at this point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@attila-lendvai indentation restored, seems to have done the trick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you made two commits. the point is that commits should not touch unrelated parts of the files unnecessarily.
just amend the patch locally, and then you can git push -f
into the PR's branche on github, and the PR gets updated automatically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@attila-lendvai my bad, got it now!
FTR, this PR is needed for this issue: hu-dwim/hu.dwim.sdl#2 but for now i'm reluctant to proceed on this. further discussion is under that issue. |
I need this for https://github.com/some-mthfka/hu.dwim.sdl, where one package (aka sdl-ttf) relies on the definitions from another package (sdl-core), and I import all the definitions in prologue. I can't do it in prelude because the generated file redefines the package that it generates.
Or maybe there's indeed another way of doing it?