-string mangle_cxx_identifier (string);
-#define MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE, FUNC, ARGCOUNT, OPTIONAL_COUNT) \
- SCM TYPE ::FUNC ## _proc; \
- void \
- TYPE ## _ ## FUNC ## _init_functions () \
- { \
- string id = mangle_cxx_identifier (string (#TYPE) + "::" + string (#FUNC)); \
- TYPE ::FUNC ## _proc = scm_c_define_gsubr (id.c_str(), \
- (ARGCOUNT-OPTIONAL_COUNT), OPTIONAL_COUNT, 0, \
- (Scheme_function_unknown) TYPE::FUNC); \
- scm_c_export (id.c_str (), NULL); \
- } \
- \
- ADD_SCM_INIT_FUNC (TYPE ## _ ## FUNC ## _callback, \
- TYPE ## _ ## FUNC ## _init_functions);
-
-#define MAKE_SCHEME_CALLBACK(TYPE, FUNC, ARGCOUNT) \
- MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE,FUNC,ARGCOUNT,0);
-
-void
-ly_add_function_documentation (SCM proc, char const *fname,
- char const *varlist,
- char const *doc);
-
-#define ADD_SCM_INIT_FUNC(name, func) \
- class name ## _scm_initter \
- { \
- public: \
- name ## _scm_initter () \
- { \
- add_scm_init_func (func); \
- } \
- } \
+#define MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE, FUNC, ARGCOUNT, OPTIONAL_COUNT, DOC) \
+ SCM TYPE ::FUNC ## _proc; \
+ void \
+ TYPE ## _ ## FUNC ## _init_functions () \
+ { \
+ string cxx = string (#TYPE) + "::" + string (#FUNC); \
+ string id = mangle_cxx_identifier (cxx); \
+ TYPE ::FUNC ## _proc = scm_c_define_gsubr (id.c_str(), \
+ (ARGCOUNT-OPTIONAL_COUNT), OPTIONAL_COUNT, 0, \
+ (scm_t_subr) TYPE::FUNC); \
+ ly_add_function_documentation (TYPE :: FUNC ## _proc, id.c_str(), "", \
+ DOC); \
+ scm_c_export (id.c_str (), NULL); \
+ } \
+ \
+ ADD_SCM_INIT_FUNC (TYPE ## _ ## FUNC ## _callback, \
+ TYPE ## _ ## FUNC ## _init_functions);
+
+#define MAKE_DOCUMENTED_SCHEME_CALLBACK(TYPE, FUNC, ARGCOUNT, DOC) \
+ MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE, FUNC, ARGCOUNT, 0, DOC);
+
+#define MAKE_SCHEME_CALLBACK(TYPE, FUNC, ARGCOUNT) \
+ MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE,FUNC,ARGCOUNT, 0, "");
+
+void ly_add_function_documentation (SCM proc, const string &fname, const string &varlist, const string &doc);
+void ly_check_name (const string &cxx, const string &fname);
+
+#define ADD_SCM_INIT_FUNC(name, func) \
+ class name ## _scm_initter \
+ { \
+ public: \
+ name ## _scm_initter () \
+ { \
+ add_scm_init_func (func); \
+ } \
+ } \