Misc fixes to Ruby build
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/81a06505 Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/81a06505 Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/81a06505 Branch: refs/heads/master Commit: 81a0650538a16d79ea072f4a001f899b749c0ba2 Parents: 0496571 Author: Nick Wellnhofer <[email protected]> Authored: Fri Jul 25 14:57:56 2014 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Fri Jul 25 14:57:56 2014 +0200 ---------------------------------------------------------------------- ruby/.gitignore | 4 ++ ruby/Rakefile | 66 ++++---------------- ruby/src/CFBind.c | 19 ------ ruby/src/CFBind.h | 51 --------------- ruby/src/Lucy/Analysis/RegexTokenizer.c | 48 --------------- ruby/src/Lucy/Document/Doc.c | 92 ---------------------------- ruby/src/Lucy/Index/DocReader.c | 29 --------- ruby/src/Lucy/Index/Inverter.c | 29 --------- ruby/src/Lucy/Object/Err.c | 46 -------------- ruby/src/Lucy/Object/Host.c | 53 ---------------- ruby/src/Lucy/Object/LockFreeRegistry.c | 28 --------- ruby/src/Lucy/Object/Obj.c | 45 -------------- ruby/src/Lucy/Object/VTable.c | 50 --------------- 13 files changed, 17 insertions(+), 543 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/81a06505/ruby/.gitignore ---------------------------------------------------------------------- diff --git a/ruby/.gitignore b/ruby/.gitignore new file mode 100644 index 0000000..915ec4c --- /dev/null +++ b/ruby/.gitignore @@ -0,0 +1,4 @@ +/Charmony.rb +/autogen/ +/charmonizer +/charmony.h http://git-wip-us.apache.org/repos/asf/lucy/blob/81a06505/ruby/Rakefile ---------------------------------------------------------------------- diff --git a/ruby/Rakefile b/ruby/Rakefile index 9481380..6a062a7 100644 --- a/ruby/Rakefile +++ b/ruby/Rakefile @@ -19,6 +19,8 @@ require 'rake/clean' gem 'rake-compiler' require 'rake/extensiontask' +require 'Clownfish/CFC' + def exe_path(*args) File.join(args).ext(RbConfig::CONFIG["EXEEXT"]) end @@ -85,29 +87,21 @@ end IS_DISTRO_NOT_DEVEL = File.directory?('core') AUTOGEN_DIR = "autogen" BASE_DIR = File.absolute_path(IS_DISTRO_NOT_DEVEL ? '.' : '..') -CHARMONIZER_ORIG_DIR = File.join(BASE_DIR, "charmonizer") COMMON_SOURCE_DIR = File.join(BASE_DIR, "common") CHARMONIZER_C = File.join(COMMON_SOURCE_DIR, 'charmonizer.c') CHARMONIZER_EXE_PATH = File.absolute_path(exe_path('charmonizer')) -CLOWNFISH_PATH = File.join(BASE_DIR,"clownfish","ruby") CHARMONY_H_PATH = "charmony.h" CHARMONY_RB_PATH = "Charmony.rb" CORE_SOURCE_DIR = File.join(BASE_DIR, "core") desc "Build clownfish" -task :clownfish => [:charmonizer_tests] do - puts "Building clownfish...\n" - build_cfc - - require_relative File.join(CLOWNFISH_PATH,"ext","Clownfish","CFC") - +task :clownfish => [:charmony] do puts "Parsing Clownfish files...\n"; hierarchy_obj = compile_clownfish core_binding_obj = Clownfish::CFC::Binding::Core.new( - hierarchy_obj, - AUTOGEN_DIR, - autogen_header, - '', + :hierarchy => hierarchy_obj, + :header => autogen_header, + :footer => '', ) puts "Writing Clownfish autogenerated files...\n" @@ -136,7 +130,7 @@ task :charmony do # Prepare arguments to charmonizer. command = [ CHARMONIZER_EXE_PATH, - '--cc=' + quotify(cc_command), + '--cc=' + cc_command, '--enable-c', '--enable-ruby', '--', @@ -149,7 +143,7 @@ task :charmony do # Run charmonizer. puts command.join(" ") if !system(*command) - raise "Failed to run #{CHARMONIZER_EXE_PATH}: " + $? + raise "Failed to run #{CHARMONIZER_EXE_PATH}: " + $?.to_s end end CLEAN.include(CHARMONIZER_EXE_PATH) @@ -158,39 +152,9 @@ CLEAN.include(CHARMONY_RB_PATH) # Clean up after charmonizer if it doesn't succeed on its own. CLEAN.include("_charm*") -desc "Build the charmonizer tests" -task :charmonizer_tests => [:charmony] do - puts "Building Charmonizer Tests...\n" - flags = all_ccflags + ' -I' + File.absolute_path(Dir.pwd) - args = ["CC=\"#{cc_command}\"", "DEFS=#{flags}", "tests"] - run_make(CHARMONIZER_ORIG_DIR, args) -end - # Clean up after MSVC. CLEAN.include("*.pdb") -task :clean do - run_make(CHARMONIZER_ORIG_DIR, ["clean"]) -end - -task :test => [:charmonizer_tests] do - pattern = File.join(CHARMONIZER_ORIG_DIR, "Test*") - charm_tests = Dir.glob(pattern) - puts charm_tests - failed = [] - for charm_test in charm_tests - success = system(charm_test) - if !success - failed.push(charm_test) - end - end - if failed.length != 0 - puts "Failed: #{failed}" - else - puts "All tests pass" - end -end - def autogen_header return <<"END_AUTOGEN"; /*********************************************** @@ -222,18 +186,14 @@ END_AUTOGEN end def compile_clownfish - hierarchy_obj = Clownfish::CFC::Model::Hierarchy.new(CORE_SOURCE_DIR, AUTOGEN_DIR) + hierarchy_obj = Clownfish::CFC::Model::Hierarchy.new(:dest => AUTOGEN_DIR) + hierarchy_obj.add_source_dir(CORE_SOURCE_DIR) + if (ENV['CLOWNFISH_INCLUDE']) + hierarchy_obj.add_include_dir(ENV['CLOWNFISH_INCLUDE']) + end hierarchy_obj.build return hierarchy_obj end -def build_cfc - Dir.chdir(CLOWNFISH_PATH) do - if system('rake clownfish').nil? - abort "Failed to make clownfish" - end - end -end - http://git-wip-us.apache.org/repos/asf/lucy/blob/81a06505/ruby/src/CFBind.c ---------------------------------------------------------------------- diff --git a/ruby/src/CFBind.c b/ruby/src/CFBind.c deleted file mode 100644 index 772b065..0000000 --- a/ruby/src/CFBind.c +++ /dev/null @@ -1,19 +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" - - http://git-wip-us.apache.org/repos/asf/lucy/blob/81a06505/ruby/src/CFBind.h ---------------------------------------------------------------------- diff --git a/ruby/src/CFBind.h b/ruby/src/CFBind.h deleted file mode 100644 index b4c142b..0000000 --- a/ruby/src/CFBind.h +++ /dev/null @@ -1,51 +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. - */ - -/* CFBind.h -- Functions to help bind Clownfish to [LANGUAGE_X]. - */ - -#ifndef H_CFISH_CFBIND -#define H_CFISH_CFBIND 1 - -#ifdef __cplusplus -extern "C" { -#endif - -#include "charmony.h" -#include "Clownfish/Obj.h" -#include "Clownfish/ByteBuf.h" -#include "Clownfish/String.h" -#include "Clownfish/Err.h" -#include "Clownfish/Hash.h" -#include "Clownfish/Num.h" -#include "Clownfish/VArray.h" -#include "Clownfish/VTable.h" - -/* Strip the prefix from some common symbols where we know there's no - * conflict. It's a little inconsistent to do this rather than leave all - * symbols at full size, but the succinctness is worth it. - */ -#define THROW CFISH_THROW -#define WARN CFISH_WARN -#define UNREACHABLE_RETURN CHY_UNREACHABLE_RETURN - -#ifdef __cplusplus -} -#endif - -#endif // H_CFISH_CFBIND - - http://git-wip-us.apache.org/repos/asf/lucy/blob/81a06505/ruby/src/Lucy/Analysis/RegexTokenizer.c ---------------------------------------------------------------------- diff --git a/ruby/src/Lucy/Analysis/RegexTokenizer.c b/ruby/src/Lucy/Analysis/RegexTokenizer.c deleted file mode 100644 index 2f21afb..0000000 --- a/ruby/src/Lucy/Analysis/RegexTokenizer.c +++ /dev/null @@ -1,48 +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_REGEXTOKENIZER - -#include "CFBind.h" -#include "Lucy/Analysis/RegexTokenizer.h" -#include "Lucy/Analysis/Token.h" -#include "Lucy/Analysis/Inversion.h" - -lucy_RegexTokenizer* -lucy_RegexTokenizer_init(lucy_RegexTokenizer *self, - const lucy_CharBuf *pattern) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_RegexTokenizer*); -} - -void -lucy_RegexTokenizer_set_token_re(lucy_RegexTokenizer *self, void *token_re) { - THROW(LUCY_ERR, "TODO"); -} - -void -lucy_RegexTokenizer_destroy(lucy_RegexTokenizer *self) { - THROW(LUCY_ERR, "TODO"); -} - -void -lucy_RegexTokenizer_tokenize_str(lucy_RegexTokenizer *self, - const char *string, size_t string_len, - lucy_Inversion *inversion) { - THROW(LUCY_ERR, "TODO"); -} - - http://git-wip-us.apache.org/repos/asf/lucy/blob/81a06505/ruby/src/Lucy/Document/Doc.c ---------------------------------------------------------------------- diff --git a/ruby/src/Lucy/Document/Doc.c b/ruby/src/Lucy/Document/Doc.c deleted file mode 100644 index 1ec532d..0000000 --- a/ruby/src/Lucy/Document/Doc.c +++ /dev/null @@ -1,92 +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_DOC - -#include "CFBind.h" -#include "Lucy/Document/Doc.h" -#include "Lucy/Store/InStream.h" -#include "Lucy/Store/OutStream.h" - -lucy_Doc* -lucy_Doc_init(lucy_Doc *self, void *fields, int32_t doc_id) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_Doc*); -} - -void -lucy_Doc_set_fields(lucy_Doc *self, void *fields) { - THROW(LUCY_ERR, "TODO"); -} - -uint32_t -lucy_Doc_get_size(lucy_Doc *self) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(uint32_t); -} - -void -lucy_Doc_store(lucy_Doc *self, const lucy_CharBuf *field, lucy_Obj *value) { - THROW(LUCY_ERR, "TODO"); -} - -void -lucy_Doc_serialize(lucy_Doc *self, lucy_OutStream *outstream) { - THROW(LUCY_ERR, "TODO"); -} - -lucy_Doc* -lucy_Doc_deserialize(lucy_Doc *self, lucy_InStream *instream) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_Doc*); -} - -lucy_Obj* -lucy_Doc_extract(lucy_Doc *self, lucy_CharBuf *field) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_Obj*); -} - -void* -lucy_Doc_to_host(lucy_Doc *self) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(void*); -} - -lucy_Hash* -lucy_Doc_dump(lucy_Doc *self) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_Hash*); -} - -lucy_Doc* -lucy_Doc_load(lucy_Doc *self, lucy_Obj *dump) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_Doc*); -} - -bool -lucy_Doc_equals(lucy_Doc *self, lucy_Obj *other) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(bool); -} - -void -lucy_Doc_destroy(lucy_Doc *self) { - THROW(LUCY_ERR, "TODO"); -} - - http://git-wip-us.apache.org/repos/asf/lucy/blob/81a06505/ruby/src/Lucy/Index/DocReader.c ---------------------------------------------------------------------- diff --git a/ruby/src/Lucy/Index/DocReader.c b/ruby/src/Lucy/Index/DocReader.c deleted file mode 100644 index 430ccbe..0000000 --- a/ruby/src/Lucy/Index/DocReader.c +++ /dev/null @@ -1,29 +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_DOCREADER -#define C_LUCY_DEFAULTDOCREADER - -#include "CFBind.h" -#include "Lucy/Index/DocReader.h" -#include "Lucy/Document/HitDoc.h" - -lucy_HitDoc* -lucy_DefDocReader_fetch_doc(lucy_DefaultDocReader *self, int32_t doc_id) { - THROW(LUCY_ERR, "TODO"); - UNREACHABLE_RETURN(lucy_HitDoc*); -} - http://git-wip-us.apache.org/repos/asf/lucy/blob/81a06505/ruby/src/Lucy/Index/Inverter.c ---------------------------------------------------------------------- diff --git a/ruby/src/Lucy/Index/Inverter.c b/ruby/src/Lucy/Index/Inverter.c deleted file mode 100644 index e77c067..0000000 --- a/ruby/src/Lucy/Index/Inverter.c +++ /dev/null @@ -1,29 +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_INVERTER -#define C_LUCY_INVERTERENTRY - -#include "CFBind.h" -#include "Lucy/Index/Inverter.h" -#include "Lucy/Document/Doc.h" - -void -lucy_Inverter_invert_doc(lucy_Inverter *self, lucy_Doc *doc) { - THROW(LUCY_ERR, "TODO"); -} - - http://git-wip-us.apache.org/repos/asf/lucy/blob/81a06505/ruby/src/Lucy/Object/Err.c ---------------------------------------------------------------------- diff --git a/ruby/src/Lucy/Object/Err.c b/ruby/src/Lucy/Object/Err.c deleted file mode 100644 index 389e8f4..0000000 --- a/ruby/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/81a06505/ruby/src/Lucy/Object/Host.c ---------------------------------------------------------------------- diff --git a/ruby/src/Lucy/Object/Host.c b/ruby/src/Lucy/Object/Host.c deleted file mode 100644 index dad09bd..0000000 --- a/ruby/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/81a06505/ruby/src/Lucy/Object/LockFreeRegistry.c ---------------------------------------------------------------------- diff --git a/ruby/src/Lucy/Object/LockFreeRegistry.c b/ruby/src/Lucy/Object/LockFreeRegistry.c deleted file mode 100644 index 5991ad3..0000000 --- a/ruby/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_CFISH_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/81a06505/ruby/src/Lucy/Object/Obj.c ---------------------------------------------------------------------- diff --git a/ruby/src/Lucy/Object/Obj.c b/ruby/src/Lucy/Object/Obj.c deleted file mode 100644 index 2e0551d..0000000 --- a/ruby/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_CFISH_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/81a06505/ruby/src/Lucy/Object/VTable.c ---------------------------------------------------------------------- diff --git a/ruby/src/Lucy/Object/VTable.c b/ruby/src/Lucy/Object/VTable.c deleted file mode 100644 index 3055f8d..0000000 --- a/ruby/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_CFISH_OBJ -#define C_CFISH_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*); -} -
