public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail•com>
To: "brian m. carlson" <sandals@crustytoothpaste•net>,
	phillip.wood@dunelm•org.uk,
	ions via GitGitGadget <gitgitgadget@gmail•com>,
	git@vger•kernel.org, ions <zara.leonardo@gmail•com>
Subject: Re: [PATCH v4] libgit-rs: add get_bool(), get_ulong(), and get_pathname() methods
Date: Wed, 8 Oct 2025 14:36:51 +0100	[thread overview]
Message-ID: <da003e1f-99b4-4f13-a052-294d3e5f3eab@gmail.com> (raw)
In-Reply-To: <aOQyioJChUkJOXRb@fruit.crustytoothpaste.net>

On 06/10/2025 22:20, brian m. carlson wrote:
> On 2025-10-01 at 10:15:28, Phillip Wood wrote:
>> [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.

Thanks brian, that sounds much simpler. Lets add a preparatory commit to 
use std::os::raw unconditionally.

Thanks

Phillip

      reply	other threads:[~2025-10-08 13:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-25 11:44 [PATCH 0/2] libgit-rs: add get_bool() method to ConfigSet ions via GitGitGadget
2025-09-25 11:44 ` [PATCH 1/2] po: fix escaped underscores in README.md ionnss via GitGitGadget
2025-09-25 11:44 ` [PATCH 2/2] libgit-rs: add get_bool() method to ConfigSet ionnss via GitGitGadget
2025-09-26  6:43   ` Chris Torek
2025-09-26  9:58   ` Phillip Wood
2025-09-26 17:15     ` Junio C Hamano
2025-09-27  0:07 ` [PATCH v2 0/3] " ions via GitGitGadget
2025-09-27  0:07   ` [PATCH v2 1/3] po: fix escaped underscores in README.md ionnss via GitGitGadget
2025-09-27  0:07   ` [PATCH v2 2/3] libgit-rs: add get_bool() method to ConfigSet ionnss via GitGitGadget
2025-09-27  0:07   ` [PATCH v2 3/3] libgit-rs: address review feedback for get_bool() ionnss via GitGitGadget
2025-09-27  2:01   ` [PATCH v2 0/3] libgit-rs: add get_bool() method to ConfigSet Junio C Hamano
2025-09-27  3:51   ` [PATCH v3 " ions via GitGitGadget
2025-09-27  3:51     ` [PATCH v3 1/3] po: fix escaped underscores in README.md ionnss via GitGitGadget
2025-09-29 13:26       ` Phillip Wood
2025-09-27  3:51     ` [PATCH v3 2/3] libgit-rs: add get_bool() method to ConfigSet ionnss via GitGitGadget
2025-09-29 13:23       ` Phillip Wood
2025-09-27  3:51     ` [PATCH v3 3/3] libgit-rs: add get_ulong() and get_pathname() methods ionnss via GitGitGadget
2025-09-29 13:23       ` Phillip Wood
2025-09-30  8:46     ` [PATCH v4] libgit-rs: add get_bool(), get_ulong(), " ions via GitGitGadget
2025-10-01 10:15       ` Phillip Wood
2025-10-06 21:20         ` brian m. carlson
2025-10-08 13:36           ` Phillip Wood [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=da003e1f-99b4-4f13-a052-294d3e5f3eab@gmail.com \
    --to=phillip.wood123@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitgitgadget@gmail$(echo .)com \
    --cc=phillip.wood@dunelm$(echo .)org.uk \
    --cc=sandals@crustytoothpaste$(echo .)net \
    --cc=zara.leonardo@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox