Skip to content

Instantly share code, notes, and snippets.

View hak's full-sized avatar

Hakuro Matsuda hak

  • Google
  • Tokyo, Japan
View GitHub Profile
#ifdef __APPLE__
//
//Logging for CoreFoundation
//
#include <CoreFoundation/CoreFoundation.h>
extern "C" void NSLog(CFStringRef format, ...);
const int32_t BUFFER_SIZE = 256;
#define LOGI(...) {char c[BUFFER_SIZE];\
snprintf(c,BUFFER_SIZE,__VA_ARGS__);\
CFStringRef str = CFStringCreateWithCString(kCFAllocatorDefault, c, kCFStringEncodingMacRoman);\