Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new field 'printconv' to basic PDL Type hash.
The printconv field is meant to be used in C (s)printf statements, and lets one write cleaner-compling code on strict compilers (clang). The idea is to eliminate multiple warnings like "parameter has type double (%g) but you passed in PDL_Short (aka 'short')." when writing a generic print statement in C/XS. The line at the end of pdlcore.c.PL demonstrates usage. This still needs 1) a little documentation in PDL::Types; 2) vetting on other platforms with different IV sizes and/or C compilers to make sure what I wrote is general (it probably isn't). 3) ideas about a different way to do this (using the packtype field that is already in there??). Suggestions welcome.
- Loading branch information
Showing
2 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters