tycho: add guards for debug prints

master
an 2019-06-13 17:55:22 -04:00
parent 475aa64138
commit 25d5ac1314
3 changed files with 12 additions and 3 deletions

View File

@ -4,6 +4,12 @@
#include <cstdint>
#include <cstddef>
#define dbgPrintFunc() qDebug("%s", __func__)
#ifdef TYCHO_DEBUG_PRINT
#define dbgPrint(...) qDebug(__VA_ARGS__)
#else
#define dbgPrint(...)
#endif
#define dbgPrintFunc() dbgPrint("%s", __func__)
// EOF

View File

@ -1,10 +1,11 @@
#include "tycho.h"
#include "menu.h"
#include <QApplication>
extern "C" {
int main_cc(char *app_path)
{
puts("cc entry");
dbgPrint("cc entry");
int argc = 1;
char *argv[] = {app_path, nullptr};

View File

@ -9,7 +9,9 @@ extern "C" {
fn main() -> ResultS<()>
{
println!("rust entry");
if cfg!(debug_assertions) {
eprintln!("rust entry");
}
let mut args = std::env::args();
let app_name = args.next().ok_or(err_msg("bad launch name"))?;