rust-tcl icon indicating copy to clipboard operation
rust-tcl copied to clipboard

Wrong signature of function pointers in rust_tcl_sys

Open nwin opened this issue 10 years ago • 4 comments

For example in rust_tcl_sys::Tcl_CreateCommand you define _proc: *mut Tcl_CmdProc. Tcl_CmdProc is already defined as a function pointer. Thus you define a function that takes a pointer to a function pointer instead of a function that takes a function pointer. This applies to all function taking function pointers.

PS: I think the naming convention would be to call it proc_.

nwin avatar May 20 '15 08:05 nwin

It's come directly out of bindgen, so there may be an issue there. Feel free to fix with a PR :D

I'd prefer not to change the names of anything in rust_tcl_sys, as it's supposed to match the C api as close as possible.

AngryLawyer avatar May 20 '15 09:05 AngryLawyer

I filed an issue https://github.com/crabtw/rust-bindgen/issues/212

nwin avatar May 20 '15 09:05 nwin

Grand, cheers for that. Once it's resolved we'll get this updated.

AngryLawyer avatar May 20 '15 10:05 AngryLawyer

Pinging, since it looks like the issue mentioned has been resolved.

computermouth avatar Oct 07 '16 21:10 computermouth