Rename some C binding source files Adjust for 'Lucy/Object' -> 'Clownfish' namespace change. Also add missing stubs to Clownfish/Err.c and remove Clownfish/Host.c.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/f797438c Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/f797438c Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/f797438c Branch: refs/heads/c-bindings-wip1 Commit: f797438c37902b3647af7850e34df5f70df97bc2 Parents: eb8f895 Author: Nick Wellnhofer <[email protected]> Authored: Fri Nov 23 01:05:11 2012 +0100 Committer: Nick Wellnhofer <[email protected]> Committed: Tue Dec 4 20:57:58 2012 +0100 ---------------------------------------------------------------------- c/src/Clownfish/Err.c | 60 +++++++++++++++++++++++++++++ c/src/Clownfish/LockFreeRegistry.c | 28 +++++++++++++ c/src/Clownfish/Obj.c | 45 +++++++++++++++++++++ c/src/Clownfish/VTable.c | 50 ++++++++++++++++++++++++ c/src/Lucy/Object/Err.c | 46 ---------------------- c/src/Lucy/Object/Host.c | 53 ------------------------- c/src/Lucy/Object/LockFreeRegistry.c | 28 ------------- c/src/Lucy/Object/Obj.c | 45 --------------------- c/src/Lucy/Object/VTable.c | 50 ------------------------ 9 files changed, 183 insertions(+), 222 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/f797438c/c/src/Clownfish/Err.c ---------------------------------------------------------------------- diff --git a/c/src/Clownfish/Err.c b/c/src/Clownfish/Err.c new file mode 100644 index 0000000..b2de599 --- /dev/null +++ b/c/src/Clownfish/Err.c @@ -0,0 +1,60 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "CFBind.h" + +void +lucy_Err_init_class(void) { +} + +lucy_Err* +lucy_Err_get_error() { + THROW(LUCY_ERR, "TODO"); + UNREACHABLE_RETURN(lucy_Err*); +} + +void +lucy_Err_set_error(lucy_Err *error) { + THROW(LUCY_ERR, "TODO"); +} + +void +lucy_Err_do_throw(lucy_Err *err) { + THROW(LUCY_ERR, "TODO"); +} + +void* +lucy_Err_to_host(lucy_Err *self) { + THROW(LUCY_ERR, "TODO"); + UNREACHABLE_RETURN(void*); +} + +void +lucy_Err_throw_mess(lucy_VTable *vtable, lucy_CharBuf *message) { + THROW(LUCY_ERR, "TODO"); +} + +void +lucy_Err_warn_mess(lucy_CharBuf *message) { + THROW(LUCY_ERR, "TODO"); +} + +lucy_Err* +lucy_Err_trap(Cfish_Err_Attempt_t routine, void *context) { + THROW(LUCY_ERR, "TODO"); + UNREACHABLE_RETURN(lucy_Err*); +} + http://git-wip-us.apache.org/repos/asf/lucy/blob/f797438c/c/src/Clownfish/LockFreeRegistry.c ---------------------------------------------------------------------- diff --git a/c/src/Clownfish/LockFreeRegistry.c b/c/src/Clownfish/LockFreeRegistry.c new file mode 100644 index 0000000..1f208c4 --- /dev/null +++ b/c/src/Clownfish/LockFreeRegistry.c @@ -0,0 +1,28 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define C_LUCY_LOCKFREEREGISTRY + +#include "CFBind.h" +#include "Clownfish/LockFreeRegistry.h" + +void* +lucy_LFReg_to_host(lucy_LockFreeRegistry *self) { + THROW(LUCY_ERR, "TODO"); + UNREACHABLE_RETURN(void*); +} + + http://git-wip-us.apache.org/repos/asf/lucy/blob/f797438c/c/src/Clownfish/Obj.c ---------------------------------------------------------------------- diff --git a/c/src/Clownfish/Obj.c b/c/src/Clownfish/Obj.c new file mode 100644 index 0000000..e529513 --- /dev/null +++ b/c/src/Clownfish/Obj.c @@ -0,0 +1,45 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define C_LUCY_OBJ + +#include "CFBind.h" + +uint32_t +lucy_Obj_get_refcount(lucy_Obj *self) { + THROW(LUCY_ERR, "TODO"); + UNREACHABLE_RETURN(uint32_t); +} + +lucy_Obj* +lucy_Obj_inc_refcount(lucy_Obj *self) { + THROW(LUCY_ERR, "TODO"); + UNREACHABLE_RETURN(lucy_Obj*); +} + +uint32_t +lucy_Obj_dec_refcount(lucy_Obj *self) { + THROW(LUCY_ERR, "TODO"); + UNREACHABLE_RETURN(uint32_t); +} + +void* +lucy_Obj_to_host(lucy_Obj *self) { + THROW(LUCY_ERR, "TODO"); + UNREACHABLE_RETURN(void*); +} + + http://git-wip-us.apache.org/repos/asf/lucy/blob/f797438c/c/src/Clownfish/VTable.c ---------------------------------------------------------------------- diff --git a/c/src/Clownfish/VTable.c b/c/src/Clownfish/VTable.c new file mode 100644 index 0000000..00c9901 --- /dev/null +++ b/c/src/Clownfish/VTable.c @@ -0,0 +1,50 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define C_LUCY_OBJ +#define C_LUCY_VTABLE + +#include "CFBind.h" + +lucy_Obj* +lucy_VTable_foster_obj(lucy_VTable *self, void *host_obj) { + THROW(LUCY_ERR, "TODO"); + UNREACHABLE_RETURN(lucy_Obj*); +} + +void +lucy_VTable_register_with_host(lucy_VTable *singleton, lucy_VTable *parent) { + THROW(LUCY_ERR, "TODO"); +} + +lucy_VArray* +lucy_VTable_fresh_host_methods(const lucy_CharBuf *class_name) { + THROW(LUCY_ERR, "TODO"); + UNREACHABLE_RETURN(lucy_VArray*); +} + +lucy_CharBuf* +lucy_VTable_find_parent_class(const lucy_CharBuf *class_name) { + THROW(LUCY_ERR, "TODO"); + UNREACHABLE_RETURN(lucy_CharBuf*); +} + +void* +lucy_VTable_to_host(lucy_VTable *self) { + THROW(LUCY_ERR, "TODO"); + UNREACHABLE_RETURN(void*); +} + http://git-wip-us.apache.org/repos/asf/lucy/blob/f797438c/c/src/Lucy/Object/Err.c ---------------------------------------------------------------------- diff --git a/c/src/Lucy/Object/Err.c b/c/src/Lucy/Object/Err.c deleted file mode 100644 index 389e8f4..0000000 --- a/c/src/Lucy/Object/Err.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "CFBind.h" - -lucy_Err* -lucy_Err_get_error() { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_Err*); -} - -void -lucy_Err_set_error(lucy_Err *error) { - THROW(LUCY_ERR, "TODO"); -} - -void* -lucy_Err_to_host(lucy_Err *self) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(void*); -} - -void -lucy_Err_throw_mess(lucy_VTable *vtable, lucy_CharBuf *message) { - THROW(LUCY_ERR, "TODO"); -} - -void -lucy_Err_warn_mess(lucy_CharBuf *message) { - THROW(LUCY_ERR, "TODO"); -} - - http://git-wip-us.apache.org/repos/asf/lucy/blob/f797438c/c/src/Lucy/Object/Host.c ---------------------------------------------------------------------- diff --git a/c/src/Lucy/Object/Host.c b/c/src/Lucy/Object/Host.c deleted file mode 100644 index dad09bd..0000000 --- a/c/src/Lucy/Object/Host.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "CFBind.h" - -void -lucy_Host_callback(void *vobj, char *method, uint32_t num_args, ...) { - THROW(LUCY_ERR, "TODO"); -} - -int64_t -lucy_Host_callback_i64(void *vobj, char *method, uint32_t num_args, ...) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(int64_t); -} - -double -lucy_Host_callback_f64(void *vobj, char *method, uint32_t num_args, ...) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(double); -} - -lucy_Obj* -lucy_Host_callback_obj(void *vobj, char *method, uint32_t num_args, ...) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_Obj*); -} - -lucy_CharBuf* -lucy_Host_callback_str(void *vobj, char *method, uint32_t num_args, ...) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_CharBuf*); -} - -void* -lucy_Host_callback_host(void *vobj, char *method, uint32_t num_args, ...) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(void*); -} - http://git-wip-us.apache.org/repos/asf/lucy/blob/f797438c/c/src/Lucy/Object/LockFreeRegistry.c ---------------------------------------------------------------------- diff --git a/c/src/Lucy/Object/LockFreeRegistry.c b/c/src/Lucy/Object/LockFreeRegistry.c deleted file mode 100644 index 1f208c4..0000000 --- a/c/src/Lucy/Object/LockFreeRegistry.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define C_LUCY_LOCKFREEREGISTRY - -#include "CFBind.h" -#include "Clownfish/LockFreeRegistry.h" - -void* -lucy_LFReg_to_host(lucy_LockFreeRegistry *self) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(void*); -} - - http://git-wip-us.apache.org/repos/asf/lucy/blob/f797438c/c/src/Lucy/Object/Obj.c ---------------------------------------------------------------------- diff --git a/c/src/Lucy/Object/Obj.c b/c/src/Lucy/Object/Obj.c deleted file mode 100644 index e529513..0000000 --- a/c/src/Lucy/Object/Obj.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define C_LUCY_OBJ - -#include "CFBind.h" - -uint32_t -lucy_Obj_get_refcount(lucy_Obj *self) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(uint32_t); -} - -lucy_Obj* -lucy_Obj_inc_refcount(lucy_Obj *self) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_Obj*); -} - -uint32_t -lucy_Obj_dec_refcount(lucy_Obj *self) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(uint32_t); -} - -void* -lucy_Obj_to_host(lucy_Obj *self) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(void*); -} - - http://git-wip-us.apache.org/repos/asf/lucy/blob/f797438c/c/src/Lucy/Object/VTable.c ---------------------------------------------------------------------- diff --git a/c/src/Lucy/Object/VTable.c b/c/src/Lucy/Object/VTable.c deleted file mode 100644 index 00c9901..0000000 --- a/c/src/Lucy/Object/VTable.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define C_LUCY_OBJ -#define C_LUCY_VTABLE - -#include "CFBind.h" - -lucy_Obj* -lucy_VTable_foster_obj(lucy_VTable *self, void *host_obj) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_Obj*); -} - -void -lucy_VTable_register_with_host(lucy_VTable *singleton, lucy_VTable *parent) { - THROW(LUCY_ERR, "TODO"); -} - -lucy_VArray* -lucy_VTable_fresh_host_methods(const lucy_CharBuf *class_name) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_VArray*); -} - -lucy_CharBuf* -lucy_VTable_find_parent_class(const lucy_CharBuf *class_name) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_CharBuf*); -} - -void* -lucy_VTable_to_host(lucy_VTable *self) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(void*); -} -
