Cppia: do not add scripting support to some classes

When compiling haxe code with the ‘-D scriptable’ option, the compiler adds additional C++ code to provide support for scripting. However, this code does not compile when the original Haxe code interacts with native C++ types.

class Main {
	static function main() {
		trace('Hello from cppia HOST');
		var scriptname = './script.cppia';

	// the problem is here: I'm using cpp type `void*`
	static function cppTest(param: cpp.Star<cpp.Void>): Void {

Cpp compiler error and corresponding code:

./src/Main.cpp:108:19: error: no viable conversion from 'Dynamic' to 'void *'

static void CPPIA_CALL __s_cppTest(::hx::CppiaCtx *ctx) {

Here, ctx->getObject() returns Dynamic, but cppTest expects void*.

I do not need this function to be available for cppia scripts, as there is a limited set of classes and functions that should be available. Is it possible to generate the scripting support code only for selected classes and functions?

I also asked this here: cppia: add scripting support code only for selected classes · Issue #1051 · HaxeFoundation/hxcpp · GitHub