Browse Source

Add first C++ module

master
heck 2 years ago
parent
commit
2f58ada8d1
  1. 13
      src/ext.cc
  2. 24
      src/ext.hh

13
src/ext.cc

@ -0,0 +1,13 @@
#include "ext.hh"
#include <iostream>
namespace Orca {
int counter{ 0 };
}
void test_cxx(Glyph* gbuf, Mark* mbuf, Usz height, Usz width, Usz tick_number)
{
Orca::counter++;
std::cout << "test_cxx()" << Orca::counter << std::endl;
}

24
src/ext.hh

@ -0,0 +1,24 @@
// This file is under GNU General Public License 3.0
// see LICENSE.txt
// clang-format off
#ifndef ORCA_EXT_HH
#define ORCA_EXT_HH
#include "base.h"
#ifdef __cplusplus
extern "C" {
#endif
void test_cxx(Glyph * gbuf,
Mark * mbuf,
Usz height,
Usz width,
Usz tick_number);
#ifdef __cplusplus
};
#endif
#endif //ORCA_EXT_HH
Loading…
Cancel
Save