mirror of
https://github.com/latentPrion/libspinscale.git
synced 2026-02-27 14:36:04 +00:00
Move CRT Cmdline args obj & impl into libspinscale
This commit is contained in:
@@ -76,6 +76,7 @@ add_library(spinscale SHARED
|
||||
src/componentThread.cpp
|
||||
src/component.cpp
|
||||
src/puppetApplication.cpp
|
||||
src/runtime.cpp
|
||||
)
|
||||
|
||||
# Conditionally add qutexAcquisitionHistoryTracker.cpp only when debug locks
|
||||
|
||||
@@ -42,17 +42,19 @@ extern MarionetteComponent mrntt;
|
||||
|
||||
struct CrtCommandLineArgs
|
||||
{
|
||||
CrtCommandLineArgs(int argc, char *argv[], char *envp[])
|
||||
: argc(argc), argv(argv), envp(envp)
|
||||
{}
|
||||
CrtCommandLineArgs(int argc, char *argv[], char *envp[])
|
||||
: argc(argc), argv(argv), envp(envp)
|
||||
{}
|
||||
|
||||
int argc;
|
||||
char **argv;
|
||||
char **envp;
|
||||
int argc;
|
||||
char **argv;
|
||||
char **envp;
|
||||
|
||||
static void set(int argc, char *argv[], char *envp[]);
|
||||
static void set(int argc, char *argv[], char *envp[]);
|
||||
};
|
||||
|
||||
extern CrtCommandLineArgs crtCommandLineArgs;
|
||||
|
||||
} // namespace sscl
|
||||
|
||||
#endif // _MARIONETTE_H
|
||||
|
||||
12
src/runtime.cpp
Normal file
12
src/runtime.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <spinscale/marionette.h>
|
||||
|
||||
namespace sscl {
|
||||
|
||||
CrtCommandLineArgs crtCommandLineArgs(0, nullptr, nullptr);
|
||||
|
||||
void CrtCommandLineArgs::set(int argc, char *argv[], char *envp[])
|
||||
{
|
||||
crtCommandLineArgs = CrtCommandLineArgs(argc, argv, envp);
|
||||
}
|
||||
|
||||
} // namespace sscl
|
||||
Reference in New Issue
Block a user