summaryrefslogtreecommitdiffhomepage
path: root/public/frameworks
diff options
context:
space:
mode:
Diffstat (limited to 'public/frameworks')
-rw-r--r--public/frameworks/LaunchHelpers.fwrk/headers/Foundation.h14
-rw-r--r--public/frameworks/LaunchHelpers.fwrk/src/Foundation.cc4
2 files changed, 14 insertions, 4 deletions
diff --git a/public/frameworks/LaunchHelpers.fwrk/headers/Foundation.h b/public/frameworks/LaunchHelpers.fwrk/headers/Foundation.h
index b20ca17e..cba2e7c4 100644
--- a/public/frameworks/LaunchHelpers.fwrk/headers/Foundation.h
+++ b/public/frameworks/LaunchHelpers.fwrk/headers/Foundation.h
@@ -20,17 +20,27 @@ inline constexpr auto kMaxArgs = 256;
struct LHLaunchInfo final {
CF::CFString fExecutablePath{kMaxPath};
CF::CFString fWorkingDirectory{kMaxPath};
- CF::CFString fArguments[kMaxArgs];
+ CF::CFRef<CF::CFString> fArguments[kMaxArgs];
CF::CFString fEnvironment{kMaxPath};
CF::CFInteger64 fUID{0};
CF::CFInteger64 fGID{0};
+ LHLaunchInfo() = default;
+ ~LHLaunchInfo() = default;
+
+ LIBSYS_COPY_DELETE(LHLaunchInfo)
+
explicit operator bool() { return fUID && fGID; }
+
+ CF::CFRef<CF::CFString>* begin() { return fArguments; }
+ CF::CFRef<CF::CFString>* end() { return fArguments + kMaxArgs; }
+
+ SizeT size() { return kMaxArgs; }
};
using LHLaunchInfoPtr = LHLaunchInfo*;
/// @brief Get launch information.
/// @return the launch information structure.
-LHLaunchInfo* LHGetLaunchInfo(Void);
+CF::CFRef<LHLaunchInfo> LHGetLaunchInfo(Void);
} // namespace LaunchHelpers \ No newline at end of file
diff --git a/public/frameworks/LaunchHelpers.fwrk/src/Foundation.cc b/public/frameworks/LaunchHelpers.fwrk/src/Foundation.cc
index 6cc3bff3..159ea243 100644
--- a/public/frameworks/LaunchHelpers.fwrk/src/Foundation.cc
+++ b/public/frameworks/LaunchHelpers.fwrk/src/Foundation.cc
@@ -9,7 +9,7 @@
/// @brief Get launch information.
/// @return the launch information structure.
-LaunchHelpers::LHLaunchInfo* LaunchHelpers::LHGetLaunchInfo(Void) {
+CF::CFRef<LaunchHelpers::LHLaunchInfo> LaunchHelpers::LHGetLaunchInfo(Void) {
return static_cast<LaunchHelpers::LHLaunchInfo*>(
- libsys_syscall_arg_1(libsys_hash_64("__LHGetLaunchInfo")));
+ libsys_syscall_arg_1(libsys_hash_64("__LHGetLaunchInfoRef")));
} \ No newline at end of file