- ast_value *m_varargs;
- ast_value *m_argc;
- ast_value *m_fixedparams;
- ast_value *m_return_value;
-};
-ast_function* ast_function_new(lex_ctx_t ctx, const char *name, ast_value *vtype);
-/* This will NOT delete the underlying ast_value */
-void ast_function_delete(ast_function*);
-/* For "optimized" builds this can just keep returning "foo"...
- * or whatever...
- */
-const char* ast_function_label(ast_function*, const char *prefix);
+ std::unique_ptr<ast_value> m_varargs;
+ std::unique_ptr<ast_value> m_argc;
+ ast_value *m_fixedparams = nullptr; // these use unref()
+ ast_value *m_return_value = nullptr;
+
+private:
+ ast_function(lex_ctx_t ctx, const std::string &name, ast_value *vtype);