git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4] libgit-rs: add get_bool(), get_ulong(), and get_pathname() methods

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Oct 6, 2025, 21:20 UTC
Message-ID
<aOQyioJChUkJOXRb@fruit.crustytoothpaste.net>
In-Reply-To
<0cb55558-a48e-42ac-a80e-a24ee2be55ee@gmail.com>
On 2025-10-01 at 10:15:28, Phillip Wood wrote:
Show 14 quoted lines
> [I've cc'd brian to sanity check my suggestion for handling c_ulong in rust
> 1.63 which lacks std::ffi::c_ulong]
> 
> As I said before this wont work because C's ulong type is platform dependent
> so you cannot assume it 64 bits wide. Looking at the previous discussion[1]
> the reason we have these fallback definitions is because std::ffi::c_int etc
> were only added in rust 1.64 and we want to support rust 1.63 as that is the
> version shipped by Debian oldstable. I think it would be better to have a
> separate preparatory patch that changes the existing fallbacks to
> 
> #[cfg(not(has_std__ff__c_char))]
> use std::os::raw::{c_char, c_int};
> 
> and then this patch can add "c_ulong" to the list.

It's just fine to use `std::os::raw` in general without needing to use `std::ffi` conditionally. I'd just default to that until we move away from Rust 1.63. That's what I do myself.

-- 
brian m. carlson (they/them)
Toronto, Ontario, CA
Previous: Phillip WoodNext: Phillip Wood
Message 21 of 22 in “libgit-rs: add get_bool() method to ConfigSet”
  1. 0/2 libgit-rs: add get_bool() method to ConfigSetions via GitGitGadget, Sep 25, 2025
  2. 1/2 po: fix escaped underscores in README.mdionnss via GitGitGadget, Sep 25, 2025
  3. 2/2 libgit-rs: add get_bool() method to ConfigSetionnss via GitGitGadget, Sep 25, 2025
  4. Chris TorekSep 26, 2025
  5. Phillip WoodSep 26, 2025
  6. Junio C HamanoSep 26, 2025
  7. 0/3 libgit-rs: add get_bool() method to ConfigSetions via GitGitGadget, Sep 27, 2025
  8. 1/3 po: fix escaped underscores in README.mdionnss via GitGitGadget, Sep 27, 2025
  9. 2/3 libgit-rs: add get_bool() method to ConfigSetionnss via GitGitGadget, Sep 27, 2025
  10. 3/3 libgit-rs: address review feedback for get_bool()ionnss via GitGitGadget, Sep 27, 2025
  11. Junio C HamanoSep 27, 2025
  12. 0/3 libgit-rs: add get_bool() method to ConfigSetions via GitGitGadget, Sep 27, 2025
  13. 1/3 po: fix escaped underscores in README.mdionnss via GitGitGadget, Sep 27, 2025
  14. Phillip WoodSep 29, 2025
  15. 2/3 libgit-rs: add get_bool() method to ConfigSetionnss via GitGitGadget, Sep 27, 2025
  16. Phillip WoodSep 29, 2025
  17. 3/3 libgit-rs: add get_ulong() and get_pathname() methodsionnss via GitGitGadget, Sep 27, 2025
  18. Phillip WoodSep 29, 2025
  19. libgit-rs: add get_bool(), get_ulong(), and get_pathname() methodsions via GitGitGadget, Sep 30, 2025
  20. Phillip WoodOct 1, 2025
  21. brian m. carlsonOct 6, 2025
  22. Phillip WoodOct 8, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.