Added build fix for with new version of libpaper #30
Merged
MicheleC
merged 1 commits from feat/libpaper
into master
1 year ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'feat/libpaper'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Added explicit variable type casting, for compatibility with new versions of the libpaper library.
Hi @ormorph,
looking at the source code in github for libpaper,
systempapername()
already returns achar*
. Nothing wrong with the explicit cast, but why is it suddenly required?https://github.com/rrthomas/libpaper
fork? libpaper2?
It change
systempapername()
to returnconst char*
.How about to change
char *paperName
toconst char *paperName
instead?It never changed here and following
paperinfo(paperName)
also acceptconst char*
.Ah thanks, I think I had look at a different github libpaper repository (maybe a fork??).
Sounds even better!
In my Gentoo kword build ended with an error:
Although I myself don’t understand why this happened, since the function is declared as
exern "C"
in the header file.I am attaching an archive with header files for different versions of libpaper. On version 1.1.28, the assembly runs without errors, and on version 2.0.4, errors appear. The difference is in the macros, since in one case a representation without
const
is used.It will be necessary to check how it all works.
Good point, I didn't think about older distros that come with older version of libpaper. In view of that, the current patch is probably a safer approach.
Sorry, ignore my previous comment. Clearly my brain wasn't working!
If we change
paperName
fromchar*
toconst char*
, it would work with both old and new version ofsystempapername()
4e323581ac
to2b9cf56a72
1 year agoYes it works. I did not pay attention that this variable is needed only for
paperinfo
, of course it will work in all assembly options. Correction added.Looks good
2b9cf56a72
into master 1 year agoReviewers
2b9cf56a72
.