You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/06/22 03:05:20 UTC
[lucy-commits] svn commit: r1138267 - in /incubator/lucy/trunk/clownfish: lib/Clownfish.xs
lib/Clownfish/Binding/Core/Method.pm src/CFCBindMethod.c src/CFCBindMethod.h
Author: marvin
Date: Wed Jun 22 01:05:20 2011
New Revision: 1138267
URL: http://svn.apache.org/viewvc?rev=1138267&view=rev
Log:
Port callback generation code from Clownfish::Binding::Core::Method to C.
Modified:
incubator/lucy/trunk/clownfish/lib/Clownfish.xs
incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core/Method.pm
incubator/lucy/trunk/clownfish/src/CFCBindMethod.c
incubator/lucy/trunk/clownfish/src/CFCBindMethod.h
Modified: incubator/lucy/trunk/clownfish/lib/Clownfish.xs
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/lib/Clownfish.xs?rev=1138267&r1=1138266&r2=1138267&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/lib/Clownfish.xs (original)
+++ incubator/lucy/trunk/clownfish/lib/Clownfish.xs Wed Jun 22 01:05:20 2011
@@ -1715,6 +1715,19 @@ CODE:
OUTPUT: RETVAL
SV*
+callback_def(unused, meth)
+ SV *unused;
+ CFCMethod *meth;
+CODE:
+ RETVAL = S_sv_eat_c_string(CFCBindMeth_callback_def(meth));
+ /*
+ char *def = CFCBindMeth_callback_def(meth);
+ RETVAL = newSVpvn(def, strlen(def));
+ FREEMEM(def);
+ */
+OUTPUT: RETVAL
+
+SV*
_callback_obj_def(meth, offset)
CFCMethod *meth;
const char *offset;
@@ -1722,3 +1735,44 @@ CODE:
RETVAL = S_sv_eat_c_string(CFCBindMeth_callback_obj_def(meth, offset));
OUTPUT: RETVAL
+SV*
+_callback_params(meth)
+ CFCMethod *meth;
+CODE:
+ RETVAL = S_sv_eat_c_string(CFCBindMeth_callback_params(meth));
+OUTPUT: RETVAL
+
+SV*
+_invalid_callback_def(meth)
+ CFCMethod *meth;
+CODE:
+ RETVAL = S_sv_eat_c_string(CFCBindMeth_invalid_callback_def(meth));
+OUTPUT: RETVAL
+
+SV*
+_void_callback_def(meth, callback_params)
+ CFCMethod *meth;
+ const char *callback_params;
+CODE:
+ char *def = CFCBindMeth_void_callback_def(meth, callback_params);
+ RETVAL = S_sv_eat_c_string(def);
+OUTPUT: RETVAL
+
+SV*
+_primitive_callback_def(meth, callback_params)
+ CFCMethod *meth;
+ const char *callback_params;
+CODE:
+ char *def = CFCBindMeth_primitive_callback_def(meth, callback_params);
+ RETVAL = S_sv_eat_c_string(def);
+OUTPUT: RETVAL
+
+SV*
+_obj_callback_def(meth, callback_params)
+ CFCMethod *meth;
+ const char *callback_params;
+CODE:
+ char *def = CFCBindMeth_obj_callback_def(meth, callback_params);
+ RETVAL = S_sv_eat_c_string(def);
+OUTPUT: RETVAL
+
Modified: incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core/Method.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core/Method.pm?rev=1138267&r1=1138266&r2=1138267&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core/Method.pm (original)
+++ incubator/lucy/trunk/clownfish/lib/Clownfish/Binding/Core/Method.pm Wed Jun 22 01:05:20 2011
@@ -89,173 +89,6 @@ sub callback_obj_def {
return _callback_obj_def( @args{qw( method offset )} );
}
-sub callback_def {
- my ( undef, $method ) = @_;
- my $return_type = $method->get_return_type;
- my $params = _callback_params($method);
- if ( !$params ) {
- # Can't map vars, because there's at least one type in the argument
- # list we don't yet support. Return a callback wrapper that throws an
- # error error.
- return _invalid_callback_def( $method, $params );
- }
- elsif ( $return_type->is_void ) {
- return _void_callback_def( $method, $params );
- }
- elsif ( $return_type->is_object ) {
- return _obj_callback_def( $method, $params );
- }
- else {
- return _primitive_callback_def( $method, $params );
- }
-}
-
-# Return a string which maps arguments to various arg wrappers conforming
-# to Host's callback interface. For instance, (int32_t foo, Obj *bar)
-# produces the following:
-#
-# CFISH_ARG_I32("foo", foo),
-# CFISH_ARG_OBJ("bar", bar)
-#
-sub _callback_params {
- my $method = shift;
- my $micro_sym = $method->micro_sym;
- my $param_list = $method->get_param_list;
- my $num_params = $param_list->num_vars - 1;
- my $arg_vars = $param_list->get_variables;
- my @params;
-
- # Iterate over arguments, mapping them to various arg wrappers which
- # conform to Host's callback interface.
- for my $var ( @$arg_vars[ 1 .. $#$arg_vars ] ) {
- my $name = $var->micro_sym;
- my $type = $var->get_type;
- my $param;
- if ( $type->is_string_type ) {
- $param = qq|CFISH_ARG_STR("$name", $name)|;
- }
- elsif ( $type->is_object ) {
- $param = qq|CFISH_ARG_OBJ("$name", $name)|;
- }
- elsif ( $type->is_integer ) {
- my $width = $type->get_width;
- if ($width) {
- if ( $width <= 4 ) {
- $param = qq|CFISH_ARG_I32("$name", $name)|;
- }
- else {
- $param = qq|CFISH_ARG_I64("$name", $name)|;
- }
- }
- else {
- my $c_type = $type->to_c;
- $param = qq|CFISH_ARG_I($c_type, "$name", $name)|;
- }
- }
- elsif ( $type->is_floating ) {
- $param = qq|CFISH_ARG_F64("$name", $name)|;
- }
- else {
- # Can't map variable type. Signal to caller.
- return undef;
- }
- push @params, $param;
- }
- return join( ', ', 'self', qq|"$micro_sym"|, $num_params, @params );
-}
-
-# Return a function which throws a runtime error indicating which variable
-# couldn't be mapped. TODO: it would be better to resolve all these cases at
-# compile-time.
-sub _invalid_callback_def {
- my ( $method, $callback_params ) = @_;
- my $full_method_sym
- = $method->full_method_sym( $method->get_class_cnick );
- my $override_sym = $method->full_override_sym;
- my $params = $method->get_param_list->to_c;
- my $unused = '';
- for my $var ( @{ $method->get_param_list->get_variables } ) {
- my $var_name = $var->micro_sym;
- $unused .= "CHY_UNUSED_VAR($var_name); ";
- }
- return <<END_CALLBACK_DEF;
-void
-$override_sym($params) {
- $unused;
- CFISH_THROW(CFISH_ERR, "Can't override $full_method_sym via binding");
-}
-END_CALLBACK_DEF
-}
-
-# Create a callback for a method which operates in a void context.
-sub _void_callback_def {
- my ( $method, $callback_params ) = @_;
- my $override_sym = $method->full_override_sym;
- my $params = $method->get_param_list->to_c;
- return <<END_CALLBACK_DEF;
-void
-$override_sym($params) {
- cfish_Host_callback($callback_params);
-}
-END_CALLBACK_DEF
-}
-
-# Create a callback which returns a primitive type.
-sub _primitive_callback_def {
- my ( $method, $callback_params ) = @_;
- my $override_sym = $method->full_override_sym;
- my $params = $method->get_param_list->to_c;
- my $return_type = $method->get_return_type;
- my $return_type_str = $return_type->to_c;
- my $nat_func
- = $return_type->is_floating ? "cfish_Host_callback_f64"
- : $return_type->is_integer ? "cfish_Host_callback_i64"
- : $return_type_str eq 'void*' ? "cfish_Host_callback_host"
- : confess("unrecognized type: $return_type_str");
- return <<END_CALLBACK_DEF;
-$return_type_str
-$override_sym($params) {
- return ($return_type_str)$nat_func($callback_params);
-}
-END_CALLBACK_DEF
-}
-
-# Create a callback which returns an object type -- either a generic object or
-# a string.
-sub _obj_callback_def {
- my ( $method, $callback_params ) = @_;
- my $override_sym = $method->full_override_sym;
- my $params = $method->get_param_list->to_c;
- my $return_type = $method->get_return_type;
- my $return_type_str = $return_type->to_c;
- my $cb_func_name
- = $return_type->is_string_type
- ? "cfish_Host_callback_str"
- : "cfish_Host_callback_obj";
-
- my $nullable_check = "";
- if ( !$return_type->nullable ) {
- my $macro_sym = $method->get_macro_sym;
- $nullable_check
- = qq|if (!retval) { CFISH_THROW(CFISH_ERR, |
- . qq|"$macro_sym() for class '%o' cannot return NULL", |
- . qq|Cfish_Obj_Get_Class_Name((cfish_Obj*)self)); }\n |;
- }
-
- my $decrement = "";
- if ( !$return_type->incremented ) {
- $decrement = "LUCY_DECREF(retval);\n ";
- }
-
- return <<END_CALLBACK_DEF;
-$return_type_str
-$override_sym($params) {
- $return_type_str retval = ($return_type_str)$cb_func_name($callback_params);
- ${nullable_check}${decrement}return retval;
-}
-END_CALLBACK_DEF
-}
-
1;
__END__
Modified: incubator/lucy/trunk/clownfish/src/CFCBindMethod.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCBindMethod.c?rev=1138267&r1=1138266&r2=1138267&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCBindMethod.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCBindMethod.c Wed Jun 22 01:05:20 2011
@@ -25,6 +25,20 @@
#include "CFCVariable.h"
#include "CFCSymbol.h"
+/* Take a NULL-terminated list of CFCVariables and build up a string of
+ * directives like:
+ *
+ * UNUSED_VAR(var1);
+ * UNUSED_VAR(var2);
+ */
+static char*
+S_build_unused_vars(CFCVariable **vars);
+
+/* Create an unreachable return statement if necessary, in order to thwart
+ * compiler warnings. */
+static char*
+S_maybe_unreachable(CFCType *return_type);
+
char*
CFCBindMeth_typdef_dec(struct CFCMethod *method) {
const char *params = CFCParamList_to_c(CFCMethod_get_param_list(method));
@@ -70,22 +84,12 @@ CFCBindMeth_callback_obj_def(CFCMethod *
return def;
}
-char*
-CFCBindMeth_abstract_method_def(CFCMethod *method) {
- CFCParamList *param_list = CFCMethod_get_param_list(method);
- const char *params = CFCParamList_to_c(param_list);
- const char *full_func_sym = CFCMethod_implementing_func_sym(method);
- const char *vtable_var
- = CFCType_get_vtable_var(CFCMethod_self_type(method));
- CFCType *return_type = CFCMethod_get_return_type(method);
- const char *ret_type_str = CFCType_to_c(return_type);
- const char *macro_sym = CFCMethod_get_macro_sym(method);
-
- /* Build list of unused params. */
+static char*
+S_build_unused_vars(CFCVariable **vars) {
char *unused = CFCUtil_strdup("");
- CFCVariable **param_vars = CFCParamList_get_variables(param_list);
- for (int i = 1; param_vars[i] != NULL; i++) {
- const char *var_name = CFCVariable_micro_sym(param_vars[i]);
+
+ for (int i = 0; vars[i] != NULL; i++) {
+ const char *var_name = CFCVariable_micro_sym(vars[i]);
size_t size = strlen(unused) + strlen(var_name) + 80;
unused = (char*)REALLOCATE(unused, size);
strcat(unused, "\n CHY_UNUSED_VAR(");
@@ -93,17 +97,41 @@ CFCBindMeth_abstract_method_def(CFCMetho
strcat(unused, ");");
}
- /* Create an unreachable return statement if necessary, in order to thwart
- * compiler warnings. */
+ return unused;
+}
+
+/* Create an unreachable return statement if necessary, in order to thwart
+ * compiler warnings. */
+static char*
+S_maybe_unreachable(CFCType *return_type) {
char *return_statement;
if (CFCType_is_void(return_type)) {
return_statement = CFCUtil_strdup("");
}
else {
- return_statement = MALLOCATE(strlen(ret_type_str) + 80);
+ const char *ret_type_str = CFCType_to_c(return_type);
+ return_statement = MALLOCATE(strlen(ret_type_str) + 60);
sprintf(return_statement, "\n CHY_UNREACHABLE_RETURN(%s);",
ret_type_str);
}
+ return return_statement;
+}
+
+char*
+CFCBindMeth_abstract_method_def(CFCMethod *method) {
+ CFCParamList *param_list = CFCMethod_get_param_list(method);
+ const char *params = CFCParamList_to_c(param_list);
+ const char *full_func_sym = CFCMethod_implementing_func_sym(method);
+ const char *vtable_var
+ = CFCType_get_vtable_var(CFCMethod_self_type(method));
+ CFCType *return_type = CFCMethod_get_return_type(method);
+ const char *ret_type_str = CFCType_to_c(return_type);
+ const char *macro_sym = CFCMethod_get_macro_sym(method);
+
+ // Thwart compiler warnings.
+ CFCVariable **param_vars = CFCParamList_get_variables(param_list);
+ char *unused = S_build_unused_vars(param_vars + 1);
+ char *return_statement = S_maybe_unreachable(return_type);
char template[] =
"%s\n"
@@ -129,3 +157,261 @@ CFCBindMeth_abstract_method_def(CFCMetho
return abstract_def;
}
+char*
+CFCBindMeth_callback_def(CFCMethod *method) {
+ CFCType *return_type = CFCMethod_get_return_type(method);
+ char *params = CFCBindMeth_callback_params(method);
+ char *callback_def = NULL;
+
+ if (!params) {
+ // Can't map vars, because there's at least one type in the argument
+ // list we don't yet support. Return a callback wrapper that throws
+ // an error error.
+ callback_def = CFCBindMeth_invalid_callback_def(method);
+ }
+ else if (CFCType_is_void(return_type)) {
+ callback_def = CFCBindMeth_void_callback_def(method, params);
+ }
+ else if (CFCType_is_object(return_type)) {
+ callback_def = CFCBindMeth_obj_callback_def(method, params);
+ }
+ else {
+ callback_def = CFCBindMeth_primitive_callback_def(method, params);
+ }
+
+ FREEMEM(params);
+ return callback_def;
+}
+
+/* Return a string which maps arguments to various arg wrappers conforming
+ * to Host's callback interface. For instance, (int32_t foo, Obj *bar)
+ * produces the following:
+ *
+ * CFISH_ARG_I32("foo", foo),
+ * CFISH_ARG_OBJ("bar", bar)
+ */
+char*
+CFCBindMeth_callback_params(CFCMethod *method) {
+ const char *micro_sym = CFCSymbol_micro_sym((CFCSymbol*)method);
+ CFCParamList *param_list = CFCMethod_get_param_list(method);
+ unsigned num_params = CFCParamList_num_vars(param_list) - 1;
+ size_t needed = strlen(micro_sym) + 30;
+ char *params = (char*)MALLOCATE(needed);
+
+ // TODO: use something other than micro_sym here.
+ sprintf(params, "self, \"%s\", %u", micro_sym, num_params);
+
+ // Iterate over arguments, mapping them to various arg wrappers which
+ // conform to Host's callback interface.
+ CFCVariable **arg_vars = CFCParamList_get_variables(param_list);
+ for (int i = 1; arg_vars[i] != NULL; i++) {
+ CFCVariable *var = arg_vars[i];
+ const char *name = CFCVariable_micro_sym(var);
+ size_t name_len = strlen(name);
+ CFCType *type = CFCVariable_get_type(var);
+ const char *c_type = CFCType_to_c(type);
+ size_t size = strlen(params)
+ + strlen(c_type)
+ + name_len * 2
+ + 30;
+ char *new_buf = (char*)MALLOCATE(size);
+
+ if (CFCType_is_string_type(type)) {
+ sprintf(new_buf, "%s, CFISH_ARG_STR(\"%s\", %s)", params, name, name);
+ }
+ else if (CFCType_is_object(type)) {
+ sprintf(new_buf, "%s, CFISH_ARG_OBJ(\"%s\", %s)", params, name, name);
+ }
+ else if (CFCType_is_integer(type)) {
+ int width = CFCType_get_width(type);
+ if (width) {
+ if (width <= 4) {
+ sprintf(new_buf, "%s, CFISH_ARG_I32(\"%s\", %s)", params,
+ name, name);
+ }
+ else {
+ sprintf(new_buf, "%s, CFISH_ARG_I64(\"%s\", %s)", params,
+ name, name);
+ }
+ }
+ else {
+ sprintf(new_buf, "%s, CFISH_ARG_I(%s, \"%s\", %s)", params,
+ c_type, name, name);
+ }
+ }
+ else if (CFCType_is_floating(type)) {
+ sprintf(new_buf, "%s, CFISH_ARG_F64(\"%s\", %s)", params, name, name);
+ }
+ else {
+ // Can't map variable type. Signal to caller.
+ FREEMEM(params);
+ FREEMEM(new_buf);
+ return NULL;
+ }
+
+ FREEMEM(params);
+ params = new_buf;
+ }
+
+ return params;
+}
+
+/* Return a function which throws a runtime error indicating which variable
+ * couldn't be mapped. TODO: it would be better to resolve all these cases at
+ * compile-time.
+ */
+char*
+CFCBindMeth_invalid_callback_def(CFCMethod *method) {
+ const char *class_cnick = CFCMethod_get_class_cnick(method);
+ size_t meth_sym_size = CFCMethod_full_method_sym(method, class_cnick, NULL, 0);
+ char *full_method_sym = (char*)MALLOCATE(meth_sym_size);
+ CFCMethod_full_method_sym(method, class_cnick, full_method_sym,
+ meth_sym_size);
+
+ const char *override_sym = CFCMethod_full_override_sym(method);
+ CFCParamList *param_list = CFCMethod_get_param_list(method);
+ const char *params = CFCParamList_to_c(param_list);
+ CFCVariable **param_vars = CFCParamList_get_variables(param_list);
+
+ // Thwart compiler warnings.
+ CFCType *return_type = CFCMethod_get_return_type(method);
+ char *unused = S_build_unused_vars(param_vars);
+ char *unreachable = S_maybe_unreachable(return_type);
+
+ char pattern[] =
+ "void\n"
+ "%s(%s) {%s\n"
+ " CFISH_THROW(CFISH_ERR, \"Can't override %s via binding\");%s\n"
+ "}\n";
+ size_t size = sizeof(pattern)
+ + strlen(override_sym)
+ + strlen(params)
+ + strlen(unused)
+ + strlen(full_method_sym)
+ + strlen(unreachable)
+ + 20;
+ char *callback_def = (char*)MALLOCATE(size);
+ sprintf(callback_def, pattern, override_sym, params, unused,
+ full_method_sym, unreachable);
+
+ FREEMEM(unused);
+ return callback_def;
+}
+
+// Create a callback for a method which operates in a void context.
+char*
+CFCBindMeth_void_callback_def(CFCMethod *method,
+ const char *callback_params) {
+ const char *override_sym = CFCMethod_full_override_sym(method);
+ const char *params = CFCParamList_to_c(CFCMethod_get_param_list(method));
+ const char pattern[] =
+ "void\n"
+ "%s(%s) {\n"
+ " cfish_Host_callback(%s);\n"
+ "}\n";
+ size_t size = sizeof(pattern)
+ + strlen(override_sym)
+ + strlen(params)
+ + strlen(callback_params)
+ + 200;
+ char *callback_def = (char*)MALLOCATE(size);
+ sprintf(callback_def, pattern, override_sym, params, callback_params);
+ return callback_def;
+}
+
+// Create a callback which returns a primitive type.
+char*
+CFCBindMeth_primitive_callback_def(CFCMethod *method,
+ const char *callback_params) {
+ const char *override_sym = CFCMethod_full_override_sym(method);
+ const char *params = CFCParamList_to_c(CFCMethod_get_param_list(method));
+ CFCType *return_type = CFCMethod_get_return_type(method);
+ const char *ret_type_str = CFCType_to_c(return_type);
+ char cb_func_name[40];
+ if (CFCType_is_floating(return_type)) {
+ strcpy(cb_func_name, "cfish_Host_callback_f64");
+ }
+ else if (CFCType_is_integer(return_type)) {
+ strcpy(cb_func_name, "cfish_Host_callback_i64");
+ }
+ else if (strcmp(ret_type_str, "void*") == 0) {
+ strcpy(cb_func_name, "cfish_Host_callback_host");
+ }
+ else {
+ CFCUtil_die("unrecognized type: %s", ret_type_str);
+ }
+
+ char pattern[] =
+ "%s\n"
+ "%s(%s) {\n"
+ " return (%s)%s(%s);\n"
+ "}\n";
+ size_t size = sizeof(pattern)
+ + strlen(ret_type_str)
+ + strlen(override_sym)
+ + strlen(params)
+ + strlen(ret_type_str)
+ + strlen(cb_func_name)
+ + strlen(callback_params)
+ + 20;
+ char *callback_def = (char*)MALLOCATE(size);
+ sprintf(callback_def, pattern, ret_type_str, override_sym, params,
+ ret_type_str, cb_func_name, callback_params);
+
+ return callback_def;
+}
+
+// Create a callback which returns an object type -- either a generic object or
+// a string.
+char*
+CFCBindMeth_obj_callback_def(CFCMethod *method, const char *callback_params) {
+ const char *override_sym = CFCMethod_full_override_sym(method);
+ const char *params = CFCParamList_to_c(CFCMethod_get_param_list(method));
+ CFCType *return_type = CFCMethod_get_return_type(method);
+ const char *ret_type_str = CFCType_to_c(return_type);
+ const char *cb_func_name = CFCType_is_string_type(return_type)
+ ? "cfish_Host_callback_str"
+ : "cfish_Host_callback_obj";
+
+ char *nullable_check = CFCUtil_strdup("");
+ if (!CFCType_nullable(return_type)) {
+ const char *macro_sym = CFCMethod_get_macro_sym(method);
+ char pattern[] =
+ "\n if (!retval) { CFISH_THROW(CFISH_ERR, "
+ "\"%s() for class '%%o' cannot return NULL\", "
+ "Cfish_Obj_Get_Class_Name((cfish_Obj*)self)); }";
+ size_t size = sizeof(pattern) + strlen(macro_sym) + 30;
+ nullable_check = (char*)REALLOCATE(nullable_check, size);
+ sprintf(nullable_check, pattern, macro_sym);
+ }
+
+ const char *decrement = CFCType_incremented(return_type)
+ ? ""
+ : "\n LUCY_DECREF(retval);";
+
+ char pattern[] =
+ "%s\n"
+ "%s(%s) {\n"
+ " %s retval = (%s)%s(%s);%s%s\n"
+ " return retval;\n"
+ "}\n";
+ size_t size = sizeof(pattern)
+ + strlen(ret_type_str)
+ + strlen(override_sym)
+ + strlen(params)
+ + strlen(ret_type_str)
+ + strlen(ret_type_str)
+ + strlen(cb_func_name)
+ + strlen(callback_params)
+ + strlen(nullable_check)
+ + strlen(decrement)
+ + 30;
+ char *callback_def = (char*)MALLOCATE(size);
+ sprintf(callback_def, pattern, ret_type_str, override_sym, params,
+ ret_type_str, ret_type_str, cb_func_name, callback_params,
+ nullable_check, decrement);
+
+ FREEMEM(nullable_check);
+ return callback_def;
+}
+
Modified: incubator/lucy/trunk/clownfish/src/CFCBindMethod.h
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCBindMethod.h?rev=1138267&r1=1138266&r2=1138267&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCBindMethod.h (original)
+++ incubator/lucy/trunk/clownfish/src/CFCBindMethod.h Wed Jun 22 01:05:20 2011
@@ -35,6 +35,27 @@ CFCBindMeth_callback_obj_def(struct CFCM
char*
CFCBindMeth_abstract_method_def(struct CFCMethod *method);
+char*
+CFCBindMeth_callback_def(struct CFCMethod *method);
+
+char*
+CFCBindMeth_callback_params(struct CFCMethod *method);
+
+char*
+CFCBindMeth_invalid_callback_def(struct CFCMethod *method);
+
+char*
+CFCBindMeth_void_callback_def(struct CFCMethod *method,
+ const char *callback_params);
+
+char*
+CFCBindMeth_primitive_callback_def(struct CFCMethod *method,
+ const char *callback_params);
+
+char*
+CFCBindMeth_obj_callback_def(struct CFCMethod *method,
+ const char *callback_params);
+
#ifdef __cplusplus
}
#endif