Please export function-like macros as functions
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- backend-api-design, bioinformatics
Research direction
Start with the sam_itr_queryi and sam_itr_destroy definitions linked in htslib/sam.h, then inspect how these APIs appear in the shared library. Identify the function-like macros in the requested API area and verify that the completed change exposes equivalent callable functions for Julia and other wrappers without changing their behavior.
Written by the indexing model from the issue text.
Description
When I tried to write a wrapper of htslib, I found some APIs are not exported as functions and cannot be found in the shared library file. For example, the sam_itr_queryi function is exported as function thus other program can directly call that function via the shared library, but the sam_itr_destroy is actually a function-like macro, whose name is not visible from the outside. Unfortunately, my favorite language (the Julia language) cannot read this kind of macros automatically.
I think that inlining these functions can satisfy my need without imposing performance damage and provide more type-safety. I'd appreciate it if you would replace function-like macros with genuine functions.
Thanks.
- Dominant language
- C
- Stars
- 950
- Forks
- 475
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from samtools/htslib
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
-
tabix performance Open
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100