From 4f4e6f61a1e59952f3e5d667e40d453fa529ba8c Mon Sep 17 00:00:00 2001 From: John Gallagher Date: Sat, 11 Apr 2026 20:36:34 -0400 Subject: [PATCH 1/3] add scf_service_get_pg() --- src/native.rs | 5 +++++ src/stubs.rs | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/src/native.rs b/src/native.rs index e8074c7..26c6df4 100644 --- a/src/native.rs +++ b/src/native.rs @@ -88,6 +88,11 @@ extern "C" { name: *const c_char, out: *mut scf_instance_t, ) -> c_int; + pub fn scf_service_get_pg( + service: *const scf_service_t, + name: *const c_char, + out: *mut scf_propertygroup_t, + ) -> c_int; pub fn scf_iter_scope_services( iter: *mut scf_iter_t, diff --git a/src/stubs.rs b/src/stubs.rs index 148e3cf..603560d 100644 --- a/src/stubs.rs +++ b/src/stubs.rs @@ -159,6 +159,13 @@ mod stubs { ) -> c_int { unimplemented!() } + pub unsafe fn scf_service_get_pg( + service: *const scf_service_t, + name: *const c_char, + out: *mut scf_propertygroup_t, + ) -> c_int { + unimplemented!() + } pub unsafe fn scf_iter_scope_services( iter: *mut scf_iter_t, From c6c350e3b4a4891bd7fb69170852c5692c943516 Mon Sep 17 00:00:00 2001 From: John Gallagher Date: Mon, 13 Apr 2026 23:18:13 -0400 Subject: [PATCH 2/3] add scf_service_add_pg() --- src/native.rs | 7 +++++++ src/stubs.rs | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/src/native.rs b/src/native.rs index 26c6df4..a8a9fb5 100644 --- a/src/native.rs +++ b/src/native.rs @@ -93,6 +93,13 @@ extern "C" { name: *const c_char, out: *mut scf_propertygroup_t, ) -> c_int; + pub fn scf_service_add_pg( + service: *mut scf_service_t, + name: *const c_char, + pgtype: *const c_char, + flags: u32, + out: *mut scf_propertygroup_t, + ) -> c_int; pub fn scf_iter_scope_services( iter: *mut scf_iter_t, diff --git a/src/stubs.rs b/src/stubs.rs index 603560d..0497fbe 100644 --- a/src/stubs.rs +++ b/src/stubs.rs @@ -166,6 +166,15 @@ mod stubs { ) -> c_int { unimplemented!() } + pub unsafe fn scf_service_add_pg( + service: *mut scf_service_t, + name: *const c_char, + pgtype: *const c_char, + flags: u32, + out: *mut scf_propertygroup_t, + ) -> c_int { + unimplemented!() + } pub unsafe fn scf_iter_scope_services( iter: *mut scf_iter_t, From 4869670fc803306e4970c1a1feda7555cf7d1afd Mon Sep 17 00:00:00 2001 From: John Gallagher Date: Tue, 21 Apr 2026 13:58:55 -0400 Subject: [PATCH 3/3] fix pointer const/mut --- src/native.rs | 2 +- src/stubs.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/native.rs b/src/native.rs index a8a9fb5..de1c26a 100644 --- a/src/native.rs +++ b/src/native.rs @@ -94,7 +94,7 @@ extern "C" { out: *mut scf_propertygroup_t, ) -> c_int; pub fn scf_service_add_pg( - service: *mut scf_service_t, + service: *const scf_service_t, name: *const c_char, pgtype: *const c_char, flags: u32, diff --git a/src/stubs.rs b/src/stubs.rs index 0497fbe..0ccc296 100644 --- a/src/stubs.rs +++ b/src/stubs.rs @@ -167,7 +167,7 @@ mod stubs { unimplemented!() } pub unsafe fn scf_service_add_pg( - service: *mut scf_service_t, + service: *const scf_service_t, name: *const c_char, pgtype: *const c_char, flags: u32,